From 318e561cb2a2698aed9fc2fff34e648deebb0676 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 19 Nov 2005 16:16:52 +0000 Subject: [PATCH] - use acl_m_ instead of acl_m - some reference fixes git-svn-id: file:///svn/phpbb/trunk@5307 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_upload.php | 22 ++++++++++++++++++++-- phpBB/includes/mcp/mcp_main.php | 13 ++++++++----- phpBB/language/en/acp/common.php | 8 ++++++++ phpBB/mcp.php | 15 ++++++++------- 4 files changed, 44 insertions(+), 14 deletions(-) diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index 56fb295d59..a3109c0ef4 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -62,7 +62,7 @@ class filespec $this->mimetype = 'application/octetstream'; } - $this->extension = array_pop(explode('.', strtolower($this->realname))); + $this->extension = strtolower($this->get_extension($this->realname)); // Try to get real filesize from temporary folder (not always working) ;) $this->filesize = (@filesize($this->filename)) ? @filesize($this->filename) : $this->filesize; @@ -144,6 +144,20 @@ class filespec } } + /** + * Get file extension + */ + function get_extension($filename) + { + if (strpos($filename, '.') === false) + { + return ''; + } + + $filename = explode('.', $filename); + return array_pop($filename); + } + /** * Move file to destination folder * @@ -508,7 +522,11 @@ class fileupload $port = (!empty($url['port'])) ? (int) $url['port'] : 80; $upload_ary['type'] = 'application/octet-stream'; - $upload_ary['name'] = basename($url['path']) . '.' . array_pop(explode('.', $url['path'])); + + $url['path'] = explode('.', $url['path']); + $ext = array_pop($url['path']); + + $upload_ary['name'] = basename($url['path']) . (($ext) ? '.' . $ext : ''); $filename = $url['path']; $filesize = 0; diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index f6e866bf96..22e9d520f5 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -812,7 +812,10 @@ function mcp_fork_topic($topic_ids) $new_topic_id = $db->sql_nextid(); $new_topic_id_list[$topic_id] = $new_topic_id; - markread('topic', $to_forum_id, $new_topic_id); + /** + * @todo enable + * markread('topic', $to_forum_id, $new_topic_id); + */ if ($topic_row['poll_start']) { @@ -979,10 +982,10 @@ class mcp_main_info 'title' => 'MCP_MAIN', 'version' => '1.0.0', 'modes' => array( - 'front' => array('title' => 'MCP_MAIN_FRONT', 'auth' => 'acl_m'), - 'forum_view' => array('title' => 'MCP_MAIN_FORUM_VIEW', 'auth' => 'acl_m'), - 'topic_view' => array('title' => 'MCP_MAIN_TOPIC_VIEW', 'auth' => 'acl_m'), - 'post_details' => array('title' => 'MCP_MAIN_POST_DETAILS', 'auth' => 'acl_m'), + 'front' => array('title' => 'MCP_MAIN_FRONT', 'auth' => 'acl_m_'), + 'forum_view' => array('title' => 'MCP_MAIN_FORUM_VIEW', 'auth' => 'acl_m_'), + 'topic_view' => array('title' => 'MCP_MAIN_TOPIC_VIEW', 'auth' => 'acl_m_'), + 'post_details' => array('title' => 'MCP_MAIN_POST_DETAILS', 'auth' => 'acl_m_'), ), ); } diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index c9337d5991..4aa4e8a592 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -147,6 +147,14 @@ $lang += array( // Log $lang += array( + 'LOG_BOT_ADDED' => 'New bot added
» %s', + 'LOG_BOT_DELETE' => 'Deleted bot
» %s', + 'LOG_BOT_UPDATED' => 'Existing bot updated
» %s', + + 'LOG_JAB_CHANGED' => 'Jabber account changed', + 'LOG_JAB_PASSCHG' => 'Jabber password changed', + 'LOG_JAB_REGISTER' => 'Jabber account registered', + 'LOG_MODULE_DISABLE' => 'Module disabled', 'LOG_MODULE_ENABLE' => 'Module enabled', 'LOG_MODULE_MOVE_DOWN' => 'Module moved down
» %s', diff --git a/phpBB/mcp.php b/phpBB/mcp.php index de84f6de89..95f87c02a7 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -29,20 +29,21 @@ $user->setup('mcp'); $module = new p_master(); // Basic parameter data -$mode = request_var('mode', ''); -$mode2 = (isset($_REQUEST['quick'])) ? request_var('mode2', '') : ''; $id = request_var('i', ''); -if (is_array($mode)) +if (is_array($_REQUEST['mode'])) { - list($mode, ) = each($mode); + list($mode, ) = each(request_var('mode', array('')); +} +else +{ + $mode = request_var('mode', ''); } -if ($mode2) +if (isset($_REQUEST['quick'])) { - $mode = $mode2; + $mode = request_var('mode2', ''); $action = ''; - unset($mode2); } // Make sure we are using the correct module