Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion doitphp/core/Configure.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
exit();
}

define('CONFIG_DIR', APP_ROOT . 'application/config/');

abstract class Configure {

/*
Expand Down Expand Up @@ -265,4 +267,4 @@ private static function _getDefaultConfig() {

return $defaultConfig;
}
}
}
8 changes: 6 additions & 2 deletions doitphp/core/Controller.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,11 @@ protected static function _stripSlashes($data = array()) {
return stripslashes($data);
}

return array_map(array($this, '_stripSlashes'), $data);
foreach($data as &$_val){
$_val = stripcslashes($_val);
}

return $data;
}

/**
Expand Down Expand Up @@ -798,4 +802,4 @@ public function __call($method, $args) {
$this->halt('The method: ' . $method . '() is not found in ' . get_class($this) . ' class!', 'Normal');
}
}
}
}
4 changes: 2 additions & 2 deletions doitphp/core/Model.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ protected function _parseLimit($startId = null, $listNum = null) {
}
}

$limitString = "LIMIT" . (($listNum) ? "{$startId},{$listNum}" : $startId);
$limitString = "LIMIT " . (($listNum) ? "{$startId},{$listNum}" : $startId);

return $limitString;
}
Expand Down Expand Up @@ -1674,4 +1674,4 @@ public static function getInstance() {

return self::$_instance;
}
}
}
6 changes: 3 additions & 3 deletions doitphp/library/Check.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ public static function isMust($string = null) {

//参数分析
if (is_null($string)) {
return false;
return true;
}

return is_null($string) ? false : true;
return is_null($string) ? true : false;
}

/**
Expand All @@ -196,4 +196,4 @@ public static function isLength($string = null, $min = 0, $max = 255) {

return (($length >= (int)$min) && ($length <= (int)$max)) ? true : false;
}
}
}