aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2005-11-30 17:48:06 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2005-11-30 17:48:06 +0000
commit1bf18e23edb13b2d3014c4509e4d1b15ddc274fe (patch)
treedfbf1798248969f0ac79842d4f0dc449a36f6cd2 /phpBB
parentba6f40ce2542b87c7110dd9e38e4c0386b22da81 (diff)
downloadforums-1bf18e23edb13b2d3014c4509e4d1b15ddc274fe.tar
forums-1bf18e23edb13b2d3014c4509e4d1b15ddc274fe.tar.gz
forums-1bf18e23edb13b2d3014c4509e4d1b15ddc274fe.tar.bz2
forums-1bf18e23edb13b2d3014c4509e4d1b15ddc274fe.tar.xz
forums-1bf18e23edb13b2d3014c4509e4d1b15ddc274fe.zip
- added acp_language (language pack management)
- minor adjustments to cope with PHP5.x git-svn-id: file:///svn/phpbb/trunk@5315 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/acp/acp_bots.php9
-rw-r--r--phpBB/includes/acp/acp_language.php1097
-rw-r--r--phpBB/includes/acp/acp_logs.php5
-rw-r--r--phpBB/includes/bbcode.php18
-rw-r--r--phpBB/includes/functions.php28
-rw-r--r--phpBB/includes/functions_admin.php5
-rw-r--r--phpBB/includes/functions_compress.php32
-rw-r--r--phpBB/includes/functions_jabber.php22
-rw-r--r--phpBB/includes/functions_messenger.php6
-rw-r--r--phpBB/includes/functions_privmsgs.php12
-rw-r--r--phpBB/includes/functions_user.php2
-rw-r--r--phpBB/includes/search/fulltext_phpbb.php3
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php3
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php6
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php3
-rw-r--r--phpBB/language/en/acp/common.php39
-rw-r--r--phpBB/language/en/acp/language.php86
-rw-r--r--phpBB/language/en/common.php66
18 files changed, 1334 insertions, 108 deletions
diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php
index 5208a9e4fb..2fea1d866d 100644
--- a/phpBB/includes/acp/acp_bots.php
+++ b/phpBB/includes/acp/acp_bots.php
@@ -92,7 +92,8 @@ class acp_bots
WHERE bot_id $sql_id";
$db->sql_query($sql);
- foreach (array(USERS_TABLE, USER_GROUP_TABLE) as $table)
+ $_tables = array(USERS_TABLE, USER_GROUP_TABLE);
+ foreach ($_tables as $table)
{
$sql = "DELETE FROM $table
WHERE user_id IN (" . implode(', ', $user_id_ary) . ')';
@@ -250,7 +251,8 @@ class acp_bots
}
$s_active_options = '';
- foreach (array('0' => 'NO', '1' => 'YES') as $value => $lang)
+ $_options = array('0' => 'NO', '1' => 'YES');
+ foreach ($_options as $value => $lang)
{
$selected = ($bot_row['bot_active'] == $value) ? ' selected="selected"' : '';
$s_active_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$lang] . '</option>';
@@ -285,7 +287,8 @@ class acp_bots
}
$s_options = '';
- foreach (array('activate' => 'BOT_ACTIVATE', 'deactivate' => 'BOT_DEACTIVATE', 'delete' => 'DELETE') as $value => $lang)
+ $_options = array('activate' => 'BOT_ACTIVATE', 'deactivate' => 'BOT_DEACTIVATE', 'delete' => 'DELETE');
+ foreach ($_options as $value => $lang)
{
$s_options .= '<option value="' . $value . '">' . $user->lang[$lang] . '</option>';
}
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
new file mode 100644
index 0000000000..4566ab1c79
--- /dev/null
+++ b/phpBB/includes/acp/acp_language.php
@@ -0,0 +1,1097 @@
+<?php
+/**
+*
+* @package acp
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @package acp
+*/
+class acp_language
+{
+ var $main_files;
+ var $language_header = '';
+ var $lang_header = '';
+
+ var $language_file = '';
+ var $language_directory = '';
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template, $cache;
+ global $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
+ global $safe_mode, $file_uploads;
+
+ include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $this->default_variables();
+
+ // Check and set some common vars
+ $action = request_var('action', '');
+
+ $action = (isset($_POST['update_details'])) ? 'update_details' : $action;
+ $action = (isset($_POST['download_file'])) ? 'download_file' : $action;
+ $action = (isset($_POST['submit_file'])) ? 'submit_file' : $action;
+ $action = (isset($_POST['remove_store'])) ? 'details' : $action;
+
+ $lang_id = request_var('id', 0);
+ if (isset($_POST['missing_file']))
+ {
+ $missing_file = request_var('missing_file', array('' => 0));
+ list($_REQUEST['language_file'], ) = array_keys($missing_file);
+ }
+
+ list($this->language_directory, $this->language_file) = explode('|', request_var('language_file', '|common.' . $phpEx));
+
+ $this->language_directory = basename($this->language_directory);
+ $this->language_file = basename($this->language_file);
+
+ $user->add_lang('acp/language');
+ $this->tpl_name = 'acp_language';
+ $this->page_title = 'ACP_LANGUAGE_PACKS';
+
+ $u_action = "{$phpbb_admin_path}index.$phpEx$SID&amp;i=$id&amp;mode=$mode";
+
+ switch ($action)
+ {
+ case 'update_details':
+
+ if (!$lang_id)
+ {
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($u_action));
+ }
+
+ $sql = 'SELECT * FROM ' . LANG_TABLE . "
+ WHERE lang_id = $lang_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $sql_ary = array(
+ 'lang_english_name' => request_var('lang_english_name', $row['lang_english_name']),
+ 'lang_local_name' => request_var('lang_local_name', $row['lang_local_name']),
+ 'lang_author' => request_var('lang_author', $row['lang_author']),
+ );
+
+ $db->sql_query('UPDATE ' . LANG_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE lang_id = ' . $lang_id);
+
+ add_log('admin', 'LOG_LANGUAGE_PACK_UPDATED', $sql_ary['lang_english_name']);
+
+ trigger_error($user->lang['LANGUAGE_DETAILS_UPDATED'] . adm_back_link($u_action));
+ break;
+
+ case 'submit_file':
+ case 'download_file':
+
+ if (!$lang_id || !isset($_POST['entry']) || !is_array($_POST['entry']))
+ {
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($u_action));
+ }
+
+ if (!$this->language_file || (!$this->language_directory && !in_array($this->language_file, $this->main_files)))
+ {
+ trigger_error($user->lang['NO_FILE_SELECTED'] . adm_back_link($u_action));
+ }
+
+ $sql = 'SELECT * FROM ' . LANG_TABLE . "
+ WHERE lang_id = $lang_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$safe_mode)
+ {
+ $mkdir_ary = array('language', 'language/' . $row['lang_iso']);
+
+ if ($this->language_directory)
+ {
+ $mkdir_ary[] = 'language/' . $row['lang_iso'] . '/' . $this->language_directory;
+ }
+
+ foreach ($mkdir_ary as $dir)
+ {
+ $dir = $phpbb_root_path . 'store/' . $dir;
+
+ if (!is_dir($dir))
+ {
+ if (!@mkdir($dir, 0777))
+ {
+ trigger_error("Could not create directory $dir");
+ }
+ @chmod($dir, 0777);
+ }
+ }
+ }
+
+ // Get target filename for storage folder
+ $filename = $this->get_filename($row['lang_iso'], $this->language_directory, $this->language_file, true, true);
+ $fp = fopen($phpbb_root_path . $filename, 'wb');
+
+ if (!$fp)
+ {
+ trigger_error($user->lang['UNABLE_TO_WRITE_FILE']);
+ }
+
+ if ($this->language_directory == 'email')
+ {
+ // Email Template
+ fwrite($fp, (STRIP) ? stripslashes($_POST['entry']) : $_POST['entry']);
+ }
+ else
+ {
+ $name = (($this->language_directory) ? $this->language_directory . '_' : '') . $this->language_file;
+ $header = str_replace(array('{FILENAME}', '{LANG_NAME}', '{CHANGED}', '{AUTHOR}'), array($name, $row['lang_english_name'], date('Y-m-d', time()), $row['lang_author']), $this->language_file_header);
+
+ if (strpos($this->language_file, 'help_') === 0)
+ {
+ // Help File
+ $header .= '$help = array(' . "\n";
+ fwrite($fp, $header);
+
+ foreach ($_POST['entry'] as $key => $value)
+ {
+ if (!is_array($value))
+ {
+ }
+ else
+ {
+ $entry = "\tarray(\n";
+
+ foreach ($value as $_key => $_value)
+ {
+ $_value = (STRIP) ? stripslashes($_value) : $_value;
+ $entry .= "\t\t" . (int) $_key . "\t=> '" . str_replace("'", "\\'", $_value) . "',\n";
+ }
+
+ $entry .= "\t),\n";
+ }
+
+ fwrite($fp, $entry);
+ }
+ }
+ else
+ {
+ // Language File
+ $header .= $this->lang_header;
+ fwrite($fp, $header);
+
+ foreach ($_POST['entry'] as $key => $value)
+ {
+ if (!is_array($value))
+ {
+ $value = (STRIP) ? stripslashes($value) : $value;
+ $entry = "\t'" . $key . "'\t=> '" . str_replace("'", "\\'", $value) . "',\n";
+ }
+ else
+ {
+ $entry = "\n\t'" . $key . "'\t=> array(\n";
+
+ foreach ($value as $_key => $_value)
+ {
+ $_value = (STRIP) ? stripslashes($_value) : $_value;
+ $entry .= "\t\t'" . $_key . "'\t=> '" . str_replace("'", "\\'", $_value) . "',\n";
+ }
+
+ $entry .= "\t),\n\n";
+ }
+
+ fwrite($fp, $entry);
+ }
+ }
+
+ $footer = ");\n\n?>";
+ fwrite($fp, $footer);
+ }
+
+ fclose($fp);
+
+ if ($action == 'download_file')
+ {
+ header('Pragma: no-cache');
+ header('Content-Type: application/octetstream; name="' . $this->language_file . '"');
+ header('Content-disposition: attachment; filename=' . $this->language_file);
+
+ $fp = fopen($phpbb_root_path . $filename, 'rb');
+ while ($buffer = fread($fp, 1024))
+ {
+ echo $buffer;
+ }
+ fclose($fp);
+
+ exit;
+ }
+
+ $action = 'details';
+
+ // no break;
+
+ case 'details':
+
+ if (!$lang_id)
+ {
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($u_action));
+ }
+
+ $this->page_title = 'LANGUAGE_PACK_DETAILS';
+
+ $sql = 'SELECT * FROM ' . LANG_TABLE . '
+ WHERE lang_id = ' . $lang_id;
+ $result = $db->sql_query($sql);
+ $lang_entries = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $lang_iso = $lang_entries['lang_iso'];
+ $missing_vars = $missing_files = array();
+
+ // Get email templates
+ $email_files = filelist($phpbb_root_path . 'language/' . $config['default_lang'], 'email', 'txt');
+ $email_files = $email_files['email/'];
+
+ // Get acp files
+ $acp_files = filelist($phpbb_root_path . 'language/' . $config['default_lang'], 'acp', $phpEx);
+ $acp_files = $acp_files['acp/'];
+
+ // Get mod files
+ $mods_files = filelist($phpbb_root_path . 'language/' . $config['default_lang'], 'mods', $phpEx);
+ $mods_files = (isset($mods_files['mods/'])) ? $mods_files['mods/'] : array();
+
+ // Check if our current filename matches the files
+ switch ($this->language_directory)
+ {
+ case 'email':
+ if (!in_array($this->language_file, $email_files))
+ {
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($u_action . '&amp;action=details&amp;id=' . $lang_id));
+ }
+ break;
+
+ case 'acp':
+ if (!in_array($this->language_file, $acp_files))
+ {
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($u_action . '&amp;action=details&amp;id=' . $lang_id));
+ }
+ break;
+
+ case 'mods':
+ if (!in_array($this->language_file, $mods_files))
+ {
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($u_action . '&amp;action=details&amp;id=' . $lang_id));
+ }
+ break;
+
+ default:
+ if (!in_array($this->language_file, $this->main_files))
+ {
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($u_action . '&amp;action=details&amp;id=' . $lang_id));
+ }
+ }
+
+ if (isset($_POST['remove_store']))
+ {
+ $store_filename = $this->get_filename($lang_iso, $this->language_directory, $this->language_file, true, true);
+ @unlink($phpbb_root_path . $store_filename);
+ }
+
+ $template->assign_vars(array(
+ 'S_DETAILS' => true,
+ 'U_ACTION' => $u_action . "&amp;action=details&amp;id=$lang_id",
+ 'U_BACK' => $u_action,
+ 'LANG_LOCAL_NAME' => $lang_entries['lang_local_name'],
+ 'LANG_ENGLISH_NAME' => $lang_entries['lang_english_name'],
+ 'LANG_ISO' => $lang_entries['lang_iso'],
+ 'LANG_AUTHOR' => $lang_entries['lang_author'],
+ )
+ );
+
+ // If current lang is different from the default lang, then first try to grab missing/additional vars
+ if ($lang_iso != $config['default_lang'])
+ {
+ $is_missing_var = false;
+
+ foreach ($this->main_files as $file)
+ {
+ if (file_exists($phpbb_root_path . $this->get_filename($lang_iso, '', $file)))
+ {
+ $missing_vars[$file] = $this->compare_language_files($config['default_lang'], $lang_iso, '', $file);
+
+ if (sizeof($missing_vars[$file]))
+ {
+ $is_missing_var = true;
+ }
+ }
+ else
+ {
+ $missing_files[] = $this->get_filename($lang_iso, '', $file);
+ }
+ }
+
+ // Now go through acp/mods directories
+ foreach ($acp_files as $file)
+ {
+ if (file_exists($phpbb_root_path . $this->get_filename($lang_iso, 'acp', $file)))
+ {
+ $missing_vars['acp/' . $file] = $this->compare_language_files($config['default_lang'], $lang_iso, 'acp', $file);
+
+ if (sizeof($missing_vars['acp/' . $file]))
+ {
+ $is_missing_var = true;
+ }
+ }
+ else
+ {
+ $missing_files[] = $this->get_filename($lang_iso, 'acp', $file);
+ }
+ }
+
+ if (sizeof($mods_files))
+ {
+ foreach ($mods_files as $file)
+ {
+ if (file_exists($phpbb_root_path . $this->get_filename($lang_iso, 'mods', $file)))
+ {
+ $missing_vars['mods/' . $file] = $this->compare_language_files($config['default_lang'], $lang_iso, 'mods', $file);
+
+ if (sizeof($missing_vars['mods/' . $file]))
+ {
+ $is_missing_var = true;
+ }
+ }
+ else
+ {
+ $missing_files[] = $this->get_filename($lang_iso, 'mods', $file);
+ }
+ }
+ }
+
+ // More missing files... for example email templates?
+ foreach ($email_files as $file)
+ {
+ if (!file_exists($phpbb_root_path . $this->get_filename($lang_iso, 'email', $file)))
+ {
+ $missing_files[] = $this->get_filename($lang_iso, 'email', $file);
+ }
+ }
+
+ if (sizeof($missing_files))
+ {
+ $template->assign_vars(array(
+ 'S_MISSING_FILES' => true,
+ 'L_MISSING_FILES' => sprintf($user->lang['THOSE_MISSING_LANG_FILES'], $lang_entries['lang_local_name']),
+ 'MISSING_FILES' => implode('<br />', $missing_files))
+ );
+ }
+
+ if ($is_missing_var)
+ {
+ $template->assign_vars(array(
+ 'S_MISSING_VARS' => true,
+ 'L_MISSING_VARS_EXPLAIN' => sprintf($user->lang['THOSE_MISSING_LANG_VARIABLES'], $lang_entries['lang_local_name']),
+ 'U_MISSING_ACTION' => $u_action . "&amp;action=$action&amp;id=$lang_id")
+ );
+
+ foreach ($missing_vars as $file => $vars)
+ {
+ if (!sizeof($vars))
+ {
+ continue;
+ }
+
+ $template->assign_block_vars('missing', array(
+ 'FILE' => $file,
+ 'TPL' => $this->print_language_entries($vars, '', false),
+ 'KEY' => (strpos($file, '/') === false) ? '|' . $file : str_replace('/', '|', $file))
+ );
+ }
+ }
+ }
+
+ // Main language files
+ $s_lang_options = '<option value="|common.' . $phpEx . '" class="sep">' . $user->lang['LANGUAGE_FILES'] . '</option>';
+ foreach ($this->main_files as $file)
+ {
+ if (strpos($file, 'help_') === 0)
+ {
+ continue;
+ }
+
+ $prefix = (file_exists($phpbb_root_path . $this->get_filename($lang_iso, '', $file, true, true))) ? '* ' : '';
+
+ $selected = (!$this->language_directory && $this->language_file == $file) ? ' selected="selected"' : '';
+ $s_lang_options .= '<option value="|' . $file . '"' . $selected . '>' . $prefix . $file . '</option>';
+ }
+
+ // Help Files
+ $s_lang_options .= '<option value="|common.' . $phpEx . '" class="sep">' . $user->lang['HELP_FILES'] . '</option>';
+ foreach ($this->main_files as $file)
+ {
+ if (strpos($file, 'help_') !== 0)
+ {
+ continue;
+ }
+
+ $prefix = (file_exists($phpbb_root_path . $this->get_filename($lang_iso, '', $file, true, true))) ? '* ' : '';
+
+ $selected = (!$this->language_directory && $this->language_file == $file) ? ' selected="selected"' : '';
+ $s_lang_options .= '<option value="|' . $file . '"' . $selected . '>' . $prefix . $file . '</option>';
+ }
+
+ // Now every other language directory
+ $check_files = array('email', 'acp', 'mods');
+
+ foreach ($check_files as $check)
+ {
+ if (!sizeof(${$check . '_files'}))
+ {
+ continue;
+ }
+
+ $s_lang_options .= '<option value="|common.' . $phpEx . '" class="sep">' . $user->lang[strtoupper($check) . '_FILES'] . '</option>';
+
+ foreach (${$check . '_files'} as $file)
+ {
+ $prefix = (file_exists($phpbb_root_path . $this->get_filename($lang_iso, $check, $file, true, true))) ? '* ' : '';
+
+ $selected = ($this->language_directory == $check && $this->language_file == $file) ? ' selected="selected"' : '';
+ $s_lang_options .= '<option value="' . $check . '|' . $file . '"' . $selected . '>' . $prefix . $file . '</option>';
+ }
+ }
+
+ // Get Language Entries - if saved within store folder, we take this one (with the option to remove it)
+ $lang = array();
+
+ $is_email_file = ($this->language_directory == 'email') ? true : false;
+ $is_help_file = (strpos($this->language_file, 'help_') === 0) ? true : false;
+
+ $file_from_store = (file_exists($phpbb_root_path . $this->get_filename($lang_iso, $this->language_directory, $this->language_file, true, true))) ? true : false;
+ $no_store_filename = $this->get_filename($lang_iso, $this->language_directory, $this->language_file);
+
+ if (!$file_from_store && !file_exists($phpbb_root_path . $no_store_filename))
+ {
+ $print_message = sprintf($user->lang['MISSING_LANGUAGE_FILE'], $no_store_filename);
+ }
+ else
+ {
+ if ($is_email_file)
+ {
+ $lang = implode('', file($phpbb_root_path . $this->get_filename($lang_iso, $this->language_directory, $this->language_file, $file_from_store)));
+ }
+ else
+ {
+ include($phpbb_root_path . $this->get_filename($lang_iso, $this->language_directory, $this->language_file, $file_from_store));
+
+ if ($is_help_file)
+ {
+ $lang = $help;
+ unset($help);
+ }
+ }
+ $print_message = (($this->language_directory) ? $this->language_directory . '/' : '') . $this->language_file;
+ }
+
+ // Normal language pack entries
+ $template->assign_vars(array(
+ 'U_ENTRY_ACTION' => $u_action . "&amp;action=details&amp;id=$lang_id#entries",
+ 'S_EMAIL_FILE' => $is_email_file,
+ 'S_FROM_STORE' => $file_from_store,
+ 'S_LANG_OPTIONS' => $s_lang_options,
+ 'PRINT_MESSAGE' => $print_message,
+ )
+ );
+
+ if (!$is_email_file)
+ {
+ $method = ($is_help_file) ? 'print_help_entries' : 'print_language_entries';
+ $tpl = '';
+ $name = (($this->language_directory) ? $this->language_directory . '/' : '') . $this->language_file;
+
+ if (isset($missing_vars[$name]) && sizeof($missing_vars[$name]))
+ {
+ $tpl .= $this->$method($missing_vars[$name], '* ');
+ }
+
+ $tpl .= $this->$method($lang);
+
+ $template->assign_var('TPL', $tpl);
+ unset($tpl);
+ }
+ else
+ {
+ $template->assign_vars(array(
+ 'LANG' => $lang)
+ );
+ unset($lang);
+ }
+
+ return;
+
+ break;
+
+ case 'delete':
+
+ if (!$lang_id)
+ {
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($u_action));
+ }
+
+ $sql = 'SELECT * FROM ' . LANG_TABLE . '
+ WHERE lang_id = ' . $lang_id;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row['lang_iso'] == $config['default_lang'])
+ {
+ trigger_error($user->lang['NO_REMOVE_DEFAULT_LANG'] . adm_back_link($u_action));
+ }
+
+ $db->sql_query('DELETE FROM ' . LANG_TABLE . ' WHERE lang_id = ' . $lang_id);
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_lang = '{$config['default_lang']}'
+ WHERE user_lang = '{$row['lang_iso']}'";
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_LANGUAGE_PACK_DELETED', $row['lang_english_name']);
+
+ trigger_error(sprintf($user->lang['LANGUAGE_PACK_DELETED'], $row['lang_english_name']) . adm_back_link($u_action));
+ break;
+
+ case 'install':
+ $lang_iso = request_var('iso', '');
+ $lang_iso = basename($lang_iso);
+
+ if (!$lang_iso || !file_exists("{$phpbb_root_path}language/$lang_iso/iso.txt"))
+ {
+ trigger_error($user->lang['LANGUAGE_PACK_NOT_EXIST'] . adm_back_link($u_action));
+ }
+
+ $file = file("{$phpbb_root_path}language/$lang_iso/iso.txt");
+
+ $lang_pack = array(
+ 'iso' => $lang_iso,
+ 'name' => trim(htmlspecialchars(stripslashes($file[0]))),
+ 'local_name'=> trim(htmlspecialchars(stripslashes($file[1]))),
+ 'author' => trim(htmlspecialchars(stripslashes($file[2])))
+ );
+ unset($file);
+
+ $sql = 'SELECT lang_iso FROM ' . LANG_TABLE . "
+ WHERE lang_iso = '" . $db->sql_escape($lang_iso) . "'";
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ trigger_error($user->lang['LANGUAGE_PACK_ALREADY_INSTALLED'] . adm_back_link($u_action));
+ }
+ $db->sql_freeresult($result);
+
+ if (!$lang_pack['name'] || !$lang_pack['local_name'])
+ {
+ trigger_error($user->lang['INVALID_LANGUAGE_PACK'] . adm_back_link($u_action));
+ }
+
+ // Add language pack
+ $sql_ary = array(
+ 'lang_iso' => $lang_pack['iso'],
+ 'lang_dir' => $lang_pack['iso'],
+ 'lang_english_name' => $lang_pack['name'],
+ 'lang_local_name' => $lang_pack['local_name'],
+ 'lang_author' => $lang_pack['author']
+ );
+
+ $db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+
+ add_log('admin', 'LOG_LANGUAGE_PACK_INSTALLED', $lang_pack['name']);
+
+ trigger_error(sprintf($user->lang['LANGUAGE_PACK_INSTALLED'], $lang_pack['name']) . adm_back_link($u_action));
+
+ break;
+
+ case 'download':
+
+ if (!$lang_id)
+ {
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($u_action));
+ }
+
+ $sql = 'SELECT * FROM ' . LANG_TABLE . '
+ WHERE lang_id = ' . $lang_id;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $use_method = request_var('use_method', '');
+ $methods = array('tar');
+
+ $available_methods = array('tar.gz' => 'zlib', 'tar.bz2' => 'bz2', 'zip' => 'zlib');
+ foreach ($available_methods as $type => $module)
+ {
+ if (!@extension_loaded($module))
+ {
+ continue;
+ }
+
+ $methods[] = $type;
+ }
+
+ if (!in_array($use_method, $methods))
+ {
+ $use_method = '';
+ }
+
+ // Let the user decide in which format he wants to have the pack
+ if (!$use_method)
+ {
+ $this->page_title = 'SELECT_DOWNLOAD_FORMAT';
+
+ $radio_buttons = '';
+ foreach ($methods as $method)
+ {
+ $radio_buttons .= '<input type="radio"' . ((!$radio_buttons) ? ' id="use_method"' : '') . ' value="' . $method . '" name="use_method" />&nbsp;' . $method . '&nbsp;';
+ }
+
+ $template->assign_vars(array(
+ 'S_SELECT_METHOD' => true,
+ 'U_BACK' => $u_action,
+ 'U_ACTION' => $u_action . "&amp;action=$action&amp;id=$lang_id",
+ 'RADIO_BUTTONS' => $radio_buttons)
+ );
+
+ return;
+ }
+
+ include_once($phpbb_root_path . 'includes/functions_compress.' . $phpEx);
+
+ if ($use_method == 'zip')
+ {
+ $compress = new compress_zip('w', $phpbb_root_path . 'store/lang_' . $row['lang_iso'] . '.' . $use_method);
+ }
+ else
+ {
+ $compress = new compress_tar('w', $phpbb_root_path . 'store/lang_' . $row['lang_iso'] . '.' . $use_method, $use_method);
+ }
+
+ // Get email templates
+ $email_templates = filelist($phpbb_root_path . 'language/' . $row['lang_iso'], 'email', 'txt');
+ $email_templates = $email_templates['email/'];
+
+ // Get acp files
+ $acp_files = filelist($phpbb_root_path . 'language/' . $row['lang_iso'], 'acp', $phpEx);
+ $acp_files = $acp_files['acp/'];
+
+ // Get mod files
+ $mod_files = filelist($phpbb_root_path . 'language/' . $row['lang_iso'], 'mods', $phpEx);
+ $mod_files = (isset($mod_files['mods/'])) ? $mod_files['mods/'] : array();
+
+ // Add main files
+ $this->add_to_archive($compress, $this->main_files, $row['lang_iso']);
+
+ // Write files in folders
+ $this->add_to_archive($compress, $email_templates, $row['lang_iso'], 'email');
+ $this->add_to_archive($compress, $acp_files, $row['lang_iso'], 'acp');
+ $this->add_to_archive($compress, $mod_files, $row['lang_iso'], 'mods');
+
+ // Write ISO File
+ $iso_src = html_entity_decode($row['lang_english_name']) . "\n";
+ $iso_src .= html_entity_decode($row['lang_local_name']) . "\n";
+ $iso_src .= html_entity_decode($row['lang_author']);
+ $compress->add_data($iso_src, 'language/' . $row['lang_iso'] . '/iso.txt');
+
+ // index.html files
+ $compress->add_data('', 'language/' . $row['lang_iso'] . '/index.html');
+ $compress->add_data('', 'language/' . $row['lang_iso'] . '/email/index.html');
+ $compress->add_data('', 'language/' . $row['lang_iso'] . '/acp/index.html');
+
+ if (sizeof($mod_files))
+ {
+ $compress->add_data('', 'language/' . $row['lang_iso'] . '/mods/index.html');
+ }
+
+ $compress->close();
+
+ $compress->download('lang_' . $row['lang_iso']);
+ @unlink($phpbb_root_path . 'store/lang_' . $row['lang_iso'] . '.' . $use_method);
+
+ exit;
+
+ break;
+ }
+
+ $sql = 'SELECT user_lang, COUNT(user_lang) AS lang_count
+ FROM ' . USERS_TABLE . '
+ GROUP BY user_lang';
+ $result = $db->sql_query($sql);
+
+ $lang_count = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $lang_count[$row['user_lang']] = $row['lang_count'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT *
+ FROM ' . LANG_TABLE;
+ $result = $db->sql_query($sql);
+
+ $installed = array();
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $installed[] = $row['lang_iso'];
+ $tagstyle = ($row['lang_iso'] == $config['default_lang']) ? '*' : '';
+
+ $template->assign_block_vars('lang', array(
+ 'U_DETAILS' => $u_action . "&amp;action=details&amp;id={$row['lang_id']}",
+ 'U_DOWNLOAD' => $u_action . "&amp;action=download&amp;id={$row['lang_id']}",
+ 'U_DELETE' => $u_action . "&amp;action=delete&amp;id={$row['lang_id']}",
+
+ 'ENGLISH_NAME' => $row['lang_english_name'],
+ 'TAG' => $tagstyle,
+ 'LOCAL_NAME' => $row['lang_local_name'],
+ 'ISO' => $row['lang_iso'],
+ 'USED_BY' => (isset($lang_count[$row['lang_iso']])) ? $lang_count[$row['lang_iso']] : 0,
+
+ )
+ );
+ }
+ $db->sql_freeresult($result);
+
+ $new_ary = $iso = array();
+ $dp = opendir("{$phpbb_root_path}language");
+
+ while ($file = readdir($dp))
+ {
+ if ($file{0} != '.' && file_exists("{$phpbb_root_path}language/$file/iso.txt"))
+ {
+ if (!in_array($file, $installed))
+ {
+ if ($iso = file("{$phpbb_root_path}language/$file/iso.txt"))
+ {
+ if (sizeof($iso) == 3)
+ {
+ $new_ary[$file] = array(
+ 'iso' => $file,
+ 'name' => trim($iso[0]),
+ 'local_name'=> trim($iso[1]),
+ 'author' => trim($iso[2])
+ );
+ }
+ }
+ }
+ }
+ }
+ unset($installed);
+ @closedir($dp);
+
+ if (sizeof($new_ary))
+ {
+ foreach ($new_ary as $iso => $lang_ary)
+ {
+ $template->assign_block_vars('notinst', array(
+ 'ISO' => $lang_ary['iso'],
+ 'LOCAL_NAME' => $lang_ary['local_name'],
+ 'NAME' => $lang_ary['name'],
+ 'U_INSTALL' => $u_action . '&amp;action=install&amp;iso=' . urlencode($lang_ary['iso']))
+ );
+ }
+ }
+
+ unset($new_ary);
+ }
+
+
+ /**
+ * Set default language variables/header
+ */
+ function default_variables()
+ {
+ global $phpEx;
+
+ $this->language_file_header = '<?php
+/**
+*
+* {FILENAME} [{LANG_NAME}]
+*
+* @package language
+* @copyright (c) 2005 phpBB Group
+* @author {CHANGED} - {AUTHOR}
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+// DEVELOPERS PLEASE NOTE
+//
+// Placeholders can now contain order information, e.g. instead of
+// \'Page %s of %s\' you can (and should) write \'Page %1$s of %2$s\', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. \'Message %d\' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., \'Click %sHERE%s\' is fine
+';
+
+ $this->lang_header = '
+
+/**
+* DO NOT CHANGE
+*/
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+$lang += array(
+';
+
+ // Language files in language root directory
+ $this->main_files = array("common.$phpEx", "groups.$phpEx", "mcp.$phpEx", "memberlist.$phpEx", "posting.$phpEx", "search.$phpEx", "ucp.$phpEx", "viewforum.$phpEx", "viewtopic.$phpEx", "help_bbcode.$phpEx", "help_faq.$phpEx");
+
+ }
+
+ /**
+ * Get filename/location of language file
+ */
+ function get_filename($lang_iso, $directory, $filename, $check_store = false, $only_return_filename = false)
+ {
+ global $phpbb_root_path, $safe_mode;
+
+ $check_filename = "language/$lang_iso/" . (($directory) ? $directory . '/' : '') . $filename;
+
+ if ($check_store)
+ {
+ $check_store_filename = ($safe_mode) ? "store/langfile_{$lang_iso}" . (($directory) ? '_' . $directory : '') . "_{$filename}" : "store/language/$lang_iso/" . (($directory) ? $directory . '/' : '') . $filename;
+
+ if (!$only_return_filename && file_exists($phpbb_root_path . $check_store_filename))
+ {
+ return $check_store_filename;
+ }
+ else if ($only_return_filename)
+ {
+ return $check_store_filename;
+ }
+ }
+
+ return $check_filename;
+ }
+
+ /**
+ * Add files to archive
+ */
+ function add_to_archive(&$compress, $filelist, $lang_iso, $directory = '')
+ {
+ global $phpbb_root_path;
+
+ foreach ($filelist as $file)
+ {
+ // Get source filename
+ $source = $this->get_filename($lang_iso, $directory, $file, true);
+ $destination = 'language/' . $lang_iso . '/' . (($directory) ? $directory . '/' : '') . $file;
+
+ // Add file to archive
+ $compress->add_custom_file($phpbb_root_path . $source, $destination);
+ }
+ }
+
+ /**
+ * Print language entries
+ */
+ function print_language_entries(&$lang_ary, $key_prefix = '', $input_field = true)
+ {
+ $tpl = '';
+
+ foreach ($lang_ary as $key => $value)
+ {
+ if (is_array($value))
+ {
+ $tpl .= '
+ <tr>
+ <td class="row3" colspan="2">' . $key_prefix . '<b>' . $key . '</b></td>
+ </tr>';
+
+ foreach ($value as $_key => $_value)
+ {
+ $tpl .= '
+ <tr>
+ <td class="row1" style="width: 10%; white-space: nowrap;">' . $key_prefix . '<b>' . $_key . '</b></td>
+ <td class="row2">';
+
+ if ($input_field)
+ {
+ $tpl .= '<input type="text" name="entry[' . $key . '][' . $_key . ']" value="' . htmlspecialchars($_value) . '" style="width: 99%" />';
+ }
+ else
+ {
+ $tpl .= '<b>' . htmlspecialchars($_value) . '</b>';
+ }
+
+ $tpl .= '</td>
+ </tr>';
+ }
+
+ $tpl .= '
+ <tr>
+ <td class="spacer" colspan="2">&nbsp;</td>
+ </tr>';
+ }
+ else
+ {
+ $tpl .= '
+ <tr>
+ <td class="row1" style="width: 10%; white-space: nowrap;">' . $key_prefix . '<b>' . $key . '</b></td>
+ <td class="row2">';
+
+ if ($input_field)
+ {
+ $tpl .= '<input type="text" name="entry[' . $key . ']" value="' . htmlspecialchars($value) . '" style="width: 99%" />';
+ }
+ else
+ {
+ $tpl .= '<b>' . htmlspecialchars($value) . '</b>';
+ }
+
+ $tpl .= '</td>
+ </tr>';
+ }
+ }
+
+ return $tpl;
+ }
+
+ /**
+ * Print help entries
+ */
+ function print_help_entries(&$lang_ary, $key_prefix = '', $text_field = true)
+ {
+ $tpl = '';
+
+ foreach ($lang_ary as $key => $value)
+ {
+ if (is_array($value))
+ {
+ $tpl .= '
+ <tr>
+ <td class="row3" colspan="2">' . $key_prefix . '<b>' . $key . '</b></td>
+ </tr>';
+
+ foreach ($value as $_key => $_value)
+ {
+ $tpl .= '
+ <tr>
+ <td class="row1" style="width: 10%; white-space: nowrap;">' . $key_prefix . '<b>' . $_key . '</b></td>
+ <td class="row2">';
+
+ if ($text_field)
+ {
+ $tpl .= '<textarea name="entry[' . $key . '][' . $_key . ']" cols="80" rows="5" style="width: 90%;">' . htmlspecialchars($_value) . '</textarea>';
+ }
+ else
+ {
+ $tpl .= '<b>' . htmlspecialchars($_value) . '</b>';
+ }
+
+ $tpl .= '</td>
+ </tr>';
+ }
+
+ $tpl .= '
+ <tr>
+ <td class="spacer" colspan="2">&nbsp;</td>
+ </tr>';
+ }
+ else
+ {
+ $tpl .= '
+ <tr>
+ <td class="row1" style="width: 10%; white-space: nowrap;">' . $key_prefix . '<b>' . $key . '</b></td>
+ <td class="row2">';
+
+ if ($text_field)
+ {
+ $tpl .= '<textarea name="entry[' . $key . ']" cols="80" rows="5" style="width: 90%;">' . htmlspecialchars($value) . '</textarea>';
+ }
+ else
+ {
+ $tpl .= '<b>' . htmlspecialchars($value) . '</b>';
+ }
+
+ $tpl .= '</td>
+ </tr>';
+ }
+ }
+
+ return $tpl;
+ }
+
+ /**
+ * Compare two language files
+ */
+ function compare_language_files($source_lang, $dest_lang, $directory, $file)
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $return_ary = array();
+
+ $lang = array();
+ include("{$phpbb_root_path}language/{$source_lang}/" . (($directory) ? $directory . '/' : '') . $file);
+ $lang_entry_src = $lang;
+
+ $lang = array();
+
+ if (!file_exists($phpbb_root_path . $this->get_filename($dest_lang, $directory, $file, true)))
+ {
+ return array();
+ }
+
+ include($phpbb_root_path . $this->get_filename($dest_lang, $directory, $file, true));
+
+ $lang_entry_dst = $lang;
+
+ unset($lang);
+
+ $diff_array_keys = array_diff(array_keys($lang_entry_src), array_keys($lang_entry_dst));
+ unset($lang_entry_dst);
+
+ foreach ($diff_array_keys as $key)
+ {
+ $return_ary[$key] = $lang_entry_src[$key];
+ }
+
+ unset($lang_entry_src);
+
+ return $return_ary;
+ }
+}
+
+/**
+* @package module_install
+*/
+class acp_language_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_language',
+ 'title' => 'ACP_LANGUAGE',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'lang_packs' => array('title' => 'ACP_LANGUAGE_PACKS', 'auth' => 'acl_a_server'),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_logs.php b/phpBB/includes/acp/acp_logs.php
index 197ada5cfc..42df1ef340 100644
--- a/phpBB/includes/acp/acp_logs.php
+++ b/phpBB/includes/acp/acp_logs.php
@@ -60,7 +60,7 @@ class acp_logs
$where_sql";
$db->sql_query($sql);
- add_log('admin', 'LOG_' . strtoupper($mode) . '_CLEAR');
+ add_log('admin', 'LOG_CLEAR_' . strtoupper($mode));
}
}
@@ -117,7 +117,8 @@ class acp_logs
{
$data = array();
- foreach (array('viewtopic', 'viewlogs', 'viewforum') as $check)
+ $checks = array('viewtopic', 'viewlogs', 'viewforum');
+ foreach ($checks as $check)
{
if (isset($row[$check]) && $row[$check])
{
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index b559800b65..a550bd40c3 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -323,7 +323,7 @@ class bbcode
}
else
{
- $this->bbcode_cache[$bbcode_id] = FALSE;
+ $this->bbcode_cache[$bbcode_id] = false;
}
}
}
@@ -349,7 +349,7 @@ class bbcode
if ($bbcode_id != -1 && !($this->template_bitfield & (1 << $bbcode_id)))
{
- return (isset($bbcode_hardtpl[$tpl_name])) ? $bbcode_hardtpl[$tpl_name] : FALSE;
+ return (isset($bbcode_hardtpl[$tpl_name])) ? $bbcode_hardtpl[$tpl_name] : false;
}
if (empty($this->bbcode_template))
@@ -375,7 +375,7 @@ class bbcode
eval($tpl);
}
- return (isset($this->bbcode_template[$tpl_name])) ? $this->bbcode_template[$tpl_name] : ((isset($bbcode_hardtpl[$tpl_name])) ? $bbcode_hardtpl[$tpl_name] : FALSE);
+ return (isset($this->bbcode_template[$tpl_name])) ? $this->bbcode_template[$tpl_name] : ((isset($bbcode_hardtpl[$tpl_name])) ? $bbcode_hardtpl[$tpl_name] : false);
}
function bbcode_tpl_replace($tpl_name, $tpl)
@@ -410,37 +410,37 @@ class bbcode
$type = 'default';
$start = 0;
}
- elseif ($type == 'i')
+ else if ($type == 'i')
{
$tpl = 'olist_open';
$type = 'lower-roman';
$start = 1;
}
- elseif ($type == 'I')
+ else if ($type == 'I')
{
$tpl = 'olist_open';
$type = 'upper-roman';
$start = 1;
}
- elseif (preg_match('#^(disc|circle|square)$#i', $type))
+ else if (preg_match('#^(disc|circle|square)$#i', $type))
{
$tpl = 'ulist_open';
$type = strtolower($type);
$start = 1;
}
- elseif (preg_match('#^[a-z]$#', $type))
+ else if (preg_match('#^[a-z]$#', $type))
{
$tpl = 'olist_open';
$type = 'lower-alpha';
$start = ord($type) - 96;
}
- elseif (preg_match('#[A-Z]#', $type))
+ else if (preg_match('#[A-Z]#', $type))
{
$tpl = 'olist_open';
$type = 'upper-alpha';
$start = ord($type) - 64;
}
- elseif (is_numeric($type))
+ else if (is_numeric($type))
{
$tpl = 'olist_open';
$type = 'arabic-numbers';
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 328b8c56b5..f25e41443e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -354,7 +354,7 @@ function tz_select($default = '')
global $sys_timezone, $user;
$tz_select = '';
- foreach ($user->lang['tz']['zones'] as $offset => $zone)
+ foreach ($user->lang['tz_zones'] as $offset => $zone)
{
if (is_numeric($offset))
{
@@ -380,7 +380,7 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $mat
// Is user watching this thread?
if ($user_id != ANONYMOUS)
{
- $can_watch = TRUE;
+ $can_watch = true;
if ($notify_status == 'unset')
{
@@ -415,7 +415,7 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $mat
}
else
{
- $is_watching = TRUE;
+ $is_watching = true;
if ($notify_status)
{
@@ -433,7 +433,7 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $mat
{
if ($_GET['watch'] == $mode)
{
- $is_watching = TRUE;
+ $is_watching = true;
$sql = 'INSERT INTO ' . $table_sql . " (user_id, $where_sql, notify_status)
VALUES ($user_id, $match_id, 0)";
@@ -977,7 +977,9 @@ function on_page($num_items, $per_page, $start)
$on_page = floor($start / $per_page) + 1;
- $template->assign_var('ON_PAGE', $on_page);
+ $template->assign_vars(array(
+ 'ON_PAGE' => $on_page)
+ );
return sprintf($user->lang['PAGE_OF'], $on_page, max(ceil($num_items / $per_page), 1));
}
@@ -1121,10 +1123,10 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
return false;
}
- // re-add $SID
- $use_page = ($u_action) ? $phpbb_root_path . $u_action : $phpbb_root_path . $user->page;
- $u_action = (strpos($use_page, ".{$phpEx}?") !== false) ? str_replace(".{$phpEx}?", ".$phpEx$SID&", $use_page) . '&' : $use_page . '?';
- $u_action .= 'confirm_key=' . $confirm_key;
+ // re-add $SID / transform & to &amp; for user->page (user->page is always using &
+ $use_page = ($u_action) ? $phpbb_root_path . $u_action : $phpbb_root_path . str_replace('&', '&amp;', $user->page);
+ $u_action = (strpos($use_page, ".{$phpEx}?") !== false) ? str_replace(".{$phpEx}?", ".$phpEx$SID&amp;", $use_page) : $use_page . '?';
+ $u_action .= '&amp;confirm_key=' . $confirm_key;
$template->assign_vars(array(
'MESSAGE_TITLE' => (!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title],
@@ -1162,7 +1164,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
{
$username = request_var('username', '');
$password = request_var('password', '');
- $autologin = (!empty($_POST['autologin'])) ? TRUE : FALSE;
+ $autologin = (!empty($_POST['autologin'])) ? true : false;
$viewonline = (!empty($_POST['viewonline'])) ? 0 : 1;
$admin = ($admin) ? 1 : 0;
@@ -1568,7 +1570,7 @@ function page_header($page_title = '')
{
global $db, $config, $template, $SID, $user, $auth, $phpEx, $phpbb_root_path;
- define('HEADER_INC', TRUE);
+ define('HEADER_INC', true);
// gzip_compression
if ($config['gzip_compress'])
@@ -1695,8 +1697,8 @@ function page_header($page_title = '')
if ($total_online_users > $config['record_online_users'])
{
- set_config('record_online_users', $total_online_users, TRUE);
- set_config('record_online_date', time(), TRUE);
+ set_config('record_online_users', $total_online_users, true);
+ set_config('record_online_date', time(), true);
}
// Build online listing
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 48de517083..cc39ecbdda 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -300,6 +300,11 @@ function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
// Add closing / if present
$dir = ($dir && substr($dir, -1) != '/') ? $dir . '/' : $dir;
+ if (!is_dir($rootdir . $dir))
+ {
+ return false;
+ }
+
$dh = opendir($rootdir . $dir);
while (($fname = readdir($dh)) !== false)
{
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php
index b159adf53d..4c5d37f68e 100644
--- a/phpBB/includes/functions_compress.php
+++ b/phpBB/includes/functions_compress.php
@@ -15,14 +15,14 @@
class compress
{
var $fp = 0;
-
+
function add_file($src, $src_rm_prefix = '', $src_add_prefix = '', $skip_files = '')
{
global $phpbb_root_path;
$skip_files = explode(',', $skip_files);
- // Remove rm prefix from src path
+ // Remove rm prefix from src path
$src_path = ($src_rm_prefix) ? preg_replace('#^(' . preg_quote($src_rm_prefix) . ')#', '', $src) : $src;
// Add src prefix
$src_path = ($src_add_prefix) ? ($src_add_prefix . ((substr($src_add_prefix, -1) != '/') ? '/' : '') . $src_path) : $src_path;
@@ -82,6 +82,12 @@ class compress
return true;
}
+ function add_custom_file($src, $filename)
+ {
+ $this->data($filename, implode('', file($src)));
+ return true;
+ }
+
function add_data($src, $name)
{
$this->data($name, $src);
@@ -91,12 +97,13 @@ class compress
function methods()
{
$methods = array('tar');
+ $available_methods = array('tar.gz' => 'zlib', 'tar.bz2' => 'bz2', 'zip' => 'zlib');
- foreach (array('tar.gz' => 'zlib', 'tar.bz2' => 'bz2', 'zip' => 'zlib') as $type => $module)
+ foreach ($available_methods as $type => $module)
{
if (!@extension_loaded($module))
{
- break;
+ continue;
}
$methods[] = $type;
}
@@ -312,7 +319,7 @@ class compress_zip extends compress
unset($data);
// If we didn't compress set method to store, else deflate
- $c_method = ($c_len == $unc_len) ? "\x00\x00" : "\x08\x00";
+ $c_method = ($c_len == $unc_len) ? "\x00\x00" : "\x08\x00";
// Are we a file or a directory? Set archive for file
$attrib = ($is_dir) ? 16 : 32;
@@ -348,7 +355,7 @@ class compress_zip extends compress
$cdrec .= "\x00\x00"; // version made by
$cdrec .= "$var_ext\x00"; // version needed to extract
$cdrec .= "\x00\x00"; // gen purpose bit flag
- $cdrec .= $c_method; // compression method
+ $cdrec .= $c_method; // compression method
$cdrec .= $hexdtime; // last mod time & date
$cdrec .= pack('V', $crc); // crc32
$cdrec .= pack('V', $c_len); // compressed filesize
@@ -372,7 +379,7 @@ class compress_zip extends compress
{
$ctrldir = implode('', $this->ctrl_dir);
- return $ctrldir . $this->eof_cdh .
+ return $ctrldir . $this->eof_cdh .
pack('v', sizeof($this->ctrl_dir)) . // total # of entries "on this disk"
pack('v', sizeof($this->ctrl_dir)) . // total # of entries overall
pack('V', strlen($ctrldir)) . // size of central dir
@@ -548,7 +555,7 @@ class compress_tar extends compress
$header .= pack("a8", sprintf("%07o", 0));
$header .= pack("a8", sprintf("%07o", 0));
$header .= pack("a12", sprintf("%011o", $filesize));
- $header .= pack("a12", sprintf("%011o", $mtime));
+ $header .= pack("A12", sprintf("%011o", $mtime)); // From a12 to A12
$header .= ' ';
$header .= pack("a", $typeflag);
$header .= pack("a100", '');
@@ -581,7 +588,12 @@ class compress_tar extends compress
function open()
{
$fzopen = ($this->isbz && function_exists('bzopen')) ? 'bzopen' : (($this->isgz && extension_loaded('zlib')) ? 'gzopen' : 'fopen');
- return $this->fp = @$fzopen($this->file, $this->mode . 'b');
+ $this->fp = @$fzopen($this->file, $this->mode . 'b' . (($fzopen == 'gzopen') ? '9' : ''));
+
+ if (!$this->fp)
+ {
+ trigger_error('Unable to open file ' . $this->file . ' [' . $fzopen . ' - ' . $this->mode . 'b]');
+ }
}
function download($filename)
@@ -601,7 +613,7 @@ class compress_tar extends compress
case 'tar.bz2':
$mimetype = 'application/x-bzip2';
break;
-
+
default:
$mimetype = 'application/octet-stream';
break;
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
index f1e7b130f0..3d74069946 100644
--- a/phpBB/includes/functions_jabber.php
+++ b/phpBB/includes/functions_jabber.php
@@ -163,7 +163,7 @@ class jabber
//EVENT: Disconnected
}
- $this->returned_keep_alive = FALSE;
+ $this->returned_keep_alive = false;
$this->keep_alive_id = 'keep_alive_' . time();
$this->send_packet("<iq id='{$this->keep_alive_id}'/>", 'cruise_control');
$this->last_ping_time = date('H:i');
@@ -190,12 +190,12 @@ class jabber
// auth_0k
return $this->_sendauth_ok($packet['iq']['#']['query'][0]['#']['token'][0]['#'], $packet['iq']['#']['query'][0]['#']['sequence'][0]['#']);
}
- elseif (@function_exists('mhash') && isset($packet['iq']['#']['query'][0]['#']['digest']))
+ else if (@function_exists('mhash') && isset($packet['iq']['#']['query'][0]['#']['digest']))
{
// digest
return $this->_sendauth_digest();
}
- elseif ($packet['iq']['#']['query'][0]['#']['password'])
+ else if ($packet['iq']['#']['query'][0]['#']['password'])
{
// plain text
return $this->_sendauth_plaintext();
@@ -231,7 +231,7 @@ class jabber
$return_code = (isset($packet['iq']['#']['query'][0]['#']['registered'][0]['#'])) ? 1 : 2;
$this->jid = ($this->resource) ? "{$this->username}@{$this->server}/{$this->resource}" : "{$this->username}@{$this->server}";
}
- elseif ($this->get_info_from_iq_type($packet) == 'error' && isset($packet['iq']['#']['error'][0]['#']))
+ else if ($this->get_info_from_iq_type($packet) == 'error' && isset($packet['iq']['#']['error'][0]['#']))
{
// "conflict" error, i.e. already registered
if ($packet['iq']['#']['error'][0]['@']['code'] == '409')
@@ -271,7 +271,7 @@ class jabber
{
$return_code = (isset($packet['iq']['#']['query'][0]['#']['registered'][0]['#'])) ? 1 : 2;
}
- elseif ($this->get_info_from_iq_type($packet) == 'error' && isset($packet['iq']['#']['error'][0]['#']))
+ else if ($this->get_info_from_iq_type($packet) == 'error' && isset($packet['iq']['#']['error'][0]['#']))
{
// "conflict" error, i.e. already registered
if ($packet['iq']['#']['error'][0]['@']['code'] == '409')
@@ -357,7 +357,7 @@ class jabber
$return_code = 2;
}
}
- elseif ($this->get_info_from_iq_type($packet) == 'error')
+ else if ($this->get_info_from_iq_type($packet) == 'error')
{
if (isset($packet['iq']['#']['error'][0]['#']))
{
@@ -508,13 +508,13 @@ class jabber
$type = ($type != '') ? $type : 'normal';
$funcmeth = "handler_message_$type";
}
- elseif ($packet_type == 'iq')
+ else if ($packet_type == 'iq')
{
$namespace = $packet['iq']['#']['query'][0]['@']['xmlns'];
$namespace = str_replace(':', '_', $namespace);
$funcmeth = "handler_iq_$namespace";
}
- elseif ($packet_type == 'presence')
+ else if ($packet_type == 'presence')
{
$type = $packet['presence']['@']['type'];
$type = ($type != '') ? $type : 'available';
@@ -527,7 +527,7 @@ class jabber
{
call_user_func($funcmeth, $packet);
}
- elseif (method_exists($this, $funcmeth))
+ else if (method_exists($this, $funcmeth))
{
call_user_func(array(&$this, $funcmeth), $packet);
}
@@ -995,11 +995,11 @@ class make_xml extends jabber
$text .= ">\n";
}
- elseif ($key == '#')
+ else if ($key == '#')
{
$text .= htmlspecialchars($value);
}
- elseif (is_array($value))
+ else if (is_array($value))
{
for ($a = 0, $size = sizeof($value); $a < $size; $a++)
{
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index efe388cc85..f23dd3a55c 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -640,13 +640,13 @@ class queue
{
$lines[] = "'$k'=>" . $this->format_array($v);
}
- elseif (is_int($v))
+ else if (is_int($v))
{
$lines[] = "'$k'=>$v";
}
- elseif (is_bool($v))
+ else if (is_bool($v))
{
- $lines[] = "'$k'=>" . (($v) ? 'TRUE' : 'FALSE');
+ $lines[] = "'$k'=>" . (($v) ? 'true' : 'false');
}
else
{
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 7283a72e37..dffa4717c5 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -126,7 +126,9 @@ function get_folder($user_id, &$folder, $folder_id = false)
$db->sql_freeresult($result);
// Make sure the default boxes are defined
- foreach (array(PRIVMSGS_INBOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX) as $default_folder)
+ $available_folder = array(PRIVMSGS_INBOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX);
+
+ foreach ($available_folder as $default_folder)
{
if (!isset($num_messages[$default_folder]))
{
@@ -904,8 +906,9 @@ function rebuild_header($check_ary)
{
${$type}[] = (int) $match[2][$id];
}
-
- foreach (array('u', 'g') as $type)
+
+ $_types = array('u', 'g');
+ foreach ($_types as $type)
{
if (sizeof($$type))
{
@@ -1098,7 +1101,8 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr
{
// Build Recipient List
// u|g => array($user_id => 'to'|'bcc')
- foreach (array('u', 'g') as $ug_type)
+ $_types = array('u', 'g');
+ foreach ($_types as $ug_type)
{
if (isset($data['address_list'][$ug_type]) && sizeof($data['address_list'][$ug_type]))
{
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 3bb89ea429..c5593c5ba3 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -202,7 +202,7 @@ function user_delete($mode, $user_id)
$db->freeresult($result);
}
- set_config('num_users', $config['num_users'] - 1, TRUE);
+ set_config('num_users', $config['num_users'] - 1, true);
$db->sql_transaction('commit');
diff --git a/phpBB/includes/search/fulltext_phpbb.php b/phpBB/includes/search/fulltext_phpbb.php
index 0a4a445b56..b4b0efb7b1 100644
--- a/phpBB/includes/search/fulltext_phpbb.php
+++ b/phpBB/includes/search/fulltext_phpbb.php
@@ -139,7 +139,8 @@ class fulltext_phpbb
$sql_find_in = (sizeof($pid_ary)) ? 'AND ' . (($type == 'topics') ? 't.topic_id' : 'm.post_id') . ' IN (' . implode(', ', $pid_ary) . ')' : '';
$result_ary = array();
- foreach (array('AND', 'OR', 'NOT') as $bool)
+ $_bool = array('AND', 'OR', 'NOT');
+ foreach ($_bool as $bool)
{
if (isset($sql_words[$bool]) && is_array($sql_words[$bool]))
{
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 1c14f917d5..2a05db89a1 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -666,7 +666,8 @@ function compose_pm($id, $mode, $action)
}
$u = $g = array();
- foreach (array('u', 'g') as $type)
+ $_types = array('u', 'g');
+ foreach ($_types as $type)
{
if (isset($result[$type]) && $result[$type])
{
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index c8a2ce29db..1b97f64ff1 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -74,7 +74,8 @@ function view_folder($id, $mode, $folder_id, $folder, $type)
foreach ($folder_info['rowset'] as $message_id => $row)
{
$address[$message_id] = rebuild_header(array('to' => $row['to_address'], 'bcc' => $row['bcc_address']));
- foreach (array('u', 'g') as $save)
+ $_save = array('u', 'g');
+ foreach ($_save as $save)
{
if (isset($address[$message_id][$save]) && sizeof($address[$message_id][$save]))
{
@@ -86,7 +87,8 @@ function view_folder($id, $mode, $folder_id, $folder, $type)
}
}
- foreach (array('u', 'g') as $ug_type)
+ $_types = array('u', 'g');
+ foreach ($_types as $ug_type)
{
if (isset($recipient_list[$ug_type]) && sizeof($recipient_list[$ug_type]))
{
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index 8d59d04bd7..ae8f143817 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -279,7 +279,8 @@ class ucp_prefs
$sort_by_post_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']);
$sort_by_post_sql = array('a' => 'u.username', 't' => 'p.post_id', 's' => 'p.post_subject');
- foreach (array('topic', 'post') as $sort_option)
+ $_options = array('topic', 'post');
+ foreach ($_options as $sort_option)
{
${'s_limit_' . $sort_option . '_days'} = '<select name="' . $sort_option . '_st">';
foreach (${'limit_' . $sort_option . '_days'} as $day => $text)
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 60990b4760..30d1edada4 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -52,10 +52,13 @@ $lang += array(
'ACP_EXTENSION_GROUPS' => 'Manage Extension Groups',
'ACP_FORUM_LOGS' => 'Forum Logs',
'ACP_GENERAL_CONFIGURATION' => 'General Configuration',
+ 'ACP_GENERAL_TASKS' => 'General Tasks',
'ACP_ICONS' => 'Topic Icons',
'ACP_ICONS_SMILIES' => 'Topic Icons/Smilies',
'ACP_INDEX' => 'Admin index',
'ACP_JABBER_SETTINGS' => 'Jabber Settings',
+ 'ACP_LANGUAGE' => 'Language Management',
+ 'ACP_LANGUAGE_PACKS' => 'Language Packs',
'ACP_LOAD_SETTINGS' => 'Load Settings',
'ACP_LOGGING' => 'Logging',
'ACP_MAIN' => 'Admin index',
@@ -86,6 +89,8 @@ $lang += array(
'DIMENSIONS' => 'Dimensions',
'DISABLE' => 'Disable',
'DISPLAY' => 'Display',
+ 'DOWNLOAD' => 'Download',
+ 'DOWNLOAD_AS' => 'Download as',
'EDIT' => 'Edit',
'ENABLE' => 'Enable',
@@ -95,6 +100,7 @@ $lang += array(
'GENERAL_OPTIONS' => 'General Options',
'GENERAL_SETTINGS' => 'General Settings',
+ 'INSTALL' => 'Install',
'IP' => 'User IP',
'IP_HOSTNAME' => 'IP addresses or hostnames',
@@ -205,6 +211,21 @@ $lang += array(
'LOG_BOT_DELETE' => '<b>Deleted bot</b><br />&#187; %s',
'LOG_BOT_UPDATED' => '<b>Existing bot updated</b><br />&#187; %s',
+ 'LOG_CLEAR_ADMIN' => '<b>Cleared admin log</b>',
+ 'LOG_CLEAR_MODE' => '<b>Cleared moderator log</b>',
+ 'LOG_CLEAR_CRITICAL' => '<b>Cleared error log</b>',
+
+ 'LOG_CONFIG_ATTACH' => '<b>Altered attachment settings</b>',
+ 'LOG_CONFIG_AUTH' => '<b>Altered authentication settings</b>',
+ 'LOG_CONFIG_AVATAR' => '<b>Altered avatar settings</b>',
+ 'LOG_CONFIG_COOKIE' => '<b>Altered cookie settings</b>',
+ 'LOG_CONFIG_DEFAULT' => '<b>Altered board defaults</b>',
+ 'LOG_CONFIG_EMAIL' => '<b>Altered email settings</b>',
+ 'LOG_CONFIG_LOAD' => '<b>Altered load settings</b>',
+ 'LOG_CONFIG_MESSAGE' => '<b>Altered private message settings</b>',
+ 'LOG_CONFIG_SERVER' => '<b>Altered server settings</b>',
+ 'LOG_CONFIG_SETTINGS' => '<b>Altered board settings</b>',
+
'LOG_DOWNLOAD_EXCLUDE_IP' => '<b>Exluded ip/hostname from download list</b><br />&#187; %s',
'LOG_DOWNLOAD_IP' => '<b>Added ip/hostname to download list</b><br />&#187; %s',
'LOG_DOWNLOAD_REMOVE_IP' => '<b>Removed ip/hostname from download list</b><br />&#187; %s',
@@ -217,6 +238,10 @@ $lang += array(
'LOG_JAB_PASSCHG' => '<b>Jabber password changed</b>',
'LOG_JAB_REGISTER' => '<b>Jabber account registered</b>',
+ 'LOG_LANGUAGE_PACK_DELETED' => '<b>Deleted language pack</b><br />&#187; %s',
+ 'LOG_LANGUAGE_PACK_INSTALLED' => '<b>Installed language pack</b><br />&#187; %s',
+ 'LOG_LANGUAGE_PACK_UPDATED' => '<b>Updated language pack details</b><br />&#187; %s',
+
'LOG_MODULE_DISABLE' => '<b>Module disabled</b>',
'LOG_MODULE_ENABLE' => '<b>Module enabled</b>',
'LOG_MODULE_MOVE_DOWN' => '<b>Module moved down</b><br />&#187; %s',
@@ -230,24 +255,10 @@ $lang += array(
'LOG_RESYNC_POSTCOUNTS' => '<b>User postcounts synced</b>',
'LOG_RESYNC_STATS' => '<b>Post, topic and user stats reset</b>',
- 'LOG_CONFIG_ATTACH' => '<b>Altered attachment settings</b>',
- 'LOG_CONFIG_AUTH' => '<b>Altered authentication settings</b>',
- 'LOG_CONFIG_AVATAR' => '<b>Altered avatar settings</b>',
- 'LOG_CONFIG_COOKIE' => '<b>Altered cookie settings</b>',
- 'LOG_CONFIG_DEFAULT' => '<b>Altered board defaults</b>',
- 'LOG_CONFIG_EMAIL' => '<b>Altered email settings</b>',
- 'LOG_CONFIG_LOAD' => '<b>Altered load settings</b>',
- 'LOG_CONFIG_MESSAGE' => '<b>Altered private message settings</b>',
- 'LOG_CONFIG_SERVER' => '<b>Altered server settings</b>',
- 'LOG_CONFIG_SETTINGS' => '<b>Altered board settings</b>',
-
'LOG_WORD_ADD' => '<b>Added word censor</b><br />&#187; %s',
'LOG_WORD_DELETE' => '<b>Deleted word censor</b><br />&#187; %s',
'LOG_WORD_EDIT' => '<b>Edited word censor</b><br />&#187; %s',
- 'LOG_ADMIN_CLEAR' => '<b>Cleared admin log</b>',
- 'LOG_MOD_CLEAR' => '<b>Cleared moderator log</b>',
- 'LOG_CRITICAL_CLEAR' => '<b>Cleared error log</b>',
);
?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/language.php b/phpBB/language/en/acp/language.php
new file mode 100644
index 0000000000..927aaf5afb
--- /dev/null
+++ b/phpBB/language/en/acp/language.php
@@ -0,0 +1,86 @@
+<?php
+/**
+*
+* acp_language [English]
+*
+* @package language
+* @version $Id$
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang += array(
+ 'ACP_FILES' => 'Admin Language Files',
+ 'ACP_LANGUAGE_PACKS_EXPLAIN' => 'Here you are able to install/remove language packs',
+
+ 'EMAIL_FILES' => 'Email Templates',
+
+ 'FILE_CONTENTS' => 'File Contents',
+ 'FILE_FROM_STORAGE' => 'File from storage folder',
+
+ 'HELP_FILES' => 'Help Files',
+
+ 'INSTALLED_LANGUAGE_PACKS' => 'Installed language packs',
+ 'INVALID_LANGUAGE_PACK' => 'The selected language pack seems to be not valid. Please verify the language pack and upload it again if necessary.',
+
+ 'LANGUAGE_DETAILS_UPDATED' => 'Language details successfully updated',
+ 'LANGUAGE_ENTRIES' => 'Language Entries',
+ 'LANGUAGE_ENTRIES_EXPLAIN' => 'Here you are able to change existing language pack entries or not already translated ones.<br /><b>Note:</b> Once you changed a language file, the changes will be stored within a seperate folder for you to download. The changes will not be seen by your users until you replace the original language files at your webspace (by uploading them).',
+ 'LANGUAGE_FILES' => 'Language Files',
+ 'LANGUAGE_KEY' => 'Language Key',
+ 'LANGUAGE_PACK_ALREADY_INSTALLED' => 'This language pack is already installed.',
+ 'LANGUAGE_PACK_DELETED' => 'The language pack <b>%s</b> has been removed successfully. All users using this language have been resetted to the boards default language.',
+ 'LANGUAGE_PACK_DETAILS' => 'Language Pack Details',
+ 'LANGUAGE_PACK_INSTALLED' => 'The language pack <b>%s</b> has been successfully installed.',
+ 'LANGUAGE_PACK_ISO' => 'ISO',
+ 'LANGUAGE_PACK_LOCALNAME' => 'Local name',
+ 'LANGUAGE_PACK_NAME' => 'Name',
+ 'LANGUAGE_PACK_NOT_EXIST' => 'The selected language pack does not exist.',
+ 'LANGUAGE_PACK_USED_BY' => 'Used by',
+ 'LANGUAGE_VARIABLE' => 'Language Variable',
+ 'LANG_AUTHOR' => 'Language Pack Author',
+ 'LANG_ENGLISH_NAME' => 'English name',
+ 'LANG_ISO_CODE' => 'ISO Code',
+ 'LANG_LOCAL_NAME' => 'Local name',
+
+ 'MISSING_LANGUAGE_FILE' => 'Missing Language File: <span style="color:red">%s</span>',
+ 'MISSING_LANG_VARIABLES' => 'Missing Language Variables',
+ 'MODS_FILES' => 'Mods Language Files',
+
+ 'NO_LANG_ID' => 'You haven\'t specified a language pack',
+ 'NO_REMOVE_DEFAULT_LANG' => 'You are not able to remove the default language pack.<br />If you want to remove this language pack, change your boards default language first.',
+ 'NO_UNINSTALLED_LANGUAGE_PACKS' => 'No uninstalled language packs',
+
+ 'REMOVE_FROM_STORAGE_FOLDER' => 'Remove from storage folder',
+
+ 'SELECT_DOWNLOAD_FORMAT' => 'Select download format',
+ 'SUBMIT_AND_DOWNLOAD' => 'Submit and Download File',
+
+ 'THOSE_MISSING_LANG_FILES' => 'The following language files are missing from the %s language folder',
+ 'THOSE_MISSING_LANG_VARIABLES' => 'The following language variables are missing from the <b>%s</b> language pack',
+
+ 'UNINSTALLED_LANGUAGE_PACKS' => 'Uninstalled language packs',
+
+ 'WRONG_LANGUAGE_FILE' => 'Selected language file is invalid',
+);
+
+?> \ No newline at end of file
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index a165eeae78..2895a51aac 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -532,40 +532,40 @@ $lang += array(
'11' => 'GMT + 11 Hours',
'12' => 'GMT + 12 Hours',
'dst' => '[ DST ]',
+ ),
- 'zones' => array(
- '-12' => '[GMT-12] Eniwetok, Kwaialein',
- '-11' => '[GMT-11] Midway Island, Samoa',
- '-10' => '[GMT-10] Hawaii, Honolulu',
- '-9' => '[GMT-9] Alaska',
- '-8' => '[GMT-8] Anchorage, Los Angeles, San Francisco, Seattle',
- '-7' => '[GMT-7] Denver, Edmonton, Phoenix, Salt Lake City, Santa Fe',
- '-6' => '[GMT-6] Chicago, Guatamala, Mexico City, Saskatchewan East',
- '-5' => '[GMT-5] Bogota, Kingston, Lima, New York',
- '-4' => '[GMT-4] Caracas, Labrador, La Paz, Maritimes, Santiago',
- '-3.5' => '[GMT-3.5] Standard Time [Canada], Newfoundland',
- '-3' => '[GMT-3] Brazilia, Buenos Aires, Georgetown, Rio de Janero',
- '-2' => '[GMT-2] Mid-Atlantic',
- '-1' => '[GMT-1] Azores, Cape Verde Is.',
- '0' => '[GMT] Dublin, Edinburgh, Iceland, Lisbon, London, Casablanca',
- '1' => '[GMT+1] Amsterdam, Berlin, Bern, Brussells, Madrid, Paris, Rome, Oslo, Vienna',
- '2' => '[GMT+2] Athens, Bucharest, Harare, Helsinki, Israel, Istanbul',
- '3' => '[GMT+3] Ankara, Baghdad, Bahrain, Beruit, Kuwait, Moscow, Nairobi, Riyadh',
- '3.5' => '[GMT+3.5] Iran',
- '4' => '[GMT+4] Abu Dhabi, Kabul, Muscat, Tbilisi, Volgograd',
- '4.5' => '[GMT+4.5] Afghanistan',
- '5' => '[GMT+5] Calcutta, Madras, New Dehli',
- '5.5' => '[GMT+5.5] India',
- '6' => '[GMT+6] Almaty, Dhakar, Kathmandu',
- '6.5' => '[GMT+6.5] Rangoon',
- '7' => '[GMT+7] Bangkok, Hanoi, Jakarta, Phnom Penh',
- '8' => '[GMT+8] Beijing, Hong Kong, Kuala Lumpar, Manila, Perth, Singapore, Taipei',
- '9' => '[GMT+9] Osaka, Sapporo, Seoul, Tokyo, Yakutsk',
- '9.5' => '[GMT+9.5] Adelaide, Darwin',
- '10' => '[GMT+10] Brisbane, Canberra, Guam, Hobart, Melbourne, Port Moresby, Sydney',
- '11' => '[GMT+11] Magadan, New Caledonia, Solomon Is.',
- '12' => '[GMT+12] Auckland, Fiji, Kamchatka, Marshall Is., Suva, Wellington'
- ),
+ 'tz_zones' => array(
+ '-12' => '[GMT-12] Eniwetok, Kwaialein',
+ '-11' => '[GMT-11] Midway Island, Samoa',
+ '-10' => '[GMT-10] Hawaii, Honolulu',
+ '-9' => '[GMT-9] Alaska',
+ '-8' => '[GMT-8] Anchorage, Los Angeles, San Francisco, Seattle',
+ '-7' => '[GMT-7] Denver, Edmonton, Phoenix, Salt Lake City, Santa Fe',
+ '-6' => '[GMT-6] Chicago, Guatamala, Mexico City, Saskatchewan East',
+ '-5' => '[GMT-5] Bogota, Kingston, Lima, New York',
+ '-4' => '[GMT-4] Caracas, Labrador, La Paz, Maritimes, Santiago',
+ '-3.5' => '[GMT-3.5] Standard Time [Canada], Newfoundland',
+ '-3' => '[GMT-3] Brazilia, Buenos Aires, Georgetown, Rio de Janero',
+ '-2' => '[GMT-2] Mid-Atlantic',
+ '-1' => '[GMT-1] Azores, Cape Verde Is.',
+ '0' => '[GMT] Dublin, Edinburgh, Iceland, Lisbon, London, Casablanca',
+ '1' => '[GMT+1] Amsterdam, Berlin, Bern, Brussells, Madrid, Paris, Rome, Oslo, Vienna',
+ '2' => '[GMT+2] Athens, Bucharest, Harare, Helsinki, Israel, Istanbul',
+ '3' => '[GMT+3] Ankara, Baghdad, Bahrain, Beruit, Kuwait, Moscow, Nairobi, Riyadh',
+ '3.5' => '[GMT+3.5] Iran',
+ '4' => '[GMT+4] Abu Dhabi, Kabul, Muscat, Tbilisi, Volgograd',
+ '4.5' => '[GMT+4.5] Afghanistan',
+ '5' => '[GMT+5] Calcutta, Madras, New Dehli',
+ '5.5' => '[GMT+5.5] India',
+ '6' => '[GMT+6] Almaty, Dhakar, Kathmandu',
+ '6.5' => '[GMT+6.5] Rangoon',
+ '7' => '[GMT+7] Bangkok, Hanoi, Jakarta, Phnom Penh',
+ '8' => '[GMT+8] Beijing, Hong Kong, Kuala Lumpar, Manila, Perth, Singapore, Taipei',
+ '9' => '[GMT+9] Osaka, Sapporo, Seoul, Tokyo, Yakutsk',
+ '9.5' => '[GMT+9.5] Adelaide, Darwin',
+ '10' => '[GMT+10] Brisbane, Canberra, Guam, Hobart, Melbourne, Port Moresby, Sydney',
+ '11' => '[GMT+11] Magadan, New Caledonia, Solomon Is.',
+ '12' => '[GMT+12] Auckland, Fiji, Kamchatka, Marshall Is., Suva, Wellington'
),
// The value is only an example and will get replaced by the current time on view