fix when edit a category, log function improves, fix in login css
This commit is contained in:
parent
e57420e7a5
commit
767c421858
|
@ -94,8 +94,8 @@ class dbList extends dbJSON
|
|||
// $args => 'name', 'oldkey', 'newKey', 'template'
|
||||
public function edit($args)
|
||||
{
|
||||
if (isset($this->db[$args['newKey']])) {
|
||||
Log::set(__METHOD__.LOG_SEP.'The new key already exists. Key: '.$args['newKey']);
|
||||
if ( isset($this->db[$args['newKey']]) && ($args['newKey']!==$args['oldKey']) ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'The new key already exists. Key: '.$args['newKey'], LOG_TYPE_WARN);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,10 +12,9 @@
|
|||
<!-- CSS -->
|
||||
<?php
|
||||
echo Theme::bootstrapCSS();
|
||||
|
||||
echo Bootstrap::css(array(
|
||||
echo Theme::css(array(
|
||||
'bludit.css'
|
||||
));
|
||||
), DOMAIN_ADMIN_THEME_CSS);
|
||||
?>
|
||||
|
||||
<!-- Javascript -->
|
||||
|
|
|
@ -5,8 +5,11 @@
|
|||
If you are going to change some variable from here is recommended do it before the installation
|
||||
*/
|
||||
|
||||
// Log separator
|
||||
// Log
|
||||
define('LOG_SEP', ' | ');
|
||||
define('LOG_TYPE_INFO', '[INFO]');
|
||||
define('LOG_TYPE_WARN', '[WARN]');
|
||||
define('LOG_TYPE_ERROR', '[ERROR]');
|
||||
|
||||
// Protecting against Symlink attacks
|
||||
define('CHECK_SYMBOLIC_LINKS', TRUE);
|
||||
|
|
|
@ -2,18 +2,20 @@
|
|||
|
||||
class Log {
|
||||
|
||||
public static function set($text, $type=0)
|
||||
public static function set($text, $type=LOG_TYPE_INFO)
|
||||
{
|
||||
$messageType = 0;
|
||||
|
||||
if (is_array($text) ) {
|
||||
error_log('------------------------', $type);
|
||||
error_log('Array', $type);
|
||||
error_log('------------------------', $type);
|
||||
error_log('------------------------', $messageType);
|
||||
error_log('Array', $messageType);
|
||||
error_log('------------------------', $messageType);
|
||||
foreach ($text as $key=>$value) {
|
||||
error_log($key.'=>'.$value, $type);
|
||||
error_log($key.'=>'.$value, $messageType);
|
||||
}
|
||||
error_log('------------------------', $type);
|
||||
error_log('------------------------', $messageType);
|
||||
}
|
||||
error_log('('.BLUDIT_VERSION.') ('.$_SERVER['REQUEST_URI'].') '.$text, $type);
|
||||
error_log($type.' ['.BLUDIT_VERSION.'] ['.$_SERVER['REQUEST_URI'].'] '.$text, $messageType);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -147,9 +147,9 @@ class Text {
|
|||
}
|
||||
|
||||
$string = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $string);
|
||||
$string = trim($string, '-');
|
||||
$string = self::lowercase($string);
|
||||
$string = preg_replace("/[\/_|+ -]+/", $separator, $string);
|
||||
$string = trim($string, '-');
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue