diff --git a/config/config.php b/config/config.php index ba56ae43..d58298b9 100644 --- a/config/config.php +++ b/config/config.php @@ -419,6 +419,7 @@ $config['compress']['js']['use'] = true; // указывает на нео * Установка локали */ setlocale(LC_ALL, "ru_RU.UTF-8"); +date_default_timezone_set('Europe/Moscow'); // See http://php.net/manual/en/timezones.php return $config; ?> \ No newline at end of file diff --git a/engine/include/function.php b/engine/include/function.php index 169d681f..112a088d 100644 --- a/engine/include/function.php +++ b/engine/include/function.php @@ -208,7 +208,8 @@ function func_getIp() { * * @param unknown_type $sLocation */ -function func_header_location($sLocation) { +function func_header_location($sLocation) { + header("HTTP/1.1 301 Moved Permanently"); header('Location: '.$sLocation); exit(); } diff --git a/engine/lib/external/DbSimple/Generic.php b/engine/lib/external/DbSimple/Generic.php index ada09aa2..a0db238a 100644 --- a/engine/lib/external/DbSimple/Generic.php +++ b/engine/lib/external/DbSimple/Generic.php @@ -31,7 +31,7 @@ * Parsing code is partially grabbed from PEAR DB class, * initial author: Tomas V.V.Cox . * - * ontains 3 classes: + * �ontains 3 classes: * - DbSimple_Generic: database factory class * - DbSimple_Generic_Database: common database methods * - DbSimple_Generic_Blob: common BLOB support @@ -110,7 +110,7 @@ class DbSimple_Generic } } } - $object =& new $class($parsed); + $object = new $class($parsed); if (isset($parsed['ident_prefix'])) { $object->setIdentPrefix($parsed['ident_prefix']); } @@ -130,7 +130,7 @@ class DbSimple_Generic fclose($fp); unlink($testFile); require_once 'Cache' . '/Lite.php'; // "." -> no phpEclipse notice - $t =& new Cache_Lite(array('cacheDir' => $dir.'/', 'lifeTime' => null, 'automaticSerialization' => true)); + $t = new Cache_Lite(array('cacheDir' => $dir.'/', 'lifeTime' => null, 'automaticSerialization' => true)); $object->_cacher =& $t; break; } @@ -966,7 +966,7 @@ class DbSimple_Generic_Database extends DbSimple_Generic_LastError $tmp = array(); $current[] =& $tmp; $current =& $tmp; - unset($tmp); // we use tmp, because don't know the value of auto-index + unset($tmp); // we use �tmp, because don't know the value of auto-index } } $current = $row; // save the row in last dimension diff --git a/engine/lib/external/DbSimple/Mysql.php b/engine/lib/external/DbSimple/Mysql.php index 4b189cdf..9634ebf3 100644 --- a/engine/lib/external/DbSimple/Mysql.php +++ b/engine/lib/external/DbSimple/Mysql.php @@ -67,7 +67,7 @@ class DbSimple_Mysql extends DbSimple_Generic_Database function& _performNewBlob($blobid=null) { - $obj =& new DbSimple_Mysql_Blob($this, $blobid); + $obj = new DbSimple_Mysql_Blob($this, $blobid); return $obj; } diff --git a/engine/modules/database/Database.class.php b/engine/modules/database/Database.class.php index 201dae48..20a7c758 100644 --- a/engine/modules/database/Database.class.php +++ b/engine/modules/database/Database.class.php @@ -114,13 +114,9 @@ class LsDatabase extends Module { function databaseErrorHandler($message, $info) { /** * Записываем информацию об ошибке в переменную $msg - */ - ob_start(); - echo "SQL Error: $message
\n"; - print_r($info); - $msg=ob_get_contents(); - ob_end_clean(); - + */ + $msg="SQL Error: $message
\n"; + $msg.=print_r($info,true); /** * Если нужно логировать SQL ошибке то пишем их в лог */ @@ -155,12 +151,8 @@ function databaseLogger($db, $sql) { /** * Получаем информацию о запросе и сохраняем её в переменной $msg */ - $caller = $db->findLibraryCaller(); - ob_start(); - print_r($sql); - $msg=ob_get_contents(); - ob_end_clean(); - + $caller = $db->findLibraryCaller(); + $msg=print_r($sql,true); /** * Получаем ядро и сохраняем в логе SQL запрос */ diff --git a/engine/modules/viewer/Viewer.class.php b/engine/modules/viewer/Viewer.class.php index d34b7ab4..3e7e945f 100644 --- a/engine/modules/viewer/Viewer.class.php +++ b/engine/modules/viewer/Viewer.class.php @@ -401,11 +401,13 @@ class LsViewer extends Module { * * @param array $aBlocks */ - public function AddBlocks($sGroup,$aBlocks) { + public function AddBlocks($sGroup,$aBlocks,$ClearBlocks=true) { /** * Удаляем ранее добавленые блоки */ - $this->ClearBlocks($sGroup); + if ($ClearBlocks) { + $this->ClearBlocks($sGroup); + } foreach ($aBlocks as $sBlock) { $this->AddBlock($sGroup,$sBlock); } diff --git a/engine/modules/viewer/plugs/function.date_format.php b/engine/modules/viewer/plugs/function.date_format.php index a4135944..c63f28ff 100644 --- a/engine/modules/viewer/plugs/function.date_format.php +++ b/engine/modules/viewer/plugs/function.date_format.php @@ -154,7 +154,7 @@ function smarty_function_date_format($aParams,&$oSmarty) { : $sMonth[$iDeclinationDefault]; } - $sFormat=preg_replace("~(?isAdministrator()) { @@ -63,10 +63,10 @@ if (Router::GetIsShowStats() and $oUser and $oUser->isAdministrator()) { @@ -74,8 +74,8 @@ if (Router::GetIsShowStats() and $oUser and $oUser->isAdministrator()) { diff --git a/install/convert.sql b/install/convert.sql index ec5e2c75..b9a85249 100644 --- a/install/convert.sql +++ b/install/convert.sql @@ -135,4 +135,6 @@ ALTER TABLE `prefix_user` ADD `user_date_topic_last` DATETIME AFTER `user_dat ALTER TABLE `prefix_user` DROP `user_date_topic_last`; ALTER TABLE `prefix_comment` ADD `target_parent_id` INT DEFAULT '0' NOT NULL AFTER `target_type` ; -ALTER TABLE `prefix_comment_online` ADD `target_parent_id` INT DEFAULT '0' NOT NULL AFTER `target_type` ; \ No newline at end of file +ALTER TABLE `prefix_comment_online` ADD `target_parent_id` INT DEFAULT '0' NOT NULL AFTER `target_type` ; + +ALTER TABLE `prefix_topic` CHANGE `topic_tags` `topic_tags` VARCHAR( 500 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; \ No newline at end of file diff --git a/patch.sql b/patch.sql index 229b8337..d05307a4 100644 --- a/patch.sql +++ b/patch.sql @@ -135,4 +135,6 @@ ALTER TABLE `prefix_user` ADD `user_date_topic_last` DATETIME AFTER `user_dat ALTER TABLE `prefix_user` DROP `user_date_topic_last` ALTER TABLE `prefix_comment` ADD `target_parent_id` INT DEFAULT '0' NOT NULL AFTER `target_type` ; -ALTER TABLE `prefix_comment_online` ADD `target_parent_id` INT DEFAULT '0' NOT NULL AFTER `target_type` ; \ No newline at end of file +ALTER TABLE `prefix_comment_online` ADD `target_parent_id` INT DEFAULT '0' NOT NULL AFTER `target_type` ; + +ALTER TABLE `prefix_topic` CHANGE `topic_tags` `topic_tags` VARCHAR( 500 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; \ No newline at end of file diff --git a/templates/language/russian.php b/templates/language/russian.php index c31a4f96..52ea81c0 100644 --- a/templates/language/russian.php +++ b/templates/language/russian.php @@ -427,10 +427,10 @@ return array( 'registration_confirm_text' => 'Вы почти зарегистрировались, осталось только активировать аккаунт. Инструкции по активации отправлены по электронной почте на адрес, указанный при регистрации.', 'registration' => 'Регистрация', 'registration_is_authorization' => 'Вы уже зарегистрированы у нас и даже авторизованы!', - 'registration_login' => 'Имя пользователя', + 'registration_login' => 'Логин', 'registration_login_error' => 'Неверный логин, допустим от 3 до 30 символов', 'registration_login_error_used' => 'Этот логин уже занят', - 'registration_login_notice' => 'Может состоять только из букв (A-Z a-z), цифр (0-9). Знак подчеркивания (_) лучше не использовать. Длина имени не может быть меньше 3 и больше 30 символов.', + 'registration_login_notice' => 'Может состоять только из букв (A-Z a-z), цифр (0-9). Знак подчеркивания (_) лучше не использовать. Длина логина не может быть меньше 3 и больше 30 символов.', 'registration_mail' => 'Электропочта', 'registration_mail_error' => 'Неверный формат e-mail', 'registration_mail_error_used' => 'Этот e-mail уже используется', diff --git a/templates/skin/new/js/other.js b/templates/skin/new/js/other.js index cb80cbf9..bd3728e7 100644 --- a/templates/skin/new/js/other.js +++ b/templates/skin/new/js/other.js @@ -89,10 +89,12 @@ function showImgUploadForm() { //return true; } if (!winFormImgUpload) { - winFormImgUpload=new StickyWin.Modal({content: $('window_load_img'), closeClassName: 'close-block', useIframeShim: false}); + winFormImgUpload=new StickyWin.Modal({content: $('window_load_img'), closeClassName: 'close-block', useIframeShim: false, modalOptions: {modalStyle:{'z-index':900}}}); } winFormImgUpload.show(); - winFormImgUpload.pin(true); + winFormImgUpload.pin(true); + $$('input[name=img_file]').set('value', ''); + $$('input[name=img_url]').set('value', 'http://'); return false; }