1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-05 10:28:19 +03:00

some fixes

This commit is contained in:
Mzhelskiy Maxim 2010-01-06 20:53:38 +00:00
parent 8cd64c548c
commit 2aba687c36
12 changed files with 36 additions and 34 deletions

View file

@ -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;
?>

View file

@ -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();
}

View file

@ -31,7 +31,7 @@
* Parsing code is partially grabbed from PEAR DB class,
* initial author: Tomas V.V.Cox <cox@idecnet.com>.
*
* Ñontains 3 classes:
* <EFBFBD>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 <EFBFBD>tmp, because don't know the value of auto-index
}
}
$current = $row; // save the row in last dimension

View file

@ -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;
}

View file

@ -114,13 +114,9 @@ class LsDatabase extends Module {
function databaseErrorHandler($message, $info) {
/**
* Записываем информацию об ошибке в переменную $msg
*/
ob_start();
echo "SQL Error: $message<br>\n";
print_r($info);
$msg=ob_get_contents();
ob_end_clean();
*/
$msg="SQL Error: $message<br>\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 запрос
*/

View file

@ -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);
}

View file

@ -154,7 +154,7 @@ function smarty_function_date_format($aParams,&$oSmarty) {
: $sMonth[$iDeclinationDefault];
}
$sFormat=preg_replace("~(?<!\\\\)F~U",preg_replace('~(\pL{1})~u','\\\${1}',$sMonth),$sFormat);
$sFormat=preg_replace("~(?<!\\\\)F~U",preg_replace('~(\w{1})~u','\\\${1}',$sMonth),$sFormat);
return date($sFormat,$iDate);
}

View file

@ -54,8 +54,8 @@ if (Router::GetIsShowStats() and $oUser and $oUser->isAdministrator()) {
<ul>
<li>
<b>MySql</b> <br>
&nbsp;&nbsp;&nbsp;query: <?echo($aStats['sql']['count']);?><br>
&nbsp;&nbsp;&nbsp;time: <?echo($aStats['sql']['time']);?><br><br><br>
&nbsp;&nbsp;&nbsp;query: <?php echo($aStats['sql']['count']);?><br>
&nbsp;&nbsp;&nbsp;time: <?php echo($aStats['sql']['time']);?><br><br><br>
</li>
</ul>
</td>
@ -63,10 +63,10 @@ if (Router::GetIsShowStats() and $oUser and $oUser->isAdministrator()) {
<ul>
<li>
<b>Cache</b> <br>
&nbsp;&nbsp;&nbsp;query: <?echo($aStats['cache']['count']);?><br>
&nbsp;&nbsp;&nbsp;query: <?php echo($aStats['cache']['count']);?><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set: <?echo($aStats['cache']['count_set']);?><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get: <?echo($aStats['cache']['count_get']);?><br>
&nbsp;&nbsp;&nbsp;time: <?echo(round($aStats['cache']['time'],5));?>
&nbsp;&nbsp;&nbsp;time: <?php echo(round($aStats['cache']['time'],5));?>
</li>
</ul>
</td>
@ -74,8 +74,8 @@ if (Router::GetIsShowStats() and $oUser and $oUser->isAdministrator()) {
<ul>
<li>
<b>PHP</b> <br>
&nbsp;&nbsp;&nbsp;time load modules:<?echo($aStats['engine']['time_load_module']);?><br>
&nbsp;&nbsp;&nbsp;full time:<?echo(round($t2-$t1,3));?><br><br><br>
&nbsp;&nbsp;&nbsp;time load modules:<?php echo($aStats['engine']['time_load_module']);?><br>
&nbsp;&nbsp;&nbsp;full time:<?php echo(round($t2-$t1,3));?><br><br><br>
</li>
</ul>
</td>

View file

@ -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` ;
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;

View file

@ -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` ;
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;

View file

@ -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 уже используется',

View file

@ -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;
}