mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-31 12:10:51 -04:00
Rename Task to Task_Definition to avoid confusion with Task_Model.
Order the finished tasks by update time in the task list.
This commit is contained in:
@@ -59,8 +59,10 @@ class Admin_Maintenance_Controller extends Admin_Controller {
|
||||
$view = new Admin_View("admin.html");
|
||||
$view->content = new View("admin_maintenance.html");
|
||||
$view->content->task_definitions = $this->_get_task_definitions();
|
||||
$view->content->running_tasks = ORM::factory("task")->where("done", 0)->find_all();
|
||||
$view->content->finished_tasks = ORM::factory("task")->where("done", 1)->find_all();
|
||||
$view->content->running_tasks =
|
||||
ORM::factory("task")->where("done", 0)->orderby("updated", "desc")->find_all();
|
||||
$view->content->finished_tasks =
|
||||
ORM::factory("task")->where("done", 1)->orderby("updated", "desc")->find_all();
|
||||
$view->content->csrf = access::csrf_token();
|
||||
print $view;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
class core_task_Core {
|
||||
static function available_tasks() {
|
||||
$dirty_count = graphics::find_dirty_images_query()->count();
|
||||
return array(Task::factory()
|
||||
return array(Task_Definition::factory()
|
||||
->callback("core_task::rebuild_dirty_images")
|
||||
->name(t("Rebuild Images"))
|
||||
->description($dirty_count ?
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
class Task_Core {
|
||||
class Task_Definition_Core {
|
||||
public $callback;
|
||||
public $description;
|
||||
public $name;
|
||||
public $severity;
|
||||
|
||||
static function factory($id) {
|
||||
return new Task();
|
||||
static function factory() {
|
||||
return new Task_Definition();
|
||||
}
|
||||
|
||||
function callback($callback) {
|
||||
Reference in New Issue
Block a user