Elgg  Version 1.9
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  $table_content .= "<tr><td>$name</td><td>$friendly_time</td><td>$date</td><tr>";
22 }
23 
24 $period_hd = elgg_echo('admin:cron:period');
25 $friendly_hd = elgg_echo('admin:cron:friendly');
26 $date_hd = elgg_echo('admin:cron:date');
27 
28 $table = <<<HTML
29 <table class="elgg-table">
32 </table>
33 HTML;
34 
35 echo elgg_view_module('inline', elgg_echo('admin:cron:record'), $table);
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
elgg_get_site_entity($site_guid=0)
Get an ElggSite entity (default is current site)
Definition: sites.php:18
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1197
$table
Definition: cron.php:28
if($guid==elgg_get_logged_in_user_guid()) $name
Definition: delete.php:21
$date_hd
Definition: cron.php:26
if($owner) $date
Definition: default.php:35
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_friendly_time($time)
Displays a UNIX timestamp in a friendly way.
Definition: views.php:1126
$key
Definition: summary.php:34
th
Definition: admin.php:63
$table_content
Definition: cron.php:8
elgg echo
Translates a string.
Definition: languages.js:43
$periods
Cron statistics.
Definition: cron.php:7
$friendly_hd
Definition: cron.php:25
$friendly_time
Friendly time Translates an epoch time into a human-readable time.
Definition: friendlytime.php:9
elgg table alt tr
Definition: admin.php:412
table
Definition: admin.php:59
foreach($periods as $period) $period_hd
Definition: cron.php:24