1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 02:06:32 +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:
Meik Sievertsen
2008-05-29 12:25:56 +00:00
parent 91b4fe1868
commit 2f4a618900
154 changed files with 2044 additions and 3484 deletions

View File

@@ -26,8 +26,7 @@ class acp_forums
function main($id, $mode)
{
global $db, $user, $auth, $template, $cache;
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
global $db, $user, $auth, $template, $cache, $config;
$user->add_lang('acp/forums');
$this->tpl_name = 'acp_forums';
@@ -253,13 +252,13 @@ class acp_forums
// Redirect to permissions
if ($auth->acl_get('a_fauth'))
{
$message .= '<br /><br />' . sprintf($user->lang['REDIRECT_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');
$message .= '<br /><br />' . sprintf($user->lang['REDIRECT_ACL'], '<a href="' . append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=permissions' . $acl_url) . '">', '</a>');
}
// redirect directly to permission settings screen if authed
if ($action == 'add' && !$forum_perm_from && $auth->acl_get('a_fauth'))
{
meta_refresh(4, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url));
meta_refresh(4, append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=permissions' . $acl_url));
}
trigger_error($message . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
@@ -636,7 +635,7 @@ class acp_forums
'FORUM_NAME' => $forum_data['forum_name'],
'FORUM_DATA_LINK' => $forum_data['forum_link'],
'FORUM_IMAGE' => $forum_data['forum_image'],
'FORUM_IMAGE_SRC' => ($forum_data['forum_image']) ? $phpbb_root_path . $forum_data['forum_image'] : '',
'FORUM_IMAGE_SRC' => ($forum_data['forum_image']) ? PHPBB_ROOT_PATH . $forum_data['forum_image'] : '',
'FORUM_POST' => FORUM_POST,
'FORUM_LINK' => FORUM_LINK,
'FORUM_CAT' => FORUM_CAT,
@@ -810,8 +809,8 @@ class acp_forums
$template->assign_block_vars('forums', array(
'FOLDER_IMAGE' => $folder_image,
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="" />' : '',
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . PHPBB_ROOT_PATH . $row['forum_image'] . '" alt="" />' : '',
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? PHPBB_ROOT_PATH . $row['forum_image'] : '',
'FORUM_NAME' => $row['forum_name'],
'FORUM_DESCRIPTION' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']),
'FORUM_TOPICS' => $row['forum_topics'],
@@ -1620,9 +1619,9 @@ class acp_forums
*/
function delete_forum_content($forum_id)
{
global $db, $config, $phpbb_root_path, $phpEx;
global $db, $config;
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include_once(PHPBB_ROOT_PATH . 'includes/functions_posting.' . PHP_EXT);
$db->sql_transaction('begin');