aboutsummaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
Diffstat (limited to 'addon')
-rw-r--r--addon/facebook/facebook.php2
-rw-r--r--addon/piwik/piwik.php7
-rw-r--r--addon/poormancron/poormancron.php20
3 files changed, 27 insertions, 2 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index 47e7691e4..ed59daff6 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -395,6 +395,8 @@ function facebook_cron($a,$b) {
$r = q("SELECT * FROM `pconfig` WHERE `cat` = 'facebook' AND `k` = 'post' AND `v` = '1' ORDER BY RAND() ");
if(count($r)) {
foreach($r as $rr) {
+ if(get_pconfig($rr['uid'],'facebook','no_linking'))
+ continue;
// check for new friends once a day
$last_friend_check = get_pconfig($rr['uid'],'facebook','friend_check');
if($last_friend_check)
diff --git a/addon/piwik/piwik.php b/addon/piwik/piwik.php
index 8389416e9..890309d4f 100644
--- a/addon/piwik/piwik.php
+++ b/addon/piwik/piwik.php
@@ -66,7 +66,12 @@ function piwik_analytics($a,&$b) {
* otherwise just include the above code into the page.
*/
if ($optout) {
- $b .= "<div id='piwik-optout-link'>This website is tracked using the <a href='http://www.piwik.org'>Piwik</a> analytics tool. If you do not want that your visits are logged this way you <a href='http://". $baseurl ."index.php?module=CoreAdminHome&action=optOut'>can set a cookie to prevent Piwik from tracking further visits of the site</a> (opt-out).</div>";
+ $b .= "<div id='piwik-optout-link'>";
+ $b .= t("This website is tracked using the <a href='http://www.piwik.org'>Piwik</a> analytics tool.");
+ $b .= " ";
+ $the_url = "http://".$baseurl ."index.php?module=CoreAdminHome&action=optOut";
+ $b .= sprintf(t("If you do not want that your visits are logged this way you <a href='%s'>can set a cookie to prevent Piwik from tracking further visits of the site</a> (opt-out)."), $the_url);
+ $b .= "</div>";
}
}
diff --git a/addon/poormancron/poormancron.php b/addon/poormancron/poormancron.php
index 7611c43be..bbe023cd7 100644
--- a/addon/poormancron/poormancron.php
+++ b/addon/poormancron/poormancron.php
@@ -7,6 +7,21 @@
*/
function poormancron_install() {
+ // check for command line php
+ $a = get_app();
+ $ex = Array();
+ $ex[0] = ((x($a->config,'php_path')) && (strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
+ $ex[1] = dirname(dirname(dirname(__file__)))."/testargs.php";
+ $ex[2] = "test";
+ $out = exec(implode(" ", $ex));
+ if ($out==="test") {
+ set_config('poormancron','usecli',1);
+ logger("poormancron will use cli php");
+ } else {
+ set_config('poormancron','usecli',0);
+ logger("poormancron will NOT use cli php");
+ }
+
register_hook('page_end', 'addon/poormancron/poormancron.php', 'poormancron_hook');
register_hook('proc_run', 'addon/poormancron/poormancron.php','poormancron_procrun');
logger("installed poormancron");
@@ -31,7 +46,10 @@ function poormancron_hook(&$a,&$b) {
}
}
-function poormancron_procrun(&$a, $argv) {
+function poormancron_procrun(&$a, &$arr) {
+ if (get_config('poormancron','usecli')==1) return;
+ $argv = $arr['args'];
+ $arr['run_cmd'] = false;
logger("poormancron procrun ".implode(", ",$argv));
array_shift($argv);
$argc = count($argv);