version 0.4 (2)

fixed : checkbox bug
This commit is contained in:
Stan Ozier 2010-06-02 09:24:17 +02:00
parent 90dd924ee4
commit 9fed30a54b
3 changed files with 6 additions and 4 deletions

View File

@ -89,9 +89,9 @@ class Task extends AppController {
public function mainReaction() {
// drop if no checkbox have been checked
if (!isset($_POST['chk'])) {
if (!$this->fc->chkReqVar('chk')) {
// -TODO- show error
$this->fc->redirect(APP_WWW_URI.'task/main/','please check at least one task');
$this->fc->redirect(APP_WWW_URI.'task/main/','please mark at least one task');
}
// check action request
$action = $this->fc->chkReqVar('report,open,close,valid,archive,unarchive');

View File

@ -57,7 +57,7 @@ class TaskModel extends Model {
}
ArrayHelper::arrayTrim($arr);
$obj = new TaskModel();
$tst = substr($arr[1],0,1);
$tst = substr($arr[2],0,1);
switch ($tst) {
case '*': // multiple
if ($arr[1] == '**') {

View File

@ -251,7 +251,9 @@ class FrontController extends HelpableSingleton {
foreach ($arrReq as $var) {
if (count($GLOBALS[$var])) {
foreach($GLOBALS[$var] as $key => $val) {
$GLOBALS[$var][$key] = stripslashes($val);
if (is_string($val)) {
$GLOBALS[$var][$key] = stripslashes($val);
}
}
}
}