init() returns boolean success value

darcs-hash:20081202040549-5ed1f-b23a6b80b6e1823a97a7b446d9c4e59f8744b904.gz
This commit is contained in:
Evan Prodromou 2008-12-01 23:05:49 -05:00
parent d268703d69
commit 09a9b76ffe
2 changed files with 4 additions and 2 deletions

View File

@ -52,8 +52,9 @@ if (file_exists($actionfile)) {
}
$config['db']['database'] = $mirror;
}
call_user_func(array($action_obj, 'init'), $_REQUEST);
call_user_func(array($action_obj, 'handle'), $_REQUEST);
if (call_user_func(array($action_obj, 'init'), $_REQUEST)) {
call_user_func(array($action_obj, 'handle'), $_REQUEST);
}
} else {
common_user_error(_('Unknown action'));
}

View File

@ -30,6 +30,7 @@ class Action { // lawsuit
function init($argarray) {
$this->args =& common_copy_args($argarray);
return true;
}
# For comparison with If-Last-Modified