/** * Show scheduled tasks page * * @param void * @return null */ function scheduled_tasks() { $options = ConfigOptions::findbyNames(array('last_frequently_activity', 'last_hourly_activity', 'last_daily_activity')); $values = array('last_frequently_activity' => (int) $options['last_frequently_activity']->getValue(), 'last_hourly_activity' => (int) $options['last_hourly_activity']->getValue(), 'last_daily_activity' => (int) $options['last_daily_activity']->getValue()); // Convert non-NULL values into date time value objects foreach ($values as $k => $v) { if ($v > 0) { $values[$k] = new DateTimeValue($v); } // if } // foreach $this->smarty->assign($values); }