aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-12-14 02:41:33 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-12-14 02:41:33 +0000
commit880013144e2c80490f9b71457a3f0104c2b3a6d2 (patch)
treef396e2bf37edb717ffb87de59f3df4c440bc94b6 /phpBB/includes/functions.php
parentbef3314e50e1f38fe53cbaaf47dd09fc46d42f49 (diff)
downloadforums-880013144e2c80490f9b71457a3f0104c2b3a6d2.tar
forums-880013144e2c80490f9b71457a3f0104c2b3a6d2.tar.gz
forums-880013144e2c80490f9b71457a3f0104c2b3a6d2.tar.bz2
forums-880013144e2c80490f9b71457a3f0104c2b3a6d2.tar.xz
forums-880013144e2c80490f9b71457a3f0104c2b3a6d2.zip
Remove guest user topic tracking via cookies, update viewtopic to re-fix highlighting of search terms, add lang capability to images, various other issues, removed remote avatar size reduction
git-svn-id: file:///svn/phpbb/trunk@1566 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php38
1 files changed, 21 insertions, 17 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 204e180dc8..d5fac92de6 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -280,24 +280,30 @@ function init_userprefs($userdata)
}
}
- if( file_exists($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_main.".$phpEx) )
+ if( !file_exists($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_main.".$phpEx) )
{
- include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);
- }
- else
- {
- include($phpbb_root_path . 'language/lang_english/lang_main.' . $phpEx);
+ $board_config['default_lang'] = "english";
}
+ include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);
+
if( defined("IN_ADMIN") )
{
- if( file_exists($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_admin.".$phpEx) )
+ if( !file_exists($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_admin.".$phpEx) )
{
- include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx);
+ $board_config['default_lang'] = "english";
}
- else
+
+ include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx);
+ }
+
+ while( list($key, $value) = @each($images) )
+ {
+ if( strstr($value, "_lang") )
{
- include($phpbb_root_path . 'language/lang_english/lang_admin.' . $phpEx);
+ $new_value = str_replace("_lang", "_" . $board_config['default_lang'], $value);
+
+ $images[$key] = ( !file_exists($new_value) ) ? $new_value : str_replace("_lang", "_english", $value);
}
}
@@ -324,11 +330,11 @@ function setup_style($style)
$template_path = 'templates/' ;
$template_name = $row['template_name'] ;
- $template = new Template($phpbb_root_path . $template_path . $template_name);
+ $template = new Template($phpbb_root_path . $template_path . $template_name, $db);
if( $template )
{
- $current_template_path = $template_path . $template_name . '/';
+ $current_template_path = $template_path . $template_name;
@include($phpbb_root_path . $template_path . $template_name . '/' . $template_name . '.cfg');
if( !defined("TEMPLATE_CONFIG") )
@@ -1177,10 +1183,9 @@ function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "",
}
-
-
//
-// this does exactly what preg_quote() does in PHP 4-ish: http://www.php.net/manual/en/function.preg-quote.php
+// this does exactly what preg_quote() does in PHP 4-ish:
+// http://www.php.net/manual/en/function.preg-quote.php
//
// This function is here because the 2nd paramter to preg_quote was added in some
// version of php 4.0.x.. So we use this in order to maintain compatibility with
@@ -1196,5 +1201,4 @@ function phpbb_preg_quote($str, $delimiter)
return $text;
}
-
-?>
+?> \ No newline at end of file