mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
ok... i hope i haven't messed too much with the code and everything is still working.
Changes: - Ascraeus now uses constants for the phpbb root path and the php extension. This ensures more security for external applications and modifications (no more overwriting of root path and extension possible through insecure mods and register globals enabled) as well as no more globalizing needed. - A second change implemented here is an additional short-hand-notation for append_sid(). It is allowed to omit the root path and extension now (for example calling append_sid('memberlist')) - in this case the root path and extension get added automatically. The hook is called after these are added. git-svn-id: file:///svn/phpbb/trunk@8572 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -21,10 +21,10 @@ die("Please read the first lines of this script for instructions on how to enabl
|
||||
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
||||
define('PHPBB_ROOT_PATH', './../');
|
||||
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
|
||||
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
|
||||
include(PHPBB_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
|
||||
|
||||
set_time_limit(0);
|
||||
header('Expires: 0');
|
||||
@@ -117,14 +117,14 @@ switch ($mode)
|
||||
|
||||
if ($topic_id >= $num_topics)
|
||||
{
|
||||
echo '<meta http-equiv="refresh" content="10; url=fill.' . $phpEx . '?mode=sync&' . time() . '">And now for something completely different...';
|
||||
echo '<meta http-equiv="refresh" content="10; url=fill.' . PHP_EXT . '?mode=sync&' . time() . '">And now for something completely different...';
|
||||
|
||||
$db->sql_query('ANALYZE TABLES ' . TOPICS_TABLE . ', ' . POSTS_TABLE);
|
||||
flush();
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<meta http-equiv="refresh" content="10; url=fill.' . $phpEx . '?start=' . $topic_id . '&' . time() . '">To the next page... (' . $topic_id . '/' . $num_topics . ')';
|
||||
echo '<meta http-equiv="refresh" content="10; url=fill.' . PHP_EXT . '?start=' . $topic_id . '&' . time() . '">To the next page... (' . $topic_id . '/' . $num_topics . ')';
|
||||
flush();
|
||||
}
|
||||
break;
|
||||
@@ -141,7 +141,7 @@ switch ($mode)
|
||||
$e = explode(' ', microtime());
|
||||
|
||||
echo '<pre><b>' . ($e[0] + $e[1] - $s[0] - $s[1]) . '</b></pre>';
|
||||
echo '<a href="fill.' . $phpEx . '">Here we go again</a>';
|
||||
echo '<a href="fill.' . PHP_EXT . '">Here we go again</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -157,11 +157,11 @@ switch ($mode)
|
||||
if ($end < $num_topics)
|
||||
{
|
||||
$start += $batch_size;
|
||||
echo '<meta http-equiv="refresh" content="0; url=fill.' . $phpEx . "?mode=sync&start=$start&" . time() . "\">And now for something completely different... ($start/$num_topics)";
|
||||
echo '<meta http-equiv="refresh" content="0; url=fill.' . PHP_EXT . "?mode=sync&start=$start&" . time() . "\">And now for something completely different... ($start/$num_topics)";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<a href="fill.' . $phpEx . '">Here we go again</a>';
|
||||
echo '<a href="fill.' . PHP_EXT . '">Here we go again</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user