aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorolivierm <olivier@migeot.org>2011-02-24 18:52:08 +0100
committerolivierm <olivier@migeot.org>2011-02-24 18:52:08 +0100
commitd2c47924eb186a0839fe107b271ccbf27d15fe10 (patch)
treead94b3b6ed5232fc388ddb3212d1f0dccb3eb893 /mod
parent42d1474ff1388f987961ba24b0218a8e6ff0f47c (diff)
parent8ed085c64e4fb097394d0cc93f8744606c15527b (diff)
downloadvolse-hubzilla-d2c47924eb186a0839fe107b271ccbf27d15fe10.tar.gz
volse-hubzilla-d2c47924eb186a0839fe107b271ccbf27d15fe10.tar.bz2
volse-hubzilla-d2c47924eb186a0839fe107b271ccbf27d15fe10.zip
Merge commit 'mike/master'
Diffstat (limited to 'mod')
-rw-r--r--mod/contacts.php4
-rw-r--r--mod/dfrn_confirm.php7
-rw-r--r--mod/dfrn_notify.php4
-rw-r--r--mod/display.php8
-rw-r--r--mod/follow.php4
-rw-r--r--mod/item.php10
-rw-r--r--mod/like.php10
-rw-r--r--mod/message.php9
-rw-r--r--mod/network.php8
-rw-r--r--mod/photos.php15
-rw-r--r--mod/profile.php4
-rw-r--r--mod/profile_photo.php8
-rw-r--r--mod/profiles.php4
-rw-r--r--mod/register.php13
-rw-r--r--mod/regmod.php3
-rw-r--r--mod/settings.php4
16 files changed, 40 insertions, 75 deletions
diff --git a/mod/contacts.php b/mod/contacts.php
index 36f42f8e5..8e069b2bd 100644
--- a/mod/contacts.php
+++ b/mod/contacts.php
@@ -124,9 +124,7 @@ function contacts_content(&$a) {
if($cmd === 'update') {
// pull feed and consume it, which should subscribe to the hub.
-
- $php_path = ((x($a->config,'php_path') && strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
- proc_run($php_path,"include/poller.php","$contact_id");
+ proc_run('php',"include/poller.php","$contact_id");
goaway($a->get_baseurl() . '/contacts/' . $contact_id);
// NOTREACHED
}
diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php
index 24e8bf106..1b42c13b8 100644
--- a/mod/dfrn_confirm.php
+++ b/mod/dfrn_confirm.php
@@ -435,11 +435,8 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
$arr['last-child'] = 1;
$i = item_store($arr);
-
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
-
- //proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"activity\" \"$i\" &", array(),$foo));
- proc_run($php_path,"include/notifier.php","activity","$i");
+ if($i)
+ proc_run('php',"include/notifier.php","activity","$i");
}
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php
index cd7b0cff0..010272739 100644
--- a/mod/dfrn_notify.php
+++ b/mod/dfrn_notify.php
@@ -369,9 +369,7 @@ function dfrn_notify_post(&$a) {
if($posted_id && $parent) {
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
-
- proc_run($php_path,"include/notifier.php","comment-import","$posted_id");
+ proc_run('php',"include/notifier.php","comment-import","$posted_id");
if((! $is_like) && ($importer['notify-flags'] & NOTIFY_COMMENT) && (! $importer['self'])) {
require_once('bbcode.php');
diff --git a/mod/display.php b/mod/display.php
index bdf6a6f97..7cefc42e6 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -234,7 +234,7 @@ function display_content(&$a) {
}
if(($item['contact-id'] == remote_user()) || ($item['uid'] == local_user()))
- $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id']));
+ $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete')));
else
$drop = replace_macros(load_view_file('view/wall_fake_drop.tpl'), array('$id' => $item['id']));
@@ -258,7 +258,11 @@ function display_content(&$a) {
$tmp_item = replace_macros($template,array(
'$id' => $item['item_id'],
- '$title' => t('View $name\'s profile'),
+ '$linktitle' => t('View $name\'s profile'),
+ '$olinktitle' => t('View $owner_name\'s profile'),
+ '$to' => t('to'),
+ '$wall' => t('Wall-to-Wall'),
+ '$vwall' => t('via Wall-To-Wall:'),
'$profile_url' => $profile_link,
'$name' => $profile_name,
'$sparkle' => $sparkle,
diff --git a/mod/follow.php b/mod/follow.php
index 28441eae8..f3bd84669 100644
--- a/mod/follow.php
+++ b/mod/follow.php
@@ -253,9 +253,7 @@ function follow_post(&$a) {
// pull feed and consume it, which should subscribe to the hub.
- $php_path = ((x($a->config,'php_path') && strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
- //proc_close(proc_open("\"$php_path\" \"include/poller.php\" \"$contact_id\" &", array(), $foo));
- proc_run($php_path,"include/poller.php","$contact_id");
+ proc_run('php',"include/poller.php","$contact_id");
// create a follow slap
diff --git a/mod/item.php b/mod/item.php
index 8c6b181c0..c2487435e 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -460,11 +460,7 @@ function item_post(&$a) {
// NOTREACHED
}
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
-
- logger('mod_item: notifier invoked: ' . "\"$php_path\" \"include/notifier.php\" \"$notify_type\" \"$post_id\" &");
-
- proc_run($php_path, "include/notifier.php", $notify_type, "$post_id");
+ proc_run('php', "include/notifier.php", $notify_type, "$post_id");
$datarray['id'] = $post_id;
@@ -595,12 +591,10 @@ function item_content(&$a) {
}
}
$drop_id = intval($item['id']);
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
// send the notification upstream/downstream as the case may be
- //proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"drop\" \"$drop_id\" &", array(), $foo));
- proc_run($php_path,"include/notifier.php","drop","$drop_id");
+ proc_run('php',"include/notifier.php","drop","$drop_id");
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
//NOTREACHED
diff --git a/mod/like.php b/mod/like.php
index c78c1f030..3a8ca4b7d 100644
--- a/mod/like.php
+++ b/mod/like.php
@@ -101,9 +101,7 @@ function like_content(&$a) {
intval($r[0]['id'])
);
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
- //proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"like\" \"$post_id\" &", array(),$foo));
- proc_run($php_path,"include/notifier.php","like","$post_id");
+ proc_run('php',"include/notifier.php","like","$post_id");
return;
}
@@ -173,11 +171,7 @@ EOT;
);
}
-
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
-
- //proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"like\" \"$post_id\" &", array(),$foo));
- proc_run($php_path,"include/notifier.php","like","$post_id");
+ proc_run('php',"include/notifier.php","like","$post_id");
return; // NOTREACHED
} \ No newline at end of file
diff --git a/mod/message.php b/mod/message.php
index ef3be2c5e..466b0befa 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -96,16 +96,9 @@ function message_post(&$a) {
}
}
}
-
-
-
-
-
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
if($post_id) {
- //proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"mail\" \"$post_id\" &", array(),$foo));
- proc_run($php_path,"include/notifier.php","mail","$post_id");
+ proc_run('php',"include/notifier.php","mail","$post_id");
notice( t('Message sent.') . EOL );
}
else {
diff --git a/mod/network.php b/mod/network.php
index 79a2f2b38..68c9656e5 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -354,7 +354,7 @@ function network_content(&$a, $update = 0) {
));
}
- $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id']));
+ $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete')));
@@ -412,7 +412,11 @@ function network_content(&$a, $update = 0) {
$tmp_item = replace_macros($template,array(
'$id' => $item['item_id'],
- '$title' => t('View $name\'s profile'),
+ '$linktitle' => t('View $name\'s profile'),
+ '$olinktitle' => t('View $owner_name\'s profile'),
+ '$to' => t('to'),
+ '$wall' => t('Wall-to-Wall'),
+ '$vwall' => t('via Wall-To-Wall:'),
'$profile_url' => $profile_link,
'$name' => $profile_name,
'$thumb' => $profile_avatar,
diff --git a/mod/photos.php b/mod/photos.php
index d4835ba5e..c1c6a4133 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -182,13 +182,11 @@ foreach($_FILES AS $key => $val) {
);
$drop_id = intval($rr['id']);
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
// send the notification upstream/downstream as the case may be
if($rr['visible'])
- //proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"drop\" \"$drop_id\" & ",array(),$foo));
- proc_run($php_path,"include/notifier.php","drop","$drop_id");
+ proc_run('php',"include/notifier.php","drop","$drop_id");
}
}
}
@@ -232,11 +230,9 @@ foreach($_FILES AS $key => $val) {
$url = $a->get_baseurl();
$drop_id = intval($i[0]['id']);
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
if($i[0]['visible'])
- //proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"drop\" \"$drop_id\" & ", array(),$foo));
- proc_run($php_path,"include/notifier.php","drop","$drop_id");
+ proc_run('php',"include/notifier.php","drop","$drop_id");
}
}
@@ -474,9 +470,8 @@ foreach($_FILES AS $key => $val) {
$arr['target'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . '" />' . "\n" . '<link rel="preview" type="image/jpeg" href="' . $a->get_baseurl() . "/photo/" . $p[0]['resource-id'] . '-' . $best . '.jpg' . '" />') . '</link></target>';
$item_id = item_store($arr);
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
- //proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"tag\" \"$item_id\" & ",array(),$foo));
- proc_run($php_path,"include/notifier.php","tag","$item_id");
+ if($item_id)
+ proc_run('php',"include/notifier.php","tag","$item_id");
}
}
@@ -1153,7 +1148,7 @@ function photos_content(&$a) {
$drop = '';
if(($item['contact-id'] == remote_user()) || ($item['uid'] == local_user()))
- $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id']));
+ $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete')));
$o .= replace_macros($template,array(
diff --git a/mod/profile.php b/mod/profile.php
index 46d13298e..15a3a861f 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -339,7 +339,7 @@ function profile_content(&$a, $update = 0) {
if(($item['contact-id'] == remote_user()) || ($item['uid'] == local_user()))
$dropping = true;
- $drop = replace_macros((($dropping)? $droptpl : $fakedrop), array('$id' => $item['id']));
+ $drop = replace_macros((($dropping)? $droptpl : $fakedrop), array('$id' => $item['id'], '$delete' => t('Delete')));
$like = ((isset($alike[$item['id']])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');
@@ -360,7 +360,7 @@ function profile_content(&$a, $update = 0) {
$tmp_item = replace_macros($template,array(
'$id' => $item['item_id'],
- '$title' => t('View $name\'s profile'),
+ '$linktitle' => t('View $name\'s profile'),
'$profile_url' => $profile_link,
'$name' => $profile_name,
'$thumb' => $profile_avatar,
diff --git a/mod/profile_photo.php b/mod/profile_photo.php
index 4f0d567f4..0f84a85c9 100644
--- a/mod/profile_photo.php
+++ b/mod/profile_photo.php
@@ -87,11 +87,9 @@ function profile_photo_post(&$a) {
);
// Update global directory in background
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
$url = $_SESSION['my_url'];
if($url && strlen(get_config('system','directory_submit_url')))
- //proc_close(proc_open("\"$php_path\" \"include/directory.php\" \"$url\" &",array(),$foo));
- proc_run($php_path,"include/directory.php","$url");
+ proc_run('php',"include/directory.php","$url");
}
else
notice( t('Unable to process image') . EOL);
@@ -169,11 +167,9 @@ function profile_photo_content(&$a) {
);
// Update global directory in background
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
$url = $_SESSION['my_url'];
if($url && strlen(get_config('system','directory_submit_url')))
- //proc_close(proc_open("\"$php_path\" \"include/directory.php\" \"$url\" &",array(),$foo));
- proc_run($php_path,"include/directory.php","$url");
+ proc_run('php',"include/directory.php","$url");
goaway($a->get_baseurl() . '/profiles');
return; // NOTREACHED
diff --git a/mod/profiles.php b/mod/profiles.php
index d74219501..4e3f03799 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -200,11 +200,9 @@ function profiles_post(&$a) {
if($is_default) {
// Update global directory in background
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
$url = $_SESSION['my_url'];
if($url && strlen(get_config('system','directory_submit_url')))
- //proc_close(proc_open("\"$php_path\" \"include/directory.php\" \"$url\" &", array(),$foo));
- proc_run($php_path,"include/directory.php","$url");
+ proc_run('php',"include/directory.php","$url");
}
}
}
diff --git a/mod/register.php b/mod/register.php
index d97b3e0cd..97038def0 100644
--- a/mod/register.php
+++ b/mod/register.php
@@ -291,6 +291,12 @@ function register_post(&$a) {
}
}
+ if($netpublish && $a->config['register_policy'] != REGISTER_APPROVE) {
+ $url = $a->get_baseurl() . "/profile/$nickname";
+ proc_run('php',"include/directory.php","$url");
+ }
+
+
if( $a->config['register_policy'] == REGISTER_OPEN ) {
$email_tpl = load_view_file("view/register_open_eml.tpl");
$email_tpl = replace_macros($email_tpl, array(
@@ -348,13 +354,6 @@ function register_post(&$a) {
}
- if($netpublish && $a->config['register_policy'] != REGISTER_APPROVE) {
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
- $url = $a->get_baseurl() . "/profile/$nickname";
- if($url && strlen(get_config('system','directory_submit_url')))
- proc_run($php_path,"include/directory.php","$url");
-
- }
return;
}}
diff --git a/mod/regmod.php b/mod/regmod.php
index f662902d8..00cfa06e2 100644
--- a/mod/regmod.php
+++ b/mod/regmod.php
@@ -74,10 +74,9 @@ function regmod_content(&$a) {
intval($user[0]['uid'])
);
if(count($r) && $r[0]['net-publish']) {
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
$url = $a->get_baseurl() . '/profile/' . $user[0]['nickname'];
if($url && strlen(get_config('system','directory_submit_url')))
- proc_run($php_path,"include/directory.php","$url");
+ proc_run('php',"include/directory.php","$url");
}
$email_tpl = load_view_file("view/register_open_eml.tpl");
diff --git a/mod/settings.php b/mod/settings.php
index dbbac8bde..ebe07612e 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -179,11 +179,9 @@ function settings_post(&$a) {
if($old_visibility != $net_publish) {
// Update global directory in background
- $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
$url = $_SESSION['my_url'];
if($url && strlen(get_config('system','directory_submit_url')))
- //proc_close(proc_open("\"$php_path\" \"include/directory.php\" \"$url\" &",array(),$foo));
- proc_run($php_path,"include/directory.php","$url");
+ proc_run('php',"include/directory.php","$url");
}
$_SESSION['theme'] = $theme;