Some cleanup, setup improvements and other misc items

This commit is contained in:
Deon George
2013-10-09 16:43:41 +11:00
parent 638d123739
commit c473bf6e7d
54 changed files with 477 additions and 3991 deletions

View File

@@ -1,7 +1,7 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides Admin TASK management
* This class provides TASK management
*
* @package Task
* @category Controllers

View File

@@ -1,7 +1,7 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* List all Active Tasks defined in the DB
* List all Tasks defined in the DB
*
* @package Task
* @category Tasks
@@ -9,15 +9,24 @@
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Task_Task_Listactive extends Minion_Task {
class Task_Task_List extends Minion_Task {
protected $_options = array(
'active'=>0, // Show only active services
);
protected function _execute(array $params) {
$header = "%2s %30s %21s %21s %40s\n";
$header = "%2s %1s %30s %21s %21s %40s\n";
$output = sprintf($header,'ID','Command','Last Run','Next Run','Description');
$output = sprintf($header,'ID','?','Command','Last Run','Next Run','Description');
foreach (ORM::factory('Task')->list_active() as $to)
$t = ORM::factory('Task');
if ($params['active'])
$t->where_active();
foreach ($t->find_all() as $to)
$output .= sprintf($header,
$to->id,
$to->status ? 'A' : 'I',
$to->command,
$to->display('date_run'),
$to->next_run(TRUE),