From: Leberwurscht Date: Mon, 16 Apr 2012 19:04:45 +0000 (+0200) Subject: jappixmini: warn if cron job does not get executed X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a53167da1a68b977ba5a67342dfa17fd7e8a2974;p=friendica-addons.git jappixmini: warn if cron job does not get executed --- diff --git a/jappixmini/jappixmini.php b/jappixmini/jappixmini.php index f476753a..88233063 100644 --- a/jappixmini/jappixmini.php +++ b/jappixmini/jappixmini.php @@ -106,6 +106,10 @@ function jappixmini_plugin_admin(&$a, &$o) { $o .= '

Jappix is installed.

'; } + // warn if cron job has not yet been executed + $cron_run = get_config("jappixmini", "last_cron_execution"); + if (!$cron_run) $o .= "

Warning: The cron job has not yet been executed. If this message is still there after some time (usually 10 minutes), this means that autosubscribe and autoaccept will not work.

"; + // info text field $o .= '
'; $info_text = get_config("jappixmini", "infotext"); @@ -472,6 +476,8 @@ function jappixmini_login(&$a, &$o) { function jappixmini_cron(&$a, $d) { // For autosubscribe/autoapprove, we need to maintain a list of jabber addresses of our contacts. + set_config("jappixmini", "last_cron_execution", $d); + if (!file_exists("addon/jappixmini/jappix")) return; // go through list of users with jabber enabled