Skip to content

Commit

Permalink
tonsa fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
voitto committed Apr 25, 2009
1 parent c0ea47e commit f8aa364
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 6 deletions.
3 changes: 3 additions & 0 deletions app/identica/plugins/identica.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
// the "hook" function itself
function send_to_identica( &$model, &$rec ) {

if (!get_profile_id())
return;

// if the Record does not have a title or uri, bail out
if (!(isset($rec->title)) || !(isset($rec->uri)))
return;
Expand Down
5 changes: 4 additions & 1 deletion app/omb/plugins/email_group.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ function send_email_notice( &$model, &$rec ) {
global $db;
global $request;

if (!(get_profile_id() && $request->resource == 'groups'))
return;

// get data modesl for 3 tables
$Entry =& $db->get_table( 'entries' );
$Group =& $db->get_table( 'groups' );
Expand Down Expand Up @@ -42,7 +45,7 @@ function send_email_notice( &$model, &$rec ) {
$datamodel =& $db->get_table($notify_table);

// get the profile data for the current user
$profile = get_profile();
$profile = owner_of($rec);

// loop over each group
while ($g = $Group->MoveNext()) {
Expand Down
2 changes: 0 additions & 2 deletions app/omb/plugins/omb.php
Original file line number Diff line number Diff line change
Expand Up @@ -1061,8 +1061,6 @@ function oauth_omb_post( &$vars ) {
exit;
}

$response->set_var('profile',$sender);

$Subscription =& $db->model('Subscription');

$sub = $Subscription->find_by( array(
Expand Down
2 changes: 1 addition & 1 deletion app/omb/plugins/omb_notice.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function broadcast_omb_notice( &$model, &$rec ) {
'wp-oauth'
));

$i = get_profile();
$i = owner_of($rec);

$listenee_uri = $i->profile;

Expand Down
3 changes: 3 additions & 0 deletions app/omb/plugins/ping.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ function send_ping( &$model, &$rec ) {
$notify_table = $model->table;
$recid = $rec->id;

if (!(get_profile_id()))
return;

if (array_key_exists( 'target_id', $model->field_array )) {
$e = $Entry->find($rec->attributes['target_id']);
if ($e) {
Expand Down
2 changes: 1 addition & 1 deletion app/omb/plugins/sms_notice.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function mobile_event( &$vars ) {
$p->set_etag($i->person_id);

$response->set_var('profile',$i);

load_apps();
trigger_after( 'insert_from_post', $Post, $p );

$response = "";
Expand Down
2 changes: 1 addition & 1 deletion app/omb/views/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
});
$(".editable_select_tw_text").editable(submit_to, {
indicator : "<img src='<?php base_path(); ?>resource/jeditable/indicator.gif'>",
data : '<?php $json = new Services_JSON(); echo $json->encode( $aktwitter_tw_text_options ); ?>',
data : '<?php if (!class_exists("Services_JSON")) lib_include("json"); $json = new Services_JSON(); echo $json->encode( $aktwitter_tw_text_options ); ?>',
submitdata : function() {
return {"entry[etag]" : "<?php echo $threadentry->etag; ?>"};
},
Expand Down
3 changes: 3 additions & 0 deletions app/twitter/plugins/twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
// the "hook" function itself
function send_to_twitter( &$model, &$rec ) {

if (!get_profile_id())
return;

// if the Record does not have a title or uri, bail out
if (!(isset($rec->title)) || !(isset($rec->uri)))
return;
Expand Down

0 comments on commit f8aa364

Please sign in to comment.