// Loop through these actions and call what's appropriate for the current time
if (is_array($cronActions)) {
if (count($cronActions) > 0) {
+
$haveCronActions = true;
+ // Sort list by menu then action
function sortCrons($a, $b) {
if ($a['menu'] < $b['menu']) { return -1; }
if ($a['menu'] > $b['menu']) { return 1; }
if ($a['action'] > $b['action']) { return 1; }
return 0;
}
-
usort($cronActions, 'sortCrons');
}
- } else {
- trigger_error('GLM Associate Cron: Bad request array!', E_USER_WARNING);
}
$viewData = array(
<h2>Current Cron Action Requests</h2>
<div> </div>
+{if $haveCronActions}
<table width="90%">
<thead>
<tr>
</tr>
</thead>
<tbody>
-{$m = ''}
-{foreach $cronActions as $ca}
+ {$m = ''}
+ {foreach $cronActions as $ca}
<tr>
<td>
- {if $ca.menu != $m}
- {$m = $ca.menu}
+ {if $ca.menu != $m}
+ {$m = $ca.menu}
{$ca.menu}
- {/if}
+ {/if}
</td>
<td>{$ca.action}</td>
<td>
{if $ca.params}Yes{else} {/if}
</td>
</tr>
-{/foreach}
+ {/foreach}
</tbody>
</table>
-
+{else}
+ <p>(No cron action requests listed)</p>
+{/if}
{include file='admin/footer.html'}