Elgg  Version 2.3
cron.php
Go to the documentation of this file.
1 <?php
6 //$cronhooks = $CONFIG->hooks["cron"];
7 $periods = elgg_get_config('elgg_cron_periods');
9 foreach ($periods as $period) {
10  $name = elgg_echo("interval:$period");
11  $key = "cron_latest:$period:ts";
12  $ts = elgg_get_site_entity()->getPrivateSetting($key);
13  if ($ts) {
15  $date = date('r', $ts);
16  } else {
17  $friendly_time = elgg_echo('never');
18  $date = '';
19  }
20 
21  $msg_key = "cron_latest:$period:msg";
22  $msg = elgg_get_site_entity()->getPrivateSetting($msg_key);
23  if ($msg) {
24  $msg = nl2br($msg);
25  }
26  $table_content .= "<tr><td>$name</td><td>$friendly_time</td><td>$date</td><td>$msg</td><tr>";
27 }
28 
29 $period_hd = elgg_echo('admin:cron:period');
30 $friendly_hd = elgg_echo('admin:cron:friendly');
31 $date_hd = elgg_echo('admin:cron:date');
32 $msg_hd = elgg_echo('admin:cron:msg');
33 
34 $table = <<<HTML
35 <table class="elgg-table">
38 </table>
39 HTML;
40 
41 echo elgg_view_module('inline', elgg_echo('admin:cron:record'), $table);
$msg_hd
Definition: cron.php:32
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
elgg_get_site_entity($site_guid=0)
Get an entity (default is current site)
Definition: sites.php:18
$table
Definition: cron.php:34
if($guid==elgg_get_logged_in_user_guid()) $name
Definition: delete.php:21
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
th
Definition: admin.css.php:63
$date_hd
Definition: cron.php:31
if($owner) $date
Definition: default.php:35
$key
Definition: summary.php:34
$table_content
Definition: cron.php:8
table
Definition: admin.css.php:59
elgg echo
Translates a string.
Definition: languages.js:48
elgg table alt tr
Definition: admin.css.php:424
$periods
Cron statistics.
Definition: cron.php:7
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1250
$friendly_hd
Definition: cron.php:30
$friendly_time
Friendly time Translates an epoch time into a human-readable time.
Definition: friendlytime.php:9
elgg_view_friendly_time($time)
Displays a UNIX timestamp in a friendly way.
Definition: views.php:1176
foreach($periods as $period) $period_hd
Definition: cron.php:29