Море мелких исправлений и недоработок, найденных анализатором кода. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@532 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
glix08 2013-08-02 20:28:44 +00:00
commit 9b74caa6d0
20 changed files with 41 additions and 106 deletions

View file

@ -1,6 +1,6 @@
<?php
$mysql_host = 'localhost';
$mysql_user = 'user';
$mysql_pass = 'user';
$mysql_db = 'forum';
?>

View file

@ -288,7 +288,7 @@ else
ORDER BY c.cat_order";
if( !($result = DB()->sql_query($sql)) )
{
message_die(general_error, 'Could not query categories list', '', __line__, __file__, $sql);
message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}
$category_rows = DB()->sql_fetchrowset($result);

View file

@ -1180,7 +1180,6 @@ else
$order = 'DESC';
$o_order = 'ASC';
break;
case 'DESC':
default:
$o_order = 'DESC';
$order = 'ASC';

View file

@ -20,6 +20,7 @@ if (defined('ATTACH_INSTALL'))
/**
* wrapper function for determining the correct language directory
*/
/** @noinspection PhpInconsistentReturnPointsInspection */
function attach_mod_get_lang($language_file)
{
global $attach_config, $bb_cfg;

View file

@ -1,51 +1,5 @@
<?php
/**
* Database
* Cache
- Tracker Cache
- Forum Cache
- Session Cache
- Datastore
* Tracker
* Torrents
- Ratio limits
- Seeding torrents limit
- DL-Status (days to keep)
- Tor-Stats (days to keep)
- Tor-Help
* Path
* Language
* Templates
* Cookie
* Server
- Server load
- Backup
- GZip
* Sessions
* Registration
* Email
* AJAX
* Debug
* Special users (dbg_users, unlimited_users, super_admins)
* LOG
* Error reporting
* Subforums
* Forums
* Topics
* Posts
* Search
* Actions log
* Users
* GroupCP
* Ads
* Misc
* Captcha
**/
if (!defined('BB_ROOT')) die(basename(__FILE__));
$bb_cfg = $tr_cfg = $page_cfg = array();
@ -57,7 +11,7 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.5 (unstable)';
$bb_cfg['tp_release_date'] = '02-08-2013';
$bb_cfg['tp_release_state'] = 'R531';
$bb_cfg['tp_release_state'] = 'R532';
// Database
$charset = 'utf8';
@ -96,7 +50,6 @@ $bb_cfg['cache']['engines'] = array(
'bb_cache' => array('filecache', array()),
'tr_cache' => array('filecache', array()),
'session_cache' => array('filecache', array()),
'bb_cap_sid' => array('filecache', array()),
'bb_login_err' => array('filecache', array()),
);

View file

@ -21,15 +21,16 @@ function make_OpenInEditor_js ($file, $line)
}
/**
* Show source part of the file
* @param string $file Filename
* @param int $line Line to read
* @param int $prev How many lines before main line to read
* @param int $next How many lines after main line to read
* @return string
* @access public
* @package ErrorHandler
*/
* Show source part of the file
* @param string $file Filename
* @param int $line Line to read
* @param int $prev How many lines before main line to read
* @param int $next How many lines after main line to read
* @param bool $add_view_full_link
* @return string
* @access public
* @package ErrorHandler
*/
function showSource ($file, $line, $prev = 10, $next = 10, $add_view_full_link = true)
{
if (!(file_exists($file) && is_file($file)))

View file

@ -291,14 +291,17 @@ function strip_quotes ($text)
// #############################################################################
/**
* Strips away bbcode from a given string, leaving plain text
*
* @param string Text to be stripped of bbcode tags
* @param boolean If true, strip away quote tags AND their contents
* @param boolean If true, use the fast-and-dirty method rather than the shiny and nice method
*
* @return string
*/
* Strips away bbcode from a given string, leaving plain text
*
* @param string Text to be stripped of bbcode tags
* @param bool $stripquotes
* @param bool $fast_and_dirty
* @param bool $showlinks
* @internal param \If $boolean true, strip away quote tags AND their contents
* @internal param \If $boolean true, use the fast-and-dirty method rather than the shiny and nice method
*
* @return string
*/
function strip_bbcode ($message, $stripquotes = true, $fast_and_dirty = false, $showlinks = true)
{
$find = array();

View file

@ -1073,6 +1073,7 @@ class Template {
array_splice($tokens, $is_arg_start, count($tokens), $new_tokens);
$i = $is_arg_start;
break;
default:
$pattern = '@^

View file

@ -101,4 +101,3 @@ else
}
print_page('usercp_topic_watch.tpl');
?>

View file

@ -15,5 +15,3 @@ $lang['REPORT_TYPE'] = 'General report';
$lang['WRITE_REPORT'] = 'Write report';
$lang['WRITE_REPORT_EXPLAIN'] = 'Use this form to send a message to the team.';
$lang['AUTH_WRITE_ERROR'] = 'You don\'t have the permission to write reports.';
?>

View file

@ -21,5 +21,3 @@ $lang['DUPLICATE_ERROR'] = 'The selected post has already been reported.';
$lang['DELETED_ERROR'] = 'The reported post was deleted.';
$lang['CLICK_RETURN'] = '%sClick here%s to return to the post.';
?>

View file

@ -25,5 +25,3 @@ $lang['DUPLICATE_ERROR'] = 'The private message has already been reported.';
$lang['DELETED_ERROR'] = 'The reported private message was deleted.';
$lang['CLICK_RETURN'] = '%sClick here%s to return to the private message.';
?>

View file

@ -21,5 +21,3 @@ $lang['DUPLICATE_ERROR'] = 'The selected topic has already been reported.';
$lang['DELETED_ERROR'] = 'The reported topic was deleted.';
$lang['CLICK_RETURN'] = '%sClick here%s to return to the topic.';
?>

View file

@ -19,5 +19,3 @@ $lang['AUTH_WRITE_ERROR'] = 'You don\'t have the permission to report users.';
$lang['DELETED_ERROR'] = 'The selected user was deleted.';
$lang['CLICK_RETURN'] = '%sClick here%s to return to the user\'s profile.';
?>

View file

@ -15,5 +15,3 @@ $lang['REPORT_TYPE'] = 'Общие нарушения';
$lang['WRITE_REPORT'] = 'Сообщить о нарушении';
$lang['WRITE_REPORT_EXPLAIN'] = 'Используйте эту форму для отправки сообщения команде администраторов и модераторов.';
$lang['AUTH_WRITE_ERROR'] = 'У вас нет прав для отправки сообщений о нарушениях.';
?>

View file

@ -21,5 +21,3 @@ $lang['DUPLICATE_ERROR'] = 'О нарушениях в выбранных соо
$lang['DELETED_ERROR'] = 'Сообщение с нарушением удалено.';
$lang['CLICK_RETURN'] = '%sНажмите%s для возврата к сообщению в теме.';
?>

View file

@ -25,5 +25,3 @@ $lang['DUPLICATE_ERROR'] = 'О нарушении уже сообщено.';
$lang['DELETED_ERROR'] = 'Личное сообщение с нарушением удалено.';
$lang['CLICK_RETURN'] = '%sНажмите%s для возврата к личному сообщению.';
?>

View file

@ -21,5 +21,3 @@ $lang['DUPLICATE_ERROR'] = 'О нарушении уже сообщено.';
$lang['DELETED_ERROR'] = 'Тема с нарушением удалена.';
$lang['CLICK_RETURN'] = '%sНажмите%s для возврата в тему.';
?>

View file

@ -19,5 +19,3 @@ $lang['AUTH_WRITE_ERROR'] = 'У вас нет прав для отправки
$lang['DELETED_ERROR'] = 'Выбранный пользователь удален.';
$lang['CLICK_RETURN'] = '%sНажмите%s для возврата в профиль пользователя.';
?>

View file

@ -31,5 +31,3 @@ foreach($sql as $i => $query) {
$row = mysql_fetch_row($res);
echo "<li>{$titles[$i]} - <b>{$row[0]}</b>";
}
?>