diff --git a/doitphp/core/Configure.class.php b/doitphp/core/Configure.class.php index fb48792..4649eac 100644 --- a/doitphp/core/Configure.class.php +++ b/doitphp/core/Configure.class.php @@ -15,6 +15,8 @@ exit(); } +define('CONFIG_DIR', APP_ROOT . 'application/config/'); + abstract class Configure { /* @@ -265,4 +267,4 @@ private static function _getDefaultConfig() { return $defaultConfig; } -} \ No newline at end of file +} diff --git a/doitphp/core/Controller.class.php b/doitphp/core/Controller.class.php index 905e18c..791b781 100644 --- a/doitphp/core/Controller.class.php +++ b/doitphp/core/Controller.class.php @@ -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; } /** @@ -798,4 +802,4 @@ public function __call($method, $args) { $this->halt('The method: ' . $method . '() is not found in ' . get_class($this) . ' class!', 'Normal'); } } -} \ No newline at end of file +} diff --git a/doitphp/core/Model.class.php b/doitphp/core/Model.class.php index e047f64..c09c022 100644 --- a/doitphp/core/Model.class.php +++ b/doitphp/core/Model.class.php @@ -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; } @@ -1674,4 +1674,4 @@ public static function getInstance() { return self::$_instance; } -} \ No newline at end of file +} diff --git a/doitphp/library/Check.class.php b/doitphp/library/Check.class.php index 99db7c3..a9281da 100644 --- a/doitphp/library/Check.class.php +++ b/doitphp/library/Check.class.php @@ -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; } /** @@ -196,4 +196,4 @@ public static function isLength($string = null, $min = 0, $max = 255) { return (($length >= (int)$min) && ($length <= (int)$max)) ? true : false; } -} \ No newline at end of file +}