mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
some updates. Also adjusted the utf tools and normalizer more to our coding guidelines.
git-svn-id: file:///svn/phpbb/trunk@6312 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
b0afc8e632
commit
1d42d1b981
30 changed files with 1545 additions and 1875 deletions
|
@ -177,8 +177,8 @@
|
||||||
</dl>
|
</dl>
|
||||||
<!-- BEGIN data -->
|
<!-- BEGIN data -->
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="store">{data.NAME}:</label><br /><span>{data.EXPLAIN}</span></dt>
|
<dt><label for="{data.DATA}">{data.NAME}:</label><br /><span>{data.EXPLAIN}</span></dt>
|
||||||
<dd><input type="text" id="{data.DATA}" name="{data.DATA}" value="{data.DEFAULT}" checked="checked" /></dd>
|
<dd><input type="text" id="{data.DATA}" name="{data.DATA}" value="{data.DEFAULT}" /></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<!-- END data -->
|
<!-- END data -->
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -34,6 +34,8 @@ Text_Diff-0.2.1 http://pear.php.net/package/Text_Diff
|
||||||
GPL licenced:
|
GPL licenced:
|
||||||
phpMyAdmin © 2001,2003 phpMyAdmin Devel team, http://www.phpmyadmin.net/
|
phpMyAdmin © 2001,2003 phpMyAdmin Devel team, http://www.phpmyadmin.net/
|
||||||
Jabber class © 2003 Carlo Zottmann, http://phpjabber.g-blog.net
|
Jabber class © 2003 Carlo Zottmann, http://phpjabber.g-blog.net
|
||||||
|
Chora: Copyright 2000-2006, The Horde Project. http://horde.org/chora/
|
||||||
|
Horde Project: Copyright 2000-2006, The Horde Project. http://horde.org/
|
||||||
|
|
||||||
PHP License, version 3.0:
|
PHP License, version 3.0:
|
||||||
Pear © 2001-2004 PHP Group, http://pear.php.net
|
Pear © 2001-2004 PHP Group, http://pear.php.net
|
||||||
|
|
|
@ -175,6 +175,32 @@ class acm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Purge cache data
|
||||||
|
*/
|
||||||
|
function purge()
|
||||||
|
{
|
||||||
|
// Purge sql data
|
||||||
|
$dir = opendir($this->cache_dir);
|
||||||
|
while (($entry = readdir($dir)) !== false)
|
||||||
|
{
|
||||||
|
if (strpos($entry, 'sql_') !== 0 && strpos($entry, 'data_') !== 0 && strpos($entry, 'ctpl_') !== 0 && strpos($entry, 'tpl_') !== 0)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
@unlink($this->cache_dir . $entry);
|
||||||
|
}
|
||||||
|
@closedir($dir);
|
||||||
|
|
||||||
|
unset($this->vars);
|
||||||
|
unset($this->var_expires);
|
||||||
|
unset($this->sql_rowset);
|
||||||
|
unset($this->sql_row_pointer);
|
||||||
|
|
||||||
|
$this->is_modified = false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroy cache data
|
* Destroy cache data
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -433,7 +433,7 @@ class acp_database
|
||||||
|
|
||||||
$column_list = array();
|
$column_list = array();
|
||||||
$table_cols = explode(',', trim($matches[1]));
|
$table_cols = explode(',', trim($matches[1]));
|
||||||
foreach($table_cols as $declaration)
|
foreach ($table_cols as $declaration)
|
||||||
{
|
{
|
||||||
$entities = preg_split('#\s+#', trim($declaration));
|
$entities = preg_split('#\s+#', trim($declaration));
|
||||||
$column_name = preg_replace('/"?([^"]+)"?/', '\1', $entities[0]);
|
$column_name = preg_replace('/"?([^"]+)"?/', '\1', $entities[0]);
|
||||||
|
|
|
@ -838,7 +838,7 @@ class acp_language
|
||||||
$compress->close();
|
$compress->close();
|
||||||
|
|
||||||
$compress->download('lang_' . $row['lang_iso']);
|
$compress->download('lang_' . $row['lang_iso']);
|
||||||
@unlink($phpbb_root_path . 'store/lang_' . $row['lang_iso'] . '.' . $use_method);
|
@unlink($phpbb_root_path . 'store/lang_' . $row['lang_iso'] . $use_method);
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ class acp_profile
|
||||||
$new_table_cols = trim($matches[1]);
|
$new_table_cols = trim($matches[1]);
|
||||||
$old_table_cols = explode(',', $new_table_cols);
|
$old_table_cols = explode(',', $new_table_cols);
|
||||||
$column_list = array();
|
$column_list = array();
|
||||||
foreach($old_table_cols as $declaration)
|
foreach ($old_table_cols as $declaration)
|
||||||
{
|
{
|
||||||
$entities = preg_split('#\s+#', trim($declaration));
|
$entities = preg_split('#\s+#', trim($declaration));
|
||||||
if ($entities[0] !== '_' . $field_ident)
|
if ($entities[0] !== '_' . $field_ident)
|
||||||
|
|
|
@ -131,7 +131,7 @@ class dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQL Transaction
|
* SQL Transaction
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function sql_transaction($status = 'begin')
|
function sql_transaction($status = 'begin')
|
||||||
{
|
{
|
||||||
|
|
|
@ -66,7 +66,7 @@ class dbal_firebird extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQL Transaction
|
* SQL Transaction
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_transaction($status = 'begin')
|
function _sql_transaction($status = 'begin')
|
||||||
{
|
{
|
||||||
|
@ -360,7 +360,7 @@ class dbal_firebird extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific query data
|
* Build db-specific query data
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_custom_build($stage, $data)
|
function _sql_custom_build($stage, $data)
|
||||||
{
|
{
|
||||||
|
@ -369,7 +369,7 @@ class dbal_firebird extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return sql error array
|
* return sql error array
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_error()
|
function _sql_error()
|
||||||
{
|
{
|
||||||
|
@ -381,7 +381,7 @@ class dbal_firebird extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close sql connection
|
* Close sql connection
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_close()
|
function _sql_close()
|
||||||
{
|
{
|
||||||
|
@ -395,7 +395,7 @@ class dbal_firebird extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific report
|
* Build db-specific report
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_report($mode, $query = '')
|
function _sql_report($mode, $query = '')
|
||||||
{
|
{
|
||||||
|
|
|
@ -79,7 +79,7 @@ class dbal_mssql extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQL Transaction
|
* SQL Transaction
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_transaction($status = 'begin')
|
function _sql_transaction($status = 'begin')
|
||||||
{
|
{
|
||||||
|
@ -371,7 +371,7 @@ class dbal_mssql extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return sql error array
|
* return sql error array
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_error()
|
function _sql_error()
|
||||||
{
|
{
|
||||||
|
@ -410,7 +410,7 @@ class dbal_mssql extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific query data
|
* Build db-specific query data
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_custom_build($stage, $data)
|
function _sql_custom_build($stage, $data)
|
||||||
{
|
{
|
||||||
|
@ -419,7 +419,7 @@ class dbal_mssql extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close sql connection
|
* Close sql connection
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_close()
|
function _sql_close()
|
||||||
{
|
{
|
||||||
|
@ -428,7 +428,7 @@ class dbal_mssql extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific report
|
* Build db-specific report
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_report($mode, $query = '')
|
function _sql_report($mode, $query = '')
|
||||||
{
|
{
|
||||||
|
|
|
@ -73,7 +73,7 @@ class dbal_mssql_odbc extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQL Transaction
|
* SQL Transaction
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_transaction($status = 'begin')
|
function _sql_transaction($status = 'begin')
|
||||||
{
|
{
|
||||||
|
@ -381,7 +381,7 @@ class dbal_mssql_odbc extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific query data
|
* Build db-specific query data
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_custom_build($stage, $data)
|
function _sql_custom_build($stage, $data)
|
||||||
{
|
{
|
||||||
|
@ -390,7 +390,7 @@ class dbal_mssql_odbc extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return sql error array
|
* return sql error array
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_error()
|
function _sql_error()
|
||||||
{
|
{
|
||||||
|
@ -402,7 +402,7 @@ class dbal_mssql_odbc extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close sql connection
|
* Close sql connection
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_close()
|
function _sql_close()
|
||||||
{
|
{
|
||||||
|
@ -411,7 +411,7 @@ class dbal_mssql_odbc extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific report
|
* Build db-specific report
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_report($mode, $query = '')
|
function _sql_report($mode, $query = '')
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,7 @@ class dbal_mysql extends dbal
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Connect to server
|
* Connect to server
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false)
|
function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false)
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ class dbal_mysql extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQL Transaction
|
* SQL Transaction
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_transaction($status = 'begin')
|
function _sql_transaction($status = 'begin')
|
||||||
{
|
{
|
||||||
|
@ -330,7 +330,7 @@ class dbal_mysql extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific query data
|
* Build db-specific query data
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_custom_build($stage, $data)
|
function _sql_custom_build($stage, $data)
|
||||||
{
|
{
|
||||||
|
@ -346,7 +346,7 @@ class dbal_mysql extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return sql error array
|
* return sql error array
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_error()
|
function _sql_error()
|
||||||
{
|
{
|
||||||
|
@ -366,7 +366,7 @@ class dbal_mysql extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close sql connection
|
* Close sql connection
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_close()
|
function _sql_close()
|
||||||
{
|
{
|
||||||
|
@ -375,7 +375,7 @@ class dbal_mysql extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific report
|
* Build db-specific report
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_report($mode, $query = '')
|
function _sql_report($mode, $query = '')
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,7 +67,7 @@ class dbal_mysql4 extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQL Transaction
|
* SQL Transaction
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_transaction($status = 'begin')
|
function _sql_transaction($status = 'begin')
|
||||||
{
|
{
|
||||||
|
@ -333,7 +333,7 @@ class dbal_mysql4 extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific query data
|
* Build db-specific query data
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_custom_build($stage, $data)
|
function _sql_custom_build($stage, $data)
|
||||||
{
|
{
|
||||||
|
@ -349,7 +349,7 @@ class dbal_mysql4 extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return sql error array
|
* return sql error array
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_error()
|
function _sql_error()
|
||||||
{
|
{
|
||||||
|
@ -369,7 +369,7 @@ class dbal_mysql4 extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close sql connection
|
* Close sql connection
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_close()
|
function _sql_close()
|
||||||
{
|
{
|
||||||
|
@ -378,7 +378,7 @@ class dbal_mysql4 extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific report
|
* Build db-specific report
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_report($mode, $query = '')
|
function _sql_report($mode, $query = '')
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,7 +67,7 @@ class dbal_mysqli extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQL Transaction
|
* SQL Transaction
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_transaction($status = 'begin')
|
function _sql_transaction($status = 'begin')
|
||||||
{
|
{
|
||||||
|
@ -313,7 +313,7 @@ class dbal_mysqli extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific query data
|
* Build db-specific query data
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_custom_build($stage, $data)
|
function _sql_custom_build($stage, $data)
|
||||||
{
|
{
|
||||||
|
@ -329,7 +329,7 @@ class dbal_mysqli extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return sql error array
|
* return sql error array
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_error()
|
function _sql_error()
|
||||||
{
|
{
|
||||||
|
@ -349,7 +349,7 @@ class dbal_mysqli extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close sql connection
|
* Close sql connection
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_close()
|
function _sql_close()
|
||||||
{
|
{
|
||||||
|
@ -358,7 +358,7 @@ class dbal_mysqli extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific report
|
* Build db-specific report
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_report($mode, $query = '')
|
function _sql_report($mode, $query = '')
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,7 +57,7 @@ class dbal_oracle extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQL Transaction
|
* SQL Transaction
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_transaction($status = 'begin')
|
function _sql_transaction($status = 'begin')
|
||||||
{
|
{
|
||||||
|
@ -443,7 +443,7 @@ class dbal_oracle extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return sql error array
|
* return sql error array
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_error()
|
function _sql_error()
|
||||||
{
|
{
|
||||||
|
@ -465,7 +465,7 @@ class dbal_oracle extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close sql connection
|
* Close sql connection
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_close()
|
function _sql_close()
|
||||||
{
|
{
|
||||||
|
@ -474,7 +474,7 @@ class dbal_oracle extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific report
|
* Build db-specific report
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_report($mode, $query = '')
|
function _sql_report($mode, $query = '')
|
||||||
{
|
{
|
||||||
|
|
|
@ -105,7 +105,7 @@ class dbal_postgres extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQL Transaction
|
* SQL Transaction
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_transaction($status = 'begin')
|
function _sql_transaction($status = 'begin')
|
||||||
{
|
{
|
||||||
|
@ -189,7 +189,7 @@ class dbal_postgres extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific query data
|
* Build db-specific query data
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_custom_build($stage, $data)
|
function _sql_custom_build($stage, $data)
|
||||||
{
|
{
|
||||||
|
@ -398,7 +398,7 @@ class dbal_postgres extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return sql error array
|
* return sql error array
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_error()
|
function _sql_error()
|
||||||
{
|
{
|
||||||
|
@ -410,7 +410,7 @@ class dbal_postgres extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close sql connection
|
* Close sql connection
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_close()
|
function _sql_close()
|
||||||
{
|
{
|
||||||
|
@ -419,7 +419,7 @@ class dbal_postgres extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific report
|
* Build db-specific report
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_report($mode, $query = '')
|
function _sql_report($mode, $query = '')
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,7 +63,7 @@ class dbal_sqlite extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQL Transaction
|
* SQL Transaction
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_transaction($status = 'begin')
|
function _sql_transaction($status = 'begin')
|
||||||
{
|
{
|
||||||
|
@ -310,7 +310,7 @@ class dbal_sqlite extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return sql error array
|
* return sql error array
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_error()
|
function _sql_error()
|
||||||
{
|
{
|
||||||
|
@ -322,7 +322,7 @@ class dbal_sqlite extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific query data
|
* Build db-specific query data
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_custom_build($stage, $data)
|
function _sql_custom_build($stage, $data)
|
||||||
{
|
{
|
||||||
|
@ -331,7 +331,7 @@ class dbal_sqlite extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close sql connection
|
* Close sql connection
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_close()
|
function _sql_close()
|
||||||
{
|
{
|
||||||
|
@ -340,7 +340,7 @@ class dbal_sqlite extends dbal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build db-specific report
|
* Build db-specific report
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sql_report($mode, $query = '')
|
function _sql_report($mode, $query = '')
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
*
|
*
|
||||||
* Set variable, used by {@link request_var the request_var function}
|
* Set variable, used by {@link request_var the request_var function}
|
||||||
*
|
*
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function set_var(&$result, $var, $type, $multibyte = false)
|
function set_var(&$result, $var, $type, $multibyte = false)
|
||||||
{
|
{
|
||||||
|
@ -1865,7 +1865,8 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||||
if (!$redirect)
|
if (!$redirect)
|
||||||
{
|
{
|
||||||
// We just use what the session code determined...
|
// We just use what the session code determined...
|
||||||
$redirect = $user->page['page_name'] . (($user->page['query_string']) ? '?' . $user->page['query_string'] : '');
|
// We do not append the phpbb_root_path directory because we are within the root dir if the redirect happens and not within the current directory.
|
||||||
|
$redirect = (($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '') . $user->page['page_name'] . (($user->page['query_string']) ? '?' . $user->page['query_string'] : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
$s_hidden_fields = build_hidden_fields(array('redirect' => $redirect, 'sid' => $user->session_id));
|
$s_hidden_fields = build_hidden_fields(array('redirect' => $redirect, 'sid' => $user->session_id));
|
||||||
|
|
|
@ -2467,7 +2467,7 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
|
||||||
}
|
}
|
||||||
else if (strpos($line, '404 Not Found') !== false)
|
else if (strpos($line, '404 Not Found') !== false)
|
||||||
{
|
{
|
||||||
$errstr = $user->lang['FILE_NOT_FOUND'];
|
$errstr = $user->lang['FILE_NOT_FOUND'] . ': ' . $filename;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -627,7 +627,7 @@ class jabber
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send auth
|
* Send auth
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sendauth_ok($zerok_token, $zerok_sequence)
|
function _sendauth_ok($zerok_token, $zerok_sequence)
|
||||||
{
|
{
|
||||||
|
@ -655,7 +655,7 @@ class jabber
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send auth digest
|
* Send auth digest
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sendauth_digest()
|
function _sendauth_digest()
|
||||||
{
|
{
|
||||||
|
@ -671,7 +671,7 @@ class jabber
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send auth plain
|
* Send auth plain
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _sendauth_plaintext()
|
function _sendauth_plaintext()
|
||||||
{
|
{
|
||||||
|
@ -687,7 +687,7 @@ class jabber
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listen on socket
|
* Listen on socket
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _listen_incoming()
|
function _listen_incoming()
|
||||||
{
|
{
|
||||||
|
@ -704,7 +704,7 @@ class jabber
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if connected
|
* Check if connected
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _check_connected()
|
function _check_connected()
|
||||||
{
|
{
|
||||||
|
@ -733,7 +733,7 @@ class jabber
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Split incoming packet
|
* Split incoming packet
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _split_incoming($incoming)
|
function _split_incoming($incoming)
|
||||||
{
|
{
|
||||||
|
@ -750,7 +750,7 @@ class jabber
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get packet type
|
* Get packet type
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _get_packet_type($packet = NULL)
|
function _get_packet_type($packet = NULL)
|
||||||
{
|
{
|
||||||
|
@ -765,7 +765,7 @@ class jabber
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recursively prepares the strings in an array to be used in XML data.
|
* Recursively prepares the strings in an array to be used in XML data.
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _array_xmlspecialchars(&$array)
|
function _array_xmlspecialchars(&$array)
|
||||||
{
|
{
|
||||||
|
@ -787,7 +787,7 @@ class jabber
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepares a string for usage in XML data.
|
* Prepares a string for usage in XML data.
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _xmlspecialchars(&$string)
|
function _xmlspecialchars(&$string)
|
||||||
{
|
{
|
||||||
|
@ -797,7 +797,7 @@ class jabber
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recursively converts all elements in an array to UTF-8 from the encoding stored in {@link encoding the encoding attribute}.
|
* Recursively converts all elements in an array to UTF-8 from the encoding stored in {@link encoding the encoding attribute}.
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _array_conv_utf8(&$array)
|
function _array_conv_utf8(&$array)
|
||||||
{
|
{
|
||||||
|
@ -830,7 +830,7 @@ class jabber
|
||||||
*
|
*
|
||||||
* @return boolean True on success, false on failure.
|
* @return boolean True on success, false on failure.
|
||||||
*
|
*
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _conv_utf8(&$string)
|
function _conv_utf8(&$string)
|
||||||
{
|
{
|
||||||
|
|
|
@ -706,7 +706,7 @@ class queue
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Format array
|
* Format array
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function format_array($array)
|
function format_array($array)
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,7 @@ class custom_profile
|
||||||
/**
|
/**
|
||||||
* Assign editable fields to template, mode can be profile (for profile change) or register (for registration)
|
* Assign editable fields to template, mode can be profile (for profile change) or register (for registration)
|
||||||
* Called by ucp_profile and ucp_register
|
* Called by ucp_profile and ucp_register
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function generate_profile_fields($mode, $lang_id)
|
function generate_profile_fields($mode, $lang_id)
|
||||||
{
|
{
|
||||||
|
@ -74,7 +74,7 @@ class custom_profile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate entered profile field data
|
* Validate entered profile field data
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function validate_profile_field($field_type, &$field_value, $field_data)
|
function validate_profile_field($field_type, &$field_value, $field_data)
|
||||||
{
|
{
|
||||||
|
@ -186,7 +186,7 @@ class custom_profile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build profile cache, used for display
|
* Build profile cache, used for display
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function build_cache()
|
function build_cache()
|
||||||
{
|
{
|
||||||
|
@ -248,7 +248,7 @@ class custom_profile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Submit profile field
|
* Submit profile field
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function submit_cp_field($mode, $lang_id, &$cp_data, &$cp_error)
|
function submit_cp_field($mode, $lang_id, &$cp_data, &$cp_error)
|
||||||
{
|
{
|
||||||
|
@ -340,7 +340,7 @@ class custom_profile
|
||||||
/**
|
/**
|
||||||
* Assign fields to template, used for viewprofile, viewtopic and memberlist (if load setting is enabled)
|
* Assign fields to template, used for viewprofile, viewtopic and memberlist (if load setting is enabled)
|
||||||
* This is directly connected to the user -> mode == grab is to grab the user specific fields, mode == show is for assigning the row to the template
|
* This is directly connected to the user -> mode == grab is to grab the user specific fields, mode == show is for assigning the row to the template
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function generate_profile_fields_template($mode, $user_id = 0, $profile_row = false)
|
function generate_profile_fields_template($mode, $user_id = 0, $profile_row = false)
|
||||||
{
|
{
|
||||||
|
@ -535,7 +535,7 @@ class custom_profile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get field value for registration/profile
|
* Get field value for registration/profile
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function get_var($field_validation, &$profile_row, $default_value, $preview)
|
function get_var($field_validation, &$profile_row, $default_value, $preview)
|
||||||
{
|
{
|
||||||
|
@ -590,7 +590,7 @@ class custom_profile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process int-type
|
* Process int-type
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function generate_int($profile_row, $preview = false)
|
function generate_int($profile_row, $preview = false)
|
||||||
{
|
{
|
||||||
|
@ -602,7 +602,7 @@ class custom_profile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process date-type
|
* Process date-type
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function generate_date($profile_row, $preview = false)
|
function generate_date($profile_row, $preview = false)
|
||||||
{
|
{
|
||||||
|
@ -661,7 +661,7 @@ class custom_profile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process bool-type
|
* Process bool-type
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function generate_bool($profile_row, $preview = false)
|
function generate_bool($profile_row, $preview = false)
|
||||||
{
|
{
|
||||||
|
@ -692,7 +692,7 @@ class custom_profile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process string-type
|
* Process string-type
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function generate_string($profile_row, $preview = false)
|
function generate_string($profile_row, $preview = false)
|
||||||
{
|
{
|
||||||
|
@ -704,7 +704,7 @@ class custom_profile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process text-type
|
* Process text-type
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function generate_text($profile_row, $preview = false)
|
function generate_text($profile_row, $preview = false)
|
||||||
{
|
{
|
||||||
|
@ -721,7 +721,7 @@ class custom_profile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process dropdown-type
|
* Process dropdown-type
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function generate_dropdown($profile_row, $preview = false)
|
function generate_dropdown($profile_row, $preview = false)
|
||||||
{
|
{
|
||||||
|
@ -750,7 +750,7 @@ class custom_profile
|
||||||
/**
|
/**
|
||||||
* Return Templated value/field. Possible values for $mode are:
|
* Return Templated value/field. Possible values for $mode are:
|
||||||
* change == user is able to set/enter profile values; preview == just show the value
|
* change == user is able to set/enter profile values; preview == just show the value
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function process_field_row($mode, $profile_row)
|
function process_field_row($mode, $profile_row)
|
||||||
{
|
{
|
||||||
|
@ -814,7 +814,7 @@ class custom_profile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get profile field value on submit
|
* Get profile field value on submit
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function get_profile_field($profile_row)
|
function get_profile_field($profile_row)
|
||||||
{
|
{
|
||||||
|
|
|
@ -52,7 +52,7 @@ class template_compile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load template source from file
|
* Load template source from file
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _tpl_load_file($handle)
|
function _tpl_load_file($handle)
|
||||||
{
|
{
|
||||||
|
@ -153,7 +153,7 @@ class template_compile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The all seeing all doing compile method. Parts are inspired by or directly from Smarty
|
* The all seeing all doing compile method. Parts are inspired by or directly from Smarty
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function compile($code, $no_echo = false, $echo_var = '')
|
function compile($code, $no_echo = false, $echo_var = '')
|
||||||
{
|
{
|
||||||
|
@ -280,7 +280,7 @@ class template_compile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compile variables
|
* Compile variables
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function compile_var_tags(&$text_blocks)
|
function compile_var_tags(&$text_blocks)
|
||||||
{
|
{
|
||||||
|
@ -322,7 +322,7 @@ class template_compile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compile blocks
|
* Compile blocks
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function compile_tag_block($tag_args)
|
function compile_tag_block($tag_args)
|
||||||
{
|
{
|
||||||
|
@ -413,7 +413,7 @@ class template_compile
|
||||||
/**
|
/**
|
||||||
* Compile IF tags - much of this is from Smarty with
|
* Compile IF tags - much of this is from Smarty with
|
||||||
* some adaptions for our block level methods
|
* some adaptions for our block level methods
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function compile_tag_if($tag_args, $elseif)
|
function compile_tag_if($tag_args, $elseif)
|
||||||
{
|
{
|
||||||
|
@ -540,7 +540,7 @@ class template_compile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compile DEFINE tags
|
* Compile DEFINE tags
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function compile_tag_define($tag_args, $op)
|
function compile_tag_define($tag_args, $op)
|
||||||
{
|
{
|
||||||
|
@ -593,7 +593,7 @@ class template_compile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compile INCLUDE tag
|
* Compile INCLUDE tag
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function compile_tag_include($tag_args)
|
function compile_tag_include($tag_args)
|
||||||
{
|
{
|
||||||
|
@ -602,7 +602,7 @@ class template_compile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compile INCLUDE_PHP tag
|
* Compile INCLUDE_PHP tag
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function compile_tag_include_php($tag_args)
|
function compile_tag_include_php($tag_args)
|
||||||
{
|
{
|
||||||
|
@ -612,7 +612,7 @@ class template_compile
|
||||||
/**
|
/**
|
||||||
* parse expression
|
* parse expression
|
||||||
* This is from Smarty
|
* This is from Smarty
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _parse_is_expr($is_arg, $tokens)
|
function _parse_is_expr($is_arg, $tokens)
|
||||||
{
|
{
|
||||||
|
@ -683,7 +683,7 @@ class template_compile
|
||||||
* ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . '
|
* ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . '
|
||||||
* It's ready to be inserted into an "echo" line in one of the templates.
|
* It's ready to be inserted into an "echo" line in one of the templates.
|
||||||
* NOTE: expects a trailing "." on the namespace.
|
* NOTE: expects a trailing "." on the namespace.
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function generate_block_varref($namespace, $varname, $echo = true, $defop = false)
|
function generate_block_varref($namespace, $varname, $echo = true, $defop = false)
|
||||||
{
|
{
|
||||||
|
@ -708,7 +708,7 @@ class template_compile
|
||||||
*
|
*
|
||||||
* If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above.
|
* If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above.
|
||||||
* NOTE: does not expect a trailing "." on the blockname.
|
* NOTE: does not expect a trailing "." on the blockname.
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function generate_block_data_ref($blockname, $include_last_iterator, $defop = false)
|
function generate_block_data_ref($blockname, $include_last_iterator, $defop = false)
|
||||||
{
|
{
|
||||||
|
@ -737,7 +737,7 @@ class template_compile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write compiled file to cache directory
|
* Write compiled file to cache directory
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function compile_write(&$handle, $data)
|
function compile_write(&$handle, $data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -188,6 +188,24 @@ class transfer
|
||||||
return $this->_rename($old_handle, $new_handle);
|
return $this->_rename($old_handle, $new_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a specified file exist...
|
||||||
|
*/
|
||||||
|
function file_exists($directory, $filename)
|
||||||
|
{
|
||||||
|
global $phpbb_root_path;
|
||||||
|
|
||||||
|
$directory = $this->root_path . str_replace($phpbb_root_path, '', $directory);
|
||||||
|
$result = $this->_ls($directory);
|
||||||
|
|
||||||
|
if ($result !== false && is_array($result))
|
||||||
|
{
|
||||||
|
return (in_array($filename, $result)) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open session
|
* Open session
|
||||||
*/
|
*/
|
||||||
|
@ -272,7 +290,7 @@ class ftp extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init FTP Session
|
* Init FTP Session
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _init()
|
function _init()
|
||||||
{
|
{
|
||||||
|
@ -304,7 +322,7 @@ class ftp extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Directory (MKDIR)
|
* Create Directory (MKDIR)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _mkdir($dir)
|
function _mkdir($dir)
|
||||||
{
|
{
|
||||||
|
@ -313,7 +331,7 @@ class ftp extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove directory (RMDIR)
|
* Remove directory (RMDIR)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _rmdir($dir)
|
function _rmdir($dir)
|
||||||
{
|
{
|
||||||
|
@ -322,7 +340,7 @@ class ftp extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rename file
|
* Rename file
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _rename($old_handle, $new_handle)
|
function _rename($old_handle, $new_handle)
|
||||||
{
|
{
|
||||||
|
@ -331,7 +349,7 @@ class ftp extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change current working directory (CHDIR)
|
* Change current working directory (CHDIR)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _chdir($dir = '')
|
function _chdir($dir = '')
|
||||||
{
|
{
|
||||||
|
@ -345,7 +363,7 @@ class ftp extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* change file permissions (CHMOD)
|
* change file permissions (CHMOD)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _chmod($file, $perms)
|
function _chmod($file, $perms)
|
||||||
{
|
{
|
||||||
|
@ -364,7 +382,7 @@ class ftp extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Upload file to location (PUT)
|
* Upload file to location (PUT)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _put($from_file, $to_file)
|
function _put($from_file, $to_file)
|
||||||
{
|
{
|
||||||
|
@ -386,7 +404,7 @@ class ftp extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete file (DELETE)
|
* Delete file (DELETE)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _delete($file)
|
function _delete($file)
|
||||||
{
|
{
|
||||||
|
@ -395,7 +413,7 @@ class ftp extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close ftp session (CLOSE)
|
* Close ftp session (CLOSE)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _close()
|
function _close()
|
||||||
{
|
{
|
||||||
|
@ -410,7 +428,7 @@ class ftp extends transfer
|
||||||
/**
|
/**
|
||||||
* Return current working directory (CWD)
|
* Return current working directory (CWD)
|
||||||
* At the moment not used by parent class
|
* At the moment not used by parent class
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _cwd()
|
function _cwd()
|
||||||
{
|
{
|
||||||
|
@ -419,8 +437,7 @@ class ftp extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of files in a given directory (LS)
|
* Return list of files in a given directory (LS)
|
||||||
* At the moment not used by parent class
|
* @access private
|
||||||
* @access: private
|
|
||||||
*/
|
*/
|
||||||
function _ls($dir = './')
|
function _ls($dir = './')
|
||||||
{
|
{
|
||||||
|
@ -429,7 +446,7 @@ class ftp extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FTP SITE command (ftp-only function)
|
* FTP SITE command (ftp-only function)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _site($command)
|
function _site($command)
|
||||||
{
|
{
|
||||||
|
@ -487,7 +504,7 @@ class ftp_fsock extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init FTP Session
|
* Init FTP Session
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _init()
|
function _init()
|
||||||
{
|
{
|
||||||
|
@ -526,7 +543,7 @@ class ftp_fsock extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Directory (MKDIR)
|
* Create Directory (MKDIR)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _mkdir($dir)
|
function _mkdir($dir)
|
||||||
{
|
{
|
||||||
|
@ -535,7 +552,7 @@ class ftp_fsock extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove directory (RMDIR)
|
* Remove directory (RMDIR)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _rmdir($dir)
|
function _rmdir($dir)
|
||||||
{
|
{
|
||||||
|
@ -544,7 +561,7 @@ class ftp_fsock extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rename File
|
* Rename File
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _rename($old_handle, $new_handle)
|
function _rename($old_handle, $new_handle)
|
||||||
{
|
{
|
||||||
|
@ -554,7 +571,7 @@ class ftp_fsock extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change current working directory (CHDIR)
|
* Change current working directory (CHDIR)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _chdir($dir = '')
|
function _chdir($dir = '')
|
||||||
{
|
{
|
||||||
|
@ -568,7 +585,7 @@ class ftp_fsock extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* change file permissions (CHMOD)
|
* change file permissions (CHMOD)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _chmod($file, $perms)
|
function _chmod($file, $perms)
|
||||||
{
|
{
|
||||||
|
@ -577,7 +594,7 @@ class ftp_fsock extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Upload file to location (PUT)
|
* Upload file to location (PUT)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _put($from_file, $to_file)
|
function _put($from_file, $to_file)
|
||||||
{
|
{
|
||||||
|
@ -613,7 +630,7 @@ class ftp_fsock extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete file (DELETE)
|
* Delete file (DELETE)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _delete($file)
|
function _delete($file)
|
||||||
{
|
{
|
||||||
|
@ -622,7 +639,7 @@ class ftp_fsock extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close ftp session (CLOSE)
|
* Close ftp session (CLOSE)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _close()
|
function _close()
|
||||||
{
|
{
|
||||||
|
@ -637,7 +654,7 @@ class ftp_fsock extends transfer
|
||||||
/**
|
/**
|
||||||
* Return current working directory (CWD)
|
* Return current working directory (CWD)
|
||||||
* At the moment not used by parent class
|
* At the moment not used by parent class
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _cwd()
|
function _cwd()
|
||||||
{
|
{
|
||||||
|
@ -647,8 +664,7 @@ class ftp_fsock extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of files in a given directory (LS)
|
* Return list of files in a given directory (LS)
|
||||||
* At the moment not used by parent class
|
* @access private
|
||||||
* @access: private
|
|
||||||
*/
|
*/
|
||||||
function _ls($dir = './')
|
function _ls($dir = './')
|
||||||
{
|
{
|
||||||
|
@ -671,7 +687,7 @@ class ftp_fsock extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a command to server (FTP fsock only function)
|
* Send a command to server (FTP fsock only function)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _send_command($command, $args = '', $check = true)
|
function _send_command($command, $args = '', $check = true)
|
||||||
{
|
{
|
||||||
|
@ -692,7 +708,7 @@ class ftp_fsock extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens a connection to send data (FTP fosck only function)
|
* Opens a connection to send data (FTP fosck only function)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _open_data_connection()
|
function _open_data_connection()
|
||||||
{
|
{
|
||||||
|
@ -727,7 +743,7 @@ class ftp_fsock extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Closes a connection used to send data
|
* Closes a connection used to send data
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _close_data_connection()
|
function _close_data_connection()
|
||||||
{
|
{
|
||||||
|
@ -736,7 +752,7 @@ class ftp_fsock extends transfer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check to make sure command was successful (FTP fsock only function)
|
* Check to make sure command was successful (FTP fsock only function)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _check_command($return = false)
|
function _check_command($return = false)
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,7 +38,7 @@ class filespec
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File Class
|
* File Class
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function filespec($upload_ary, $upload_namespace)
|
function filespec($upload_ary, $upload_namespace)
|
||||||
{
|
{
|
||||||
|
|
|
@ -803,7 +803,7 @@ class bbcode_firstpass extends bbcode
|
||||||
* @param string $url the url to check
|
* @param string $url the url to check
|
||||||
* @return true if the url is pointing to this domain/script_path/php-file, false if not
|
* @return true if the url is pointing to this domain/script_path/php-file, false if not
|
||||||
*
|
*
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function path_in_domain($url)
|
function path_in_domain($url)
|
||||||
{
|
{
|
||||||
|
|
|
@ -588,6 +588,9 @@ class session
|
||||||
$SID = '?sid=';
|
$SID = '?sid=';
|
||||||
$this->session_id = $_SID = '';
|
$this->session_id = $_SID = '';
|
||||||
|
|
||||||
|
// To make sure a valid session is created we create one for the anonymous user
|
||||||
|
$this->session_create(ANONYMOUS);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1207,7 +1210,7 @@ class user extends session
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set language entry (called by add_lang)
|
* Set language entry (called by add_lang)
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function set_lang(&$lang, &$help, $lang_file, $use_db = false, $use_help = false)
|
function set_lang(&$lang, &$help, $lang_file, $use_db = false, $use_help = false)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@ class template
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set template location
|
* Set template location
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function set_template()
|
function set_template()
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,7 @@ class template
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set custom template location (able to use directory outside of phpBB)
|
* Set custom template location (able to use directory outside of phpBB)
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function set_custom_template($template_path, $template_name)
|
function set_custom_template($template_path, $template_name)
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@ class template
|
||||||
/**
|
/**
|
||||||
* Sets the template filenames for handles. $filename_array
|
* Sets the template filenames for handles. $filename_array
|
||||||
* should be a hash of handle => filename pairs.
|
* should be a hash of handle => filename pairs.
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function set_filenames($filename_array)
|
function set_filenames($filename_array)
|
||||||
{
|
{
|
||||||
|
@ -100,7 +100,7 @@ class template
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroy template data set
|
* Destroy template data set
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function destroy()
|
function destroy()
|
||||||
{
|
{
|
||||||
|
@ -109,7 +109,7 @@ class template
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset/empty complete block
|
* Reset/empty complete block
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function destroy_block_vars($blockname)
|
function destroy_block_vars($blockname)
|
||||||
{
|
{
|
||||||
|
@ -139,7 +139,7 @@ class template
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display handle
|
* Display handle
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function display($handle, $include_once = true)
|
function display($handle, $include_once = true)
|
||||||
{
|
{
|
||||||
|
@ -159,7 +159,7 @@ class template
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display the handle and assign the output to a template variable or return the compiled result.
|
* Display the handle and assign the output to a template variable or return the compiled result.
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function assign_display($handle, $template_var = '', $return_content = true, $include_once = false)
|
function assign_display($handle, $template_var = '', $return_content = true, $include_once = false)
|
||||||
{
|
{
|
||||||
|
@ -179,7 +179,7 @@ class template
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a compiled template if possible, if not, recompile it
|
* Load a compiled template if possible, if not, recompile it
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _tpl_load(&$handle)
|
function _tpl_load(&$handle)
|
||||||
{
|
{
|
||||||
|
@ -271,7 +271,7 @@ class template
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign key variable pairs from an array
|
* Assign key variable pairs from an array
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function assign_vars($vararray)
|
function assign_vars($vararray)
|
||||||
{
|
{
|
||||||
|
@ -285,7 +285,7 @@ class template
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign a single variable to a single key
|
* Assign a single variable to a single key
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function assign_var($varname, $varval)
|
function assign_var($varname, $varval)
|
||||||
{
|
{
|
||||||
|
@ -296,7 +296,7 @@ class template
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign key variable pairs from an array to a specified block
|
* Assign key variable pairs from an array to a specified block
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function assign_block_vars($blockname, $vararray)
|
function assign_block_vars($blockname, $vararray)
|
||||||
{
|
{
|
||||||
|
@ -398,7 +398,7 @@ class template
|
||||||
* and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)
|
* and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)
|
||||||
*
|
*
|
||||||
* @return false on error, true on success
|
* @return false on error, true on success
|
||||||
* @access: public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert')
|
function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert')
|
||||||
{
|
{
|
||||||
|
@ -484,7 +484,7 @@ class template
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Include a seperate template
|
* Include a seperate template
|
||||||
* @access: private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _tpl_include($filename, $include = true)
|
function _tpl_include($filename, $include = true)
|
||||||
{
|
{
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -59,17 +59,13 @@ function utf8_recode($string, $encoding)
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// PHP has a built-in function for encoding from iso-8859-1, let's use that
|
||||||
* PHP has a built-in function for encoding from iso-8859-1, let's use that
|
|
||||||
*/
|
|
||||||
if ($encoding == 'iso-8859-1')
|
if ($encoding == 'iso-8859-1')
|
||||||
{
|
{
|
||||||
return utf8_encode($string);
|
return utf8_encode($string);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// First, try iconv()
|
||||||
* First, try iconv()
|
|
||||||
*/
|
|
||||||
if (function_exists('iconv'))
|
if (function_exists('iconv'))
|
||||||
{
|
{
|
||||||
$ret = @iconv($encoding, 'utf-8', $string);
|
$ret = @iconv($encoding, 'utf-8', $string);
|
||||||
|
@ -80,9 +76,7 @@ function utf8_recode($string, $encoding)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// Try the mb_string extension
|
||||||
* Try the mb_string extension
|
|
||||||
*/
|
|
||||||
if (function_exists('mb_convert_encoding'))
|
if (function_exists('mb_convert_encoding'))
|
||||||
{
|
{
|
||||||
$ret = @mb_convert_encoding($string, 'utf-8', $encoding);
|
$ret = @mb_convert_encoding($string, 'utf-8', $encoding);
|
||||||
|
@ -93,9 +87,7 @@ function utf8_recode($string, $encoding)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// Try the recode extension
|
||||||
* Try the recode extension
|
|
||||||
*/
|
|
||||||
if (function_exists('recode_string'))
|
if (function_exists('recode_string'))
|
||||||
{
|
{
|
||||||
$ret = @recode_string($encoding . '..utf-8', $string);
|
$ret = @recode_string($encoding . '..utf-8', $string);
|
||||||
|
@ -106,25 +98,21 @@ function utf8_recode($string, $encoding)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// If nothing works, check if we have a custom transcoder available
|
||||||
* If nothing works, check if we have a custom transcoder available
|
|
||||||
*/
|
|
||||||
if (!preg_match('#^[a-z0-9\\-]+$#', $encoding))
|
if (!preg_match('#^[a-z0-9\\-]+$#', $encoding))
|
||||||
{
|
{
|
||||||
/**
|
// Make sure the encoding name is alphanumeric, we don't want it to be abused into loading arbitrary files
|
||||||
* Make sure the encoding name is alphanumeric, we don't want it
|
trigger_error('Unknown encoding: ' . $encoding, E_USER_ERROR);
|
||||||
* to be abused into loading arbitrary files
|
|
||||||
*/
|
|
||||||
trigger_error('Unknown encoding: ' . $encoding);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
global $phpbb_root_path;
|
global $phpbb_root_path;
|
||||||
|
|
||||||
if (!file_exists($phpbb_root_path . 'includes/utf/data/'))
|
if (!file_exists($phpbb_root_path . 'includes/utf/data/'))
|
||||||
{
|
{
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
die('Finish me!! '.basename(__FILE__).' at line '.__LINE__);
|
die('Finish me!! ' . basename(__FILE__) . ' at line ' . __LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -200,11 +188,11 @@ function utf8_decode_ncr_callback($m)
|
||||||
{
|
{
|
||||||
return chr(0xF0 | ($cp >> 18)) . chr(0x80 | (($cp >> 12) & 0x3F)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
|
return chr(0xF0 | ($cp >> 18)) . chr(0x80 | (($cp >> 12) & 0x3F)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
|
||||||
}
|
}
|
||||||
elseif ($cp > 0x7FF)
|
else if ($cp > 0x7FF)
|
||||||
{
|
{
|
||||||
return chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
|
return chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
|
||||||
}
|
}
|
||||||
elseif ($cp > 0x7F)
|
else if ($cp > 0x7F)
|
||||||
{
|
{
|
||||||
return chr(0xC0 | ($cp >> 6)) . chr(0x80 | ($cp & 0x3F));
|
return chr(0xC0 | ($cp >> 6)) . chr(0x80 | ($cp & 0x3F));
|
||||||
}
|
}
|
||||||
|
|
|
@ -271,6 +271,7 @@ $lang = array_merge($lang, array(
|
||||||
'CURRENT_FILE' => 'Current original file',
|
'CURRENT_FILE' => 'Current original file',
|
||||||
'CURRENT_VERSION' => 'Current version',
|
'CURRENT_VERSION' => 'Current version',
|
||||||
|
|
||||||
|
'DATABASE_UPDATE_INFO_OLD' => 'The latest version is newer than the database info stored. Please download the correct archive.',
|
||||||
'DESTINATION' => 'Destination file',
|
'DESTINATION' => 'Destination file',
|
||||||
'DIFF_INLINE' => 'Inline',
|
'DIFF_INLINE' => 'Inline',
|
||||||
'DIFF_RAW' => 'Raw unified diff',
|
'DIFF_RAW' => 'Raw unified diff',
|
||||||
|
|
Loading…
Add table
Reference in a new issue