Update of /cvsroot/nanuke/nanuke0.x In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20488 Added Files: phpbb-patches-2004-12-12-08.07.txt phpbb-patches-2004-12-15-12.31.txt phpbb-patches-2004-12-18-0.42.txt phpbb-patches-2004-12-19-09.59.txt phpbb-patches-2004-12-21-18.06.txt phpbb-patches-2004-12-31-19.24.txt phpbb-patches-2005-01-04-03.57.txt phpbb-patches-2005-1-02-19.52.txt phpbb-patches-2005-1-04-22.35.txt phpbb-patches-2005-1-05.txt phpbb-patches-2005-1-13.txt phpbb-patches-2005-1-15.txt Log Message: - Uploading/.updating phpBB patches --- NEW FILE: phpbb-patches-2004-12-18-0.42.txt --- Update of /cvsroot/phpbb/phpBB2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2612 Modified Files: viewtopic.php Log Message: fix highlight issue in 2.1 Index: viewtopic.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v retrieving revision 1.354 retrieving revision 1.355 diff -C2 -r1.354 -r1.355 *** viewtopic.php 14 Nov 2004 17:12:07 -0000 1.354 --- viewtopic.php 18 Dec 2004 16:42:21 -0000 1.355 *************** *** 35,39 **** $update = request_var("update", false); ! $hilit_words = urldecode(request_var("hilit", "")); // Do we have a topic or post id? --- 35,39 ---- $update = request_var("update", false); ! $hilit_words = request_var("hilit", ""); // Do we have a topic or post id? *************** *** 336,344 **** if (trim($word)) { ! $highlight_match .= (($highlight_match != "") ? "|" : "") . str_replace("\*", "\w*?", preg_quote($word, "#")); } } ! $highlight = htmlspecialchars(urlencode($hilit_words)); } --- 336,344 ---- if (trim($word)) { ! $highlight_match .= (($highlight_match != "") ? "|" : "") . str_replace("\*", "\w*?", preg_quote(urlencode($word), "#")); } } ! $highlight = urlencode($hilit_words); } --- NEW FILE: phpbb-patches-2005-1-05.txt --- Update of /cvsroot/phpbb/phpBB2/install/schemas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15793/install/schemas Modified Files: mysql_schema.sql Log Message: - small change in text size. ;) Index: mysql_schema.sql =================================================================== RCS file: /cvsroot/phpbb/phpBB2/install/schemas/mysql_schema.sql,v retrieving revision 1.149 retrieving revision 1.150 diff -C2 -r1.149 -r1.150 *** mysql_schema.sql 29 Oct 2004 10:45:51 -0000 1.149 --- mysql_schema.sql 5 Jan 2005 18:18:58 -0000 1.150 *************** *** 124,128 **** var_name varchar(255) DEFAULT "" NOT NULL, var_expires int(10) UNSIGNED DEFAULT "0" NOT NULL, ! var_data text NOT NULL, PRIMARY KEY (var_name) ); --- 124,128 ---- var_name varchar(255) DEFAULT "" NOT NULL, var_expires int(10) UNSIGNED DEFAULT "0" NOT NULL, ! var_data mediumtext NOT NULL, PRIMARY KEY (var_name) ); *************** *** 160,164 **** save_time int(11) UNSIGNED DEFAULT "0" NOT NULL, draft_subject varchar(60), ! draft_message text DEFAULT "" NOT NULL, PRIMARY KEY (draft_id), KEY save_time (save_time) --- 160,164 ---- save_time int(11) UNSIGNED DEFAULT "0" NOT NULL, draft_subject varchar(60), ! draft_message mediumtext DEFAULT "" NOT NULL, PRIMARY KEY (draft_id), KEY save_time (save_time) *************** *** 384,388 **** post_username varchar(30), post_subject varchar(60), ! post_text text, post_checksum varchar(32) NOT NULL, post_encoding varchar(11) DEFAULT "iso-8859-15" NOT NULL, --- 384,388 ---- post_username varchar(30), post_subject varchar(60), ! post_text mediumtext, post_checksum varchar(32) NOT NULL, post_encoding varchar(11) DEFAULT "iso-8859-15" NOT NULL, *************** *** 419,423 **** enable_sig tinyint(1) DEFAULT "1" NOT NULL, message_subject varchar(60), ! message_text text, message_edit_reason varchar(100), message_edit_user mediumint(8) UNSIGNED DEFAULT "0" NOT NULL, --- 419,423 ---- enable_sig tinyint(1) DEFAULT "1" NOT NULL, message_subject varchar(60), ! message_text mediumtext, message_edit_reason varchar(100), message_edit_user mediumint(8) UNSIGNED DEFAULT "0" NOT NULL, *************** *** 668,672 **** template_included text NOT NULL, template_mtime int(11) DEFAULT "0" NOT NULL, ! template_data text, KEY (template_id), KEY (template_filename) --- 668,672 ---- template_included text NOT NULL, template_mtime int(11) DEFAULT "0" NOT NULL, ! template_data mediumtext, KEY (template_id), KEY (template_filename) *************** *** 681,685 **** theme_storedb tinyint(1) DEFAULT "0" NOT NULL, theme_mtime int(11) DEFAULT "0" NOT NULL, ! theme_data text DEFAULT "" NOT NULL, PRIMARY KEY (theme_id), UNIQUE theme_name (theme_name) --- 681,685 ---- theme_storedb tinyint(1) DEFAULT "0" NOT NULL, theme_mtime int(11) DEFAULT "0" NOT NULL, ! theme_data mediumtext DEFAULT "" NOT NULL, PRIMARY KEY (theme_id), UNIQUE theme_name (theme_name) Update of /cvsroot/phpbb/phpBB2/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11246/includes Modified Files: functions_privmsgs.php Log Message: - merged getting of unread pm count function to get_folder function - made folder usable within the template (especially custom folder) Index: functions_privmsgs.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/functions_privmsgs.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** functions_privmsgs.php 12 Dec 2004 14:07:01 -0000 1.9 --- functions_privmsgs.php 6 Jan 2005 23:03:07 -0000 1.10 *************** *** 101,134 **** ); - // Get number of unread messages from all folder - function get_unread_pm($user_id) - { - global $db; - - $unread_pm = array(); - - $sql = "SELECT folder_id, SUM(unread) as sum_unread - FROM " . PRIVMSGS_TO_TABLE . " - WHERE user_id = $user_id - AND folder_id <> " . PRIVMSGS_OUTBOX . " - GROUP BY folder_id"; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - if ($row["sum_unread"]) - { - $unread_pm[$row["folder_id"]] = $row["sum_unread"]; - } - } - $db->sql_freeresult($result); - - return $unread_pm; - } - // Get all folder ! function get_folder($user_id, &$folder) { ! global $db, $user; if (!is_array($folder)) --- 101,108 ---- ); // Get all folder ! function get_folder($user_id, &$folder, $folder_id = false, $mode = "") { ! global $db, $user, $template; if (!is_array($folder)) *************** *** 137,141 **** } ! $sql = "SELECT folder_id, COUNT(msg_id) as num_messages FROM " . PRIVMSGS_TO_TABLE . " WHERE user_id = $user_id --- 111,121 ---- } ! if ($mode == "unread") ! { ! $folder["unread"] = array("folder_name" => $user->lang["UNREAD_MESSAGES"]); ! } ! ! // Get folder informations ! $sql = "SELECT folder_id, COUNT(msg_id) as num_messages, SUM(unread) as num_unread FROM " . PRIVMSGS_TO_TABLE . " WHERE user_id = $user_id *************** *** 144,161 **** $result = $db->sql_query($sql); ! $num_messages = array(); while ($row = $db->sql_fetchrow($result)) { $num_messages[(int) $row["folder_id"]] = $row["num_messages"]; } $db->sql_freeresult($result); ! if (!isset($num_messages[PRIVMSGS_OUTBOX])) { ! $num_messages[PRIVMSGS_OUTBOX] = 0; } ! $folder[PRIVMSGS_INBOX] = array("folder_name" => $user->lang["PM_INBOX"], "num_messages" => (int) $num_messages[PRIVMSGS_INBOX]); $sql = "SELECT folder_id, folder_name, pm_count FROM " . PRIVMSGS_FOLDER_TABLE . " --- 124,155 ---- $result = $db->sql_query($sql); ! $num_messages = $num_unread = array(); while ($row = $db->sql_fetchrow($result)) { $num_messages[(int) $row["folder_id"]] = $row["num_messages"]; + $num_unread[(int) $row["folder_id"]] = $row["num_unread"]; } $db->sql_freeresult($result); ! // Make sure the default boxes are defined ! foreach (array(PRIVMSGS_INBOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX) as $default_folder) { ! if (!isset($num_messages[$default_folder])) ! { ! $num_messages[$default_folder] = 0; ! } ! ! if (!isset($num_unread[$default_folder])) ! { ! $num_unread[$default_folder] = 0; ! } } ! // Adjust unread status for outbox ! $num_unread[PRIVMSGS_OUTBOX] = $num_messages[PRIVMSGS_OUTBOX]; ! ! $folder[PRIVMSGS_INBOX] = array("folder_name" => $user->lang["PM_INBOX"], "num_messages" => $num_messages[PRIVMSGS_INBOX], "unread_messages" => $num_unread[PRIVMSGS_INBOX]); + // Custom Folder $sql = "SELECT folder_id, folder_name, pm_count FROM " . PRIVMSGS_FOLDER_TABLE . " *************** *** 165,174 **** while ($row = $db->sql_fetchrow($result)) { ! $folder[$row["folder_id"]] = array("folder_name" => $row["folder_name"], "num_messages" => $row["pm_count"]); } $db->sql_freeresult($result); ! $folder[PRIVMSGS_OUTBOX] = array("folder_name" => $user->lang["PM_OUTBOX"], "num_messages" => (int) $num_messages[PRIVMSGS_OUTBOX]); ! $folder[PRIVMSGS_SENTBOX] = array("folder_name" => $user->lang["PM_SENTBOX"], "num_messages" => (int) $num_messages[PRIVMSGS_SENTBOX]); return; --- 159,183 ---- while ($row = $db->sql_fetchrow($result)) { ! $folder[$row["folder_id"]] = array("folder_name" => $row["folder_name"], "num_messages" => $row["pm_count"], "unread_messages" => ((isset($num_unread[$row["folder_id"]])) ? $num_unread[$row["folder_id"]] : 0)); } $db->sql_freeresult($result); ! $folder[PRIVMSGS_OUTBOX] = array("folder_name" => $user->lang["PM_OUTBOX"], "num_messages" => $num_messages[PRIVMSGS_OUTBOX], "unread_messages" => $num_unread[PRIVMSGS_OUTBOX]); ! $folder[PRIVMSGS_SENTBOX] = array("folder_name" => $user->lang["PM_SENTBOX"], "num_messages" => $num_messages[PRIVMSGS_SENTBOX], "unread_messages" => $num_unread[PRIVMSGS_SENTBOX]); ! ! // Define Folder Array for template designers (and for making custom folders usable by the template too) ! foreach ($folder as $f_id => $folder_ary) ! { ! $template->assign_block_vars("folder", array( ! "FOLDER_ID" => $f_id, ! "FOLDER_NAME" => $folder_ary["folder_name"], ! "NUM_MESSAGES" => $folder_ary["num_messages"], ! "UNREAD_MESSAGES" => $folder_ary["unread_messages"], ! ! "S_CUR_FOLDER" => ($f_id == $folder_id) ? true : false, ! "S_UNREAD_MESSAGES" => ($folder_ary["unread_messages"]) ? true : false, ! "S_CUSTOM_FOLDER" => ($f_id > 0) ? true : false) ! ); ! } return; --- NEW FILE: phpbb-patches-2004-12-31-19.24.txt --- Update of /cvsroot/phpbb/phpBB2/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32750/includes Modified Files: functions.php functions_display.php message_parser.php Log Message: - fixed [code=php] - optimized db/mysql.php a little bit Index: functions.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v retrieving revision 1.301 retrieving revision 1.302 diff -C2 -r1.301 -r1.302 *** functions.php 22 Dec 2004 02:06:42 -0000 1.301 --- functions.php 31 Dec 2004 13:58:37 -0000 1.302 *************** *** 1390,1394 **** { // Remove me ! if (!strstr($errfile, "/cache/") && !strstr($errfile, "mysql.php") && !strstr($errfile, "template.php")) { echo "<b>PHP Notice</b>: in file <b>$errfile</b> on line <b>$errline</b>: <b>$msg_text</b><br>"; --- 1390,1394 ---- { // Remove me ! if (!strstr($errfile, "/cache/") && !strstr($errfile, "template.php")) { echo "<b>PHP Notice</b>: in file <b>$errfile</b> on line <b>$errline</b>: <b>$msg_text</b><br>"; *************** *** 1534,1538 **** AND u.user_id = s.session_user_id ORDER BY u.username ASC, s.session_ip ASC"; ! $result = $db->sql_query($sql, false); while ($row = $db->sql_fetchrow($result)) --- 1534,1538 ---- AND u.user_id = s.session_user_id ORDER BY u.username ASC, s.session_ip ASC"; ! $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) *************** *** 1580,1583 **** --- 1580,1584 ---- $prev_session_ip = $row["session_ip"]; } + $db->sql_freeresult($result); if (!$online_userlist) Index: functions_display.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/functions_display.php,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -r1.62 -r1.63 *** functions_display.php 19 Dec 2004 17:59:13 -0000 1.62 --- functions_display.php 31 Dec 2004 13:58:40 -0000 1.63 *************** *** 163,167 **** } } ! $db->sql_freeresult(); // Handle marking posts --- 163,167 ---- } } ! $db->sql_freeresult($result); // Handle marking posts Index: message_parser.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/message_parser.php,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -r1.83 -r1.84 *** message_parser.php 19 Dec 2004 17:59:13 -0000 1.83 --- message_parser.php 31 Dec 2004 13:58:41 -0000 1.84 *************** *** 235,238 **** --- 235,241 ---- } + // Because highlight_string is specialcharing the text (but we already did this before), we have to reverse this in order to get correct results + $code = strtr($code, array_flip(get_html_translation_table(HTML_ENTITIES))); + ob_start(); highlight_string($code); Update of /cvsroot/phpbb/phpBB2/includes/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32750/includes/db Modified Files: mysql.php Log Message: - fixed [code=php] - optimized db/mysql.php a little bit Index: mysql.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/db/mysql.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** mysql.php 30 May 2004 19:24:50 -0000 1.21 --- mysql.php 31 Dec 2004 13:58:36 -0000 1.22 *************** *** 58,64 **** } ! if (count($this->open_queries)) { ! foreach ($this->open_queries as $query_id) { @mysql_free_result($query_id); --- 58,64 ---- } ! if (sizeof($this->open_queries)) { ! foreach ($this->open_queries as $i_query_id => $query_id) { @mysql_free_result($query_id); *************** *** 112,117 **** global $cache; ! // DEBUG ! $this->sql_report("start", $query); $this->query_result = ($cache_ttl && method_exists($cache, "sql_load")) ? $cache->sql_load($query) : false; --- 112,120 ---- global $cache; ! // EXPLAIN only in extra debug mode ! if (defined("DEBUG_EXTRA")) ! { ! $this->sql_report("start", $query); ! } $this->query_result = ($cache_ttl && method_exists($cache, "sql_load")) ? $cache->sql_load($query) : false; *************** *** 126,145 **** } ! // DEBUG ! $this->sql_report("stop", $query); if ($cache_ttl && method_exists($cache, "sql_save")) { $cache->sql_save($query, $this->query_result, $cache_ttl); ! // mysql_free_result happened within sql_save() } ! elseif (preg_match("/^SELECT/", $query)) { ! $this->open_queries[] = $this->query_result; } } ! else { - // DEBUG $this->sql_report("fromcache", $query); } --- 129,150 ---- } ! if (defined("DEBUG_EXTRA")) ! { ! $this->sql_report("stop", $query); ! } if ($cache_ttl && method_exists($cache, "sql_save")) { + $this->open_queries[(int) $this->query_result] = $this->query_result; $cache->sql_save($query, $this->query_result, $cache_ttl); ! // mysql_free_result called within sql_save() } ! else if (strpos($query, "SELECT") !== false && $this->query_result) { ! $this->open_queries[(int) $this->query_result] = $this->query_result; } } ! else if (defined("DEBUG_EXTRA")) { $this->sql_report("fromcache", $query); } *************** *** 259,263 **** } ! if (method_exists($cache, "sql_fetchrow") && $cache->sql_exists($query_id)) { return $cache->sql_fetchrow($query_id); --- 264,270 ---- } ! // This method is called too often... do not waste memory by calling/checking unneeded things ! // if (method_exists($cache, "sql_fetchrow") && $cache->sql_exists($query_id)) ! if (isset($cache->sql_rowset[$query_id])) { return $cache->sql_fetchrow($query_id); *************** *** 346,360 **** } ! if ($query_id) { ! // If it is not found within the open queries, we try to free a cached result. ;) ! if (!(array_search($query_id, $this->open_queries) > 0)) ! { ! return false; ! } ! unset($this->open_queries[array_search($query_id, $this->open_queries)]); } ! return ($query_id) ? @mysql_free_result($query_id) : false; } --- 353,363 ---- } ! if (isset($this->open_queries[(int) $query_id])) { ! unset($this->open_queries[(int) $query_id]); ! return @mysql_free_result($query_id); } ! return false; } *************** *** 368,373 **** if (!$this->return_on_error) { ! $this_page = (!empty($_SERVER["PHP_SELF"])) ? $_SERVER["PHP_SELF"] : $_ENV["PHP_SELF"]; ! $this_page .= "&" . ((!empty($_SERVER["QUERY_STRING"])) ? $_SERVER["QUERY_STRING"] : $_ENV["QUERY_STRING"]); $message = "<u>SQL ERROR</u> [ " . SQL_LAYER . " ]<br /><br />" . @mysql_error() . "<br /><br /><u>CALLING PAGE</u><br /><br />" . htmlspecialchars($this_page) . (($sql != "") ? "<br /><br /><u>SQL</u><br /><br />" . $sql : "") . "<br />"; --- 371,376 ---- if (!$this->return_on_error) { ! $this_page = (isset($_SERVER["PHP_SELF"]) && !empty($_SERVER["PHP_SELF"])) ? $_SERVER["PHP_SELF"] : $_ENV["PHP_SELF"]; ! $this_page .= "&" . ((isset($_SERVER["QUERY_STRING"]) && !empty($_SERVER["QUERY_STRING"])) ? $_SERVER["QUERY_STRING"] : (isset($_ENV["QUERY_STRING"]) ? $_ENV["QUERY_STRING"] : "")); $message = "<u>SQL ERROR</u> [ " . SQL_LAYER . " ]<br /><br />" . @mysql_error() . "<br /><br /><u>CALLING PAGE</u><br /><br />" . htmlspecialchars($this_page) . (($sql != "") ? "<br /><br /><u>SQL</u><br /><br />" . $sql : "") . "<br />"; *************** *** 389,393 **** } - // DEBUG function sql_report($mode, $query = "") { --- 392,395 ---- --- NEW FILE: phpbb-patches-2004-12-12-08.07.txt --- -------------------------------------------------------- part 1 -------------------------------------------------------- Update of /cvsroot/phpbb/phpBB2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18313 Modified Files: common.php download.php posting.php Log Message: - fix attachment mod errors - make upload path consistent with all other 2.2 path settings - fix "post title wrong after split" bug Index: common.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/common.php,v retrieving revision 1.163 retrieving revision 1.164 diff -C2 -r1.163 -r1.164 *** common.php 30 Nov 2004 11:05:23 -0000 1.163 --- common.php 12 Dec 2004 14:06:56 -0000 1.164 *************** *** 295,301 **** } - // Adjust storage path"s - $config["upload_dir"] = ($config["upload_dir"]{0} == "/" || ($config["upload_dir"]{0} != "/" && $config["upload_dir"]{1} == ":")) ? $config["upload_dir"] : $phpbb_root_path . $config["upload_dir"]; - // Handle email/cron queue. if (time() - $config["queue_interval"] >= $config["last_queue_run"] && !defined("IN_ADMIN")) --- 295,298 ---- Index: download.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/download.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** download.php 17 Sep 2004 09:11:31 -0000 1.23 --- download.php 12 Dec 2004 14:07:00 -0000 1.24 *************** *** 37,41 **** } ! $sql = "SELECT * FROM " . ATTACHMENTS_TABLE . " WHERE attach_id = $download_id"; --- 37,41 ---- } ! $sql = "SELECT attach_id, in_message, post_msg_id, extension FROM " . ATTACHMENTS_TABLE . " WHERE attach_id = $download_id"; *************** *** 101,104 **** --- 101,118 ---- $download_mode = (int) $extensions[$attachment["extension"]]["download_mode"]; + // Fetching filename here to prevent sniffing of filename + $sql = "SELECT attach_id, in_message, post_msg_id, extension, physical_filename, real_filename, mimetype + FROM " . ATTACHMENTS_TABLE . " + WHERE attach_id = $download_id"; + $result = $db->sql_query_limit($sql, 1); + + if (!($attachment = $db->sql_fetchrow($result))) + { + trigger_error("ERROR_NO_ATTACHMENT"); + } + $db->sql_freeresult($result); + + $attachment["physical_filename"] = basename($attachment["physical_filename"]); + if ($thumbnail) { *************** *** 117,126 **** if ($download_mode == PHYSICAL_LINK) { ! if (!@is_dir($config["upload_dir"])) { trigger_error($user->lang["PHYSICAL_DOWNLOAD_NOT_POSSIBLE"]); } ! redirect($config["upload_dir"] . "/" . $attachment["physical_filename"]); } else --- 131,140 ---- if ($download_mode == PHYSICAL_LINK) { ! if (!@is_dir($phpbb_root_path . $config["upload_dir"])) { trigger_error($user->lang["PHYSICAL_DOWNLOAD_NOT_POSSIBLE"]); } ! redirect($phpbb_root_path . $config["upload_dir"] . "/" . $attachment["physical_filename"]); } else *************** *** 137,143 **** function send_file_to_browser($attachment, $upload_dir, $category) { ! global $_SERVER, $HTTP_USER_AGENT, $HTTP_SERVER_VARS, $user, $db, $config; ! $filename = $upload_dir . "/" . $attachment["physical_filename"]; if (!@file_exists($filename)) --- 151,157 ---- function send_file_to_browser($attachment, $upload_dir, $category) { ! global $user, $db, $config, $phpbb_root_path; ! $filename = $phpbb_root_path . $upload_dir . "/" . $attachment["physical_filename"]; if (!@file_exists($filename)) *************** *** 148,152 **** // Determine the Browser the User is using, because of some nasty incompatibilities. // borrowed from phpMyAdmin. :) ! $user_agent = (!empty($_SERVER["HTTP_USER_AGENT"])) ? $_SERVER["HTTP_USER_AGENT"] : ((!empty($HTTP_SERVER_VARS["HTTP_USER_AGENT"])) ? $HTTP_SERVER_VARS["HTTP_USER_AGENT"] : ""); if (ereg("Opera(/| )([0-9].[0-9]{1,2})", $user_agent, $log_version)) --- 162,166 ---- // Determine the Browser the User is using, because of some nasty incompatibilities. // borrowed from phpMyAdmin. :) ! $user_agent = (!empty($_SERVER["HTTP_USER_AGENT"])) ? $_SERVER["HTTP_USER_AGENT"] : ""; if (ereg("Opera(/| )([0-9].[0-9]{1,2})", $user_agent, $log_version)) *************** *** 193,198 **** } // Now the tricky part... let"s dance - // TODO: needs a little bit more testing... seems to break on some configurations (incomplete files) header("Pragma: public"); // header("Content-Transfer-Encoding: none"); --- 207,216 ---- } + if ($config["gzip_compress"]) + { + @ob_end_clean(); + } + // Now the tricky part... let"s dance header("Pragma: public"); // header("Content-Transfer-Encoding: none"); Index: posting.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/posting.php,v retrieving revision 1.347 retrieving revision 1.348 diff -C2 -r1.347 -r1.348 *** posting.php 30 Oct 2004 17:04:44 -0000 1.347 --- posting.php 12 Dec 2004 14:07:00 -0000 1.348 *************** *** 911,915 **** $attachment_data = $message_parser->attachment_data; ! $unset_attachments = parse_inline_attachments($preview_message, $attachment_data, $update_count, $forum_id); foreach ($unset_attachments as $index) --- 911,915 ---- $attachment_data = $message_parser->attachment_data; ! $unset_attachments = parse_inline_attachments($preview_message, $attachment_data, $update_count, $forum_id, true); foreach ($unset_attachments as $index) *************** *** 1668,1673 **** "in_message" => 0, "poster_id" => $poster_id, ! "physical_filename" => $attach_row["physical_filename"], ! "real_filename" => $attach_row["real_filename"], "comment" => $attach_row["comment"], "extension" => $attach_row["extension"], --- 1668,1673 ---- "in_message" => 0, "poster_id" => $poster_id, ! "physical_filename" => basename($attach_row["physical_filename"]), ! "real_filename" => basename($attach_row["real_filename"]), "comment" => $attach_row["comment"], "extension" => $attach_row["extension"], -------------------------------------------------------- part 2 -------------------------------------------------------- Update of /cvsroot/phpbb/phpBB2/includes/mcp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18313/includes/mcp Modified Files: mcp_main.php mcp_topic.php Log Message: - fix attachment mod errors - make upload path consistent with all other 2.2 path settings - fix "post title wrong after split" bug Index: mcp_main.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/mcp/mcp_main.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** mcp_main.php 6 Nov 2004 14:20:27 -0000 1.10 --- mcp_main.php 12 Dec 2004 14:07:02 -0000 1.11 *************** *** 870,875 **** "in_message" => 0, "poster_id" => (int) $attach_row["poster_id"], ! "physical_filename" => (string) $attach_row["physical_filename"], ! "real_filename" => (string) $attach_row["real_filename"], "download_count" => (int) $attach_row["download_count"], "comment" => (string) $attach_row["comment"], --- 870,875 ---- "in_message" => 0, "poster_id" => (int) $attach_row["poster_id"], ! "physical_filename" => (string) basename($attach_row["physical_filename"]), ! "real_filename" => (string) basename($attach_row["real_filename"]), "download_count" => (int) $attach_row["download_count"], "comment" => (string) $attach_row["comment"], Index: mcp_topic.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/mcp/mcp_topic.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** mcp_topic.php 19 Jul 2004 20:13:16 -0000 1.4 --- mcp_topic.php 12 Dec 2004 14:07:02 -0000 1.5 *************** *** 359,362 **** --- 359,368 ---- move_posts($post_id_list, $to_topic_id); + // Change topic title of first post + $sql = "UPDATE " . POSTS_TABLE . " + SET post_subject = "" . $db->sql_escape($subject) . "" + WHERE post_id = {$post_id_list[0]}"; + $db->sql_query($sql); + $success_msg = "TOPIC_SPLIT_SUCCESS"; -------------------------------------------------------- part 3 -------------------------------------------------------- Update of /cvsroot/phpbb/phpBB2/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18313/includes Modified Files: functions_admin.php functions_display.php functions_posting.php functions_privmsgs.php Log Message: - fix attachment mod errors - make upload path consistent with all other 2.2 path settings - fix "post title wrong after split" bug Index: functions_admin.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/functions_admin.php,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -r1.88 -r1.89 *** functions_admin.php 10 Nov 2004 14:15:16 -0000 1.88 --- functions_admin.php 12 Dec 2004 14:07:01 -0000 1.89 *************** *** 678,682 **** global $config, $user, $phpbb_root_path; ! $filename = ($mode == "thumbnail") ? $config["upload_dir"] . "/thumb_" . $filename : $config["upload_dir"] . "/" . $filename; $deleted = @unlink($filename); --- 678,682 ---- global $config, $user, $phpbb_root_path; ! $filename = ($mode == "thumbnail") ? $phpbb_root_path . $config["upload_dir"] . "/thumb_" . basename($filename) : $phpbb_root_path . $config["upload_dir"] . "/" . basename($filename); $deleted = @unlink($filename); *************** *** 685,698 **** $filesys = str_replace("/","\\", $filename); $deleted = @system("del $filesys"); - - if (file_exists($filename)) - { - $filename = realpath($filename); - @chmod($filename, 0777); - if (!($deleted = @unlink($filename))) - { - $deleted = @system("del $filename"); - } - } } --- 685,688 ---- Index: functions_display.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/functions_display.php,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -r1.60 -r1.61 *** functions_display.php 13 Oct 2004 19:30:01 -0000 1.60 --- functions_display.php 12 Dec 2004 14:07:01 -0000 1.61 *************** *** 536,541 **** // Some basics... $attachment["extension"] = strtolower(trim($attachment["extension"])); ! $filename = $config["upload_dir"] . "/" . $attachment["physical_filename"]; ! $thumbnail_filename = $config["upload_dir"] . "/thumb_" . $attachment["physical_filename"]; $upload_image = ""; --- 536,541 ---- // Some basics... $attachment["extension"] = strtolower(trim($attachment["extension"])); ! $filename = $phpbb_root_path . $config["upload_dir"] . "/" . basename($attachment["physical_filename"]); ! $thumbnail_filename = $phpbb_root_path . $config["upload_dir"] . "/thumb_" . basename($attachment["physical_filename"]); $upload_image = ""; *************** *** 555,559 **** $filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize); ! $display_name = $attachment["real_filename"]; $comment = str_replace("\n", "<br />", censor_text($attachment["comment"])); --- 555,559 ---- $filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize); ! $display_name = basename($attachment["real_filename"]); $comment = str_replace("\n", "<br />", censor_text($attachment["comment"])); Index: functions_posting.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/functions_posting.php,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -r1.127 -r1.128 *** functions_posting.php 6 Nov 2004 14:20:26 -0000 1.127 --- functions_posting.php 12 Dec 2004 14:07:01 -0000 1.128 *************** *** 134,138 **** function upload_attachment($forum_id, $filename, $local = false, $local_storage = "", $is_message = false) { ! global $auth, $user, $config, $db; $filedata = array(); --- 134,138 ---- function upload_attachment($forum_id, $filename, $local = false, $local_storage = "", $is_message = false) { ! global $auth, $user, $config, $db, $phpbb_root_path; $filedata = array(); *************** *** 145,149 **** } ! $r_file = $filename; $file = (!$local) ? $_FILES["fileupload"]["tmp_name"] : $local_storage; $filedata["mimetype"] = (!$local) ? $_FILES["fileupload"]["type"] : "application/octet-stream"; --- 145,149 ---- } ! $r_file = trim(basename($filename)); $file = (!$local) ? $_FILES["fileupload"]["tmp_name"] : $local_storage; $filedata["mimetype"] = (!$local) ? $_FILES["fileupload"]["type"] : "application/octet-stream"; *************** *** 187,190 **** --- 187,229 ---- } + $filedata["thumbnail"] = 0; + + // Prepare Values + $filedata["filetime"] = time(); + $filedata["filename"] = stripslashes($r_file); + + $filedata["destination_filename"] = strtolower($filedata["filename"]); + $filedata["destination_filename"] = $user->data["user_id"] . "_" . $filedata["filetime"] . "." . $filedata["extension"]; + + $filedata["filename"] = str_replace(""", "\"", $filedata["filename"]); + + // Do we have to create a thumbnail? + if ($cat_id == ATTACHMENT_CATEGORY_IMAGE && $config["img_create_thumbnail"]) + { + $filedata["thumbnail"] = 1; + } + + // Descide the Upload method + $upload_mode = (@ini_get("open_basedir") || @ini_get("safe_mode")) ? "move" : "copy"; + $upload_mode = ($local) ? "local" : $upload_mode; + + // Ok, upload the File + $result = move_uploaded_attachment($upload_mode, $file, $filedata); + + if ($result) + { + $filedata["error"][] = $result; + $filedata["post_attach"] = false; + + return $filedata; + } + + $file = (!$local) ? $phpbb_root_path . $config["upload_dir"] . "/" . $filedata["destination_filename"] : $local_storage; + + if (!$filedata["filesize"]) + { + $filedata["filesize"] = @filesize($file); + } + // Check Image Size, if it is an image if (!$auth->acl_gets("m_", "a_") && $cat_id == ATTACHMENT_CATEGORY_IMAGE) *************** *** 198,201 **** --- 237,244 ---- $filedata["error"][] = sprintf($user->lang["ERROR_IMAGESIZE"], $config["img_max_width"], $config["img_max_height"]); $filedata["post_attach"] = false; + + phpbb_unlink($filedata["destination_filename"]); + phpbb_unlink($filedata["destination_filename"], "thumbnail"); + return $filedata; } *************** *** 212,215 **** --- 255,262 ---- $filedata["error"][] = sprintf($user->lang["ATTACHMENT_TOO_BIG"], $allowed_filesize, $size_lang); $filedata["post_attach"] = false; + + phpbb_unlink($filedata["destination_filename"]); + phpbb_unlink($filedata["destination_filename"], "thumbnail"); + return $filedata; } *************** *** 222,225 **** --- 269,276 ---- $filedata["error"][] = $user->lang["ATTACH_QUOTA_REACHED"]; $filedata["post_attach"] = false; + + phpbb_unlink($filedata["destination_filename"]); + phpbb_unlink($filedata["destination_filename"], "thumbnail"); + return $filedata; } *************** *** 227,231 **** // TODO - Check Free Disk Space - need testing under windows ! if ($free_space = disk_free_space($config["upload_dir"])) { if ($free_space <= $filedata["filesize"]) --- 278,282 ---- // TODO - Check Free Disk Space - need testing under windows ! if ($free_space = disk_free_space($phpbb_root_path . $config["upload_dir"])) { if ($free_space <= $filedata["filesize"]) *************** *** 233,273 **** $filedata["error"][] = $user->lang["ATTACH_QUOTA_REACHED"]; $filedata["post_attach"] = false; - return $filedata; - } - } - - $filedata["thumbnail"] = 0; - - // Prepare Values - $filedata["filetime"] = time(); - $filedata["filename"] = stripslashes($r_file); ! $filedata["destination_filename"] = strtolower($filedata["filename"]); ! $filedata["destination_filename"] = $user->data["user_id"] . "_" . $filedata["filetime"] . "." . $filedata["extension"]; ! ! $filedata["filename"] = str_replace(""", "\"", $filedata["filename"]); ! // Do we have to create a thumbnail ? ! if ($cat_id == ATTACHMENT_CATEGORY_IMAGE && $config["img_create_thumbnail"]) ! { ! $filedata["thumbnail"] = 1; } - // Descide the Upload method - $upload_mode = (@ini_get("open_basedir") || @ini_get("safe_mode")) ? "move" : "copy"; - $upload_mode = ($local) ? "local" : $upload_mode; - - // Ok, upload the File - $result = move_uploaded_attachment($upload_mode, $file, $filedata); - - if ($result) - { - $filedata["error"][] = $result; - $filedata["post_attach"] = false; - } return $filedata; } ! // Move/Upload File - could be used for Avatars too ? function move_uploaded_attachment($upload_mode, $source_filename, &$filedata) { --- 284,299 ---- $filedata["error"][] = $user->lang["ATTACH_QUOTA_REACHED"]; $filedata["post_attach"] = false; ! phpbb_unlink($filedata["destination_filename"]); ! phpbb_unlink($filedata["destination_filename"], "thumbnail"); ! return $filedata; ! } } return $filedata; } ! // Move/Upload File - could be used for Avatars too? function move_uploaded_attachment($upload_mode, $source_filename, &$filedata) { *************** *** 280,310 **** { case "copy": ! if ( !@copy($source_filename, $config["upload_dir"] . "/" . $destination_filename) ) { ! if ( !@move_uploaded_file($source_filename, $config["upload_dir"] . "/" . $destination_filename) ) { ! return sprintf($user->lang["GENERAL_UPLOAD_ERROR"], $config["upload_dir"] . "/" . $destination_filename); } } ! @chmod($config["upload_dir"] . "/" . $destination_filename, 0666); break; case "move": ! if ( !@move_uploaded_file($source_filename, $config["upload_dir"] . "/" . $destination_filename) ) { ! if ( !@copy($source_filename, $config["upload_dir"] . "/" . $destination_filename) ) { ! return sprintf($user->lang["GENERAL_UPLOAD_ERROR"], $config["upload_dir"] . "/" . $destination_filename); } } ! @chmod($config["upload_dir"] . "/" . $destination_filename, 0666); break; case "local": ! if (!@copy($source_filename, $config["upload_dir"] . "/" . $destination_filename)) { ! return sprintf($user->lang["GENERAL_UPLOAD_ERROR"], $config["upload_dir"] . "/" . $destination_filename); } ! @chmod($config["upload_dir"] . "/" . $destination_filename, 0666); @unlink($source_filename); break; --- 306,336 ---- { case "copy": ! if (!@copy($source_filename, $phpbb_root_path . $config["upload_dir"] . "/" . $destination_filename)) { ! if (!@move_uploaded_file($source_filename, $phpbb_root_path . $config["upload_dir"] . "/" . $destination_filename)) { ! return sprintf($user->lang["GENERAL_UPLOAD_ERROR"], $phpbb_root_path . $config["upload_dir"] . "/" . $destination_filename); } } ! @chmod($phpbb_root_path . $config["upload_dir"] . "/" . $destination_filename, 0666); break; case "move": ! if (!@move_uploaded_file($source_filename, $phpbb_root_path . $config["upload_dir"] . "/" . $destination_filename)) { ! if (!@copy($source_filename, $phpbb_root_path . $config["upload_dir"] . "/" . $destination_filename)) { ! return sprintf($user->lang["GENERAL_UPLOAD_ERROR"], $phpbb_root_path . $config["upload_dir"] . "/" . $destination_filename); } } ! @chmod($phpbb_root_path . $config["upload_dir"] . "/" . $destination_filename, 0666); break; case "local": ! if (!@copy($source_filename, $phpbb_root_path . $config["upload_dir"] . "/" . $destination_filename)) { ! return sprintf($user->lang["GENERAL_UPLOAD_ERROR"], $phpbb_root_path . $config["upload_dir"] . "/" . $destination_filename); } ! @chmod($phpbb_root_path . $config["upload_dir"] . "/" . $destination_filename, 0666); @unlink($source_filename); break; *************** *** 313,318 **** if ($filedata["thumbnail"]) { ! $source = $config["upload_dir"] . "/" . $destination_filename; ! $destination = $config["upload_dir"] . "/thumb_" . $destination_filename; if (!create_thumbnail($source, $destination, $filedata["mimetype"])) --- 339,344 ---- if ($filedata["thumbnail"]) { ! $source = $phpbb_root_path . $config["upload_dir"] . "/" . $destination_filename; ! $destination = $phpbb_root_path . $config["upload_dir"] . "/thumb_" . $destination_filename; if (!create_thumbnail($source, $destination, $filedata["mimetype"])) *************** *** 648,652 **** { $hidden = ""; ! $attach_row["real_filename"] = stripslashes($attach_row["real_filename"]); foreach ($attach_row as $key => $value) --- 674,678 ---- { $hidden = ""; ! $attach_row["real_filename"] = stripslashes(basename($attach_row["real_filename"])); foreach ($attach_row as $key => $value) *************** *** 655,663 **** } ! $download_link = (!$attach_row["attach_id"]) ? $config["upload_dir"] . "/" . $attach_row["physical_filename"] : $phpbb_root_path . "download.$phpEx$SID&id=" . intval($attach_row["attach_id"]); $template->assign_block_vars("attach_row", array( ! "FILENAME" => $attach_row["real_filename"], ! "ATTACH_FILENAME" => $attach_row["physical_filename"], "FILE_COMMENT" => $attach_row["comment"], "ATTACH_ID" => $attach_row["attach_id"], --- 681,689 ---- } ! $download_link = (!$attach_row["attach_id"]) ? $phpbb_root_path . $config["upload_dir"] . "/" . basename($attach_row["physical_filename"]) : $phpbb_root_path . "download.$phpEx$SID&id=" . intval($attach_row["attach_id"]); $template->assign_block_vars("attach_row", array( ! "FILENAME" => basename($attach_row["real_filename"]), ! "ATTACH_FILENAME" => basename($attach_row["physical_filename"]), "FILE_COMMENT" => $attach_row["comment"], "ATTACH_ID" => $attach_row["at -------------------------------------------------------- part 4 -------------------------------------------------------- Update of /cvsroot/phpbb/phpBB2/adm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18313/adm Modified Files: admin_attachments.php Log Message: - fix attachment mod errors - make upload path consistent with all other 2.2 path settings - fix "post title wrong after split" bug Index: admin_attachments.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/adm/admin_attachments.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** admin_attachments.php 25 Nov 2004 21:52:47 -0000 1.32 --- admin_attachments.php 12 Dec 2004 14:06:55 -0000 1.33 *************** *** 362,366 **** if ($submit && $mode == "orphan") { ! $delete_files = array_keys(request_var("delete", "")); $add_files = (isset($_REQUEST["add"])) ? array_keys(request_var("add", "")) : array(); $post_ids = request_var("post_id", 0); --- 362,366 ---- if ($submit && $mode == "orphan") { ! $delete_files = (isset($_REQUEST["delete"])) ? array_keys(request_var("delete", "")) : array(); $add_files = (isset($_REQUEST["add"])) ? array_keys(request_var("add", "")) : array(); $post_ids = request_var("post_id", 0); *************** *** 368,373 **** foreach ($delete_files as $delete) { ! phpbb_unlink($config["upload_dir"] . "/" . $delete); ! phpbb_unlink($config["upload_dir"] . "/thumb_" . $delete); } --- 368,373 ---- foreach ($delete_files as $delete) { ! phpbb_unlink($delete); ! phpbb_unlink($delete, "thumbnail"); } *************** *** 1187,1194 **** $attach_filelist = array(); ! $dir = @opendir($config["upload_dir"]); while ($file = @readdir($dir)) { ! if (is_file($config["upload_dir"] . "/" . $file) && filesize($config["upload_dir"] . "/" . $file) && $file{0} != "." && $file != "index.htm" && !preg_match("#^thumb\_#", $file)) { $attach_filelist[$file] = $file; --- 1187,1194 ---- $attach_filelist = array(); ! $dir = @opendir($phpbb_root_path . $config["upload_dir"]); while ($file = @readdir($dir)) { ! if (is_file($phpbb_root_path . $config["upload_dir"] . "/" . $file) && filesize($phpbb_root_path . $config["upload_dir"] . "/" . $file) && $file{0} != "." && $file != "index.htm" && !preg_match("#^thumb\_#", $file)) { $attach_filelist[$file] = $file; *************** *** 1242,1251 **** { $row_class = (++$i % 2 == 0) ? "row2" : "row1"; ! $filesize = @filesize($config["upload_dir"] . "/" . $file); $size_lang = ($filesize >= 1048576) ? $user->lang["MB"] : ( ($filesize >= 1024) ? $user->lang["KB"] : $user->lang["BYTES"] ); $filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize); ?> <tr> ! <td class="<?php echo $row_class; ?>"><a href="<?php echo $config["upload_dir"] . "/" . $file; ?>" class="gen" target="file"><?php echo $file; ?></a></td> <td class="<?php echo $row_class; ?>"><?php echo $filesize . " " . $size_lang; ?></td> <td class="<?php echo $row_class; ?>"><b class="gen">ID: </b><input type="text" name="post_id[<?php echo $file; ?>]" class="post" size="7" maxlength="10" value="<?php echo (!empty($post_ids[$file])) ? $post_ids[$file] : ""; ?>" /></td> --- 1242,1251 ---- { $row_class = (++$i % 2 == 0) ? "row2" : "row1"; ! $filesize = @filesize($phpbb_root_path . $config["upload_dir"] . "/" . $file); $size_lang = ($filesize >= 1048576) ? $user->lang["MB"] : ( ($filesize >= 1024) ? $user->lang["KB"] : $user->lang["BYTES"] ); $filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize); ?> <tr> ! <td class="<?php echo $row_class; ?>"><a href="<?php echo $phpbb_root_path . $config["upload_dir"] . "/" . $file; ?>" class="gen" target="file"><?php echo $file; ?></a></td> <td class="<?php echo $row_class; ?>"><?php echo $filesize . " " . $size_lang; ?></td> <td class="<?php echo $row_class; ?>"><b class="gen">ID: </b><input type="text" name="post_id[<?php echo $file; ?>]" class="post" size="7" maxlength="10" value="<?php echo (!empty($post_ids[$file])) ? $post_ids[$file] : ""; ?>" /></td> *************** *** 1401,1412 **** function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename) { ! global $message_parser, $db, $user; $message_parser->attachment_data = array(); $message_parser->filename_data["filecomment"] = ""; ! $message_parser->filename_data["filename"] = $upload_dir . "/" . $filename; ! $filedata = upload_attachment($forum_id, $filename, true, $upload_dir . "/" . $filename); if ($filedata["post_attach"] && !sizeof($filedata["error"])) --- 1401,1412 ---- function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename) { ! global $message_parser, $db, $user, $phpbb_root_path; $message_parser->attachment_data = array(); $message_parser->filename_data["filecomment"] = ""; ! $message_parser->filename_data["filename"] = $phpbb_root_path . $upload_dir . "/" . basename($filename); ! $filedata = upload_attachment($forum_id, $filename, true, $phpbb_root_path . $upload_dir . "/" . basename($filename)); if ($filedata["post_attach"] && !sizeof($filedata["error"])) *************** *** 1492,1524 **** global $user, $phpbb_root_path; - // Adjust the Upload Directory. Relative or absolute, this is the question here. - $real_upload_dir = $upload_dir; - $upload_dir = ($upload_dir{0} == "/" || ($upload_dir{0} != "/" && $upload_dir{1} == ":")) ? $upload_dir : $phpbb_root_path . $upload_dir; - // Does the target directory exist, is it a directory and writeable. if ($create_directory) { ! if (!file_exists($upload_dir)) { ! @mkdir($upload_dir, 0777); ! @chmod($upload_dir, 0777); } } ! if (!file_exists($upload_dir)) { ! $error[] = sprintf($user->lang["NO_UPLOAD_DIR"], $real_upload_dir); return; } ! if (!is_dir($upload_dir)) { ! $error[] = sprintf($user->lang["UPLOAD_NOT_DIR"], $real_upload_dir); return; } ! if (!is_writable($upload_dir)) { ! $error[] = sprintf($user->lang["NO_WRITE_UPLOAD"], $real_upload_dir); return; } --- 1492,1520 ---- global $user, $phpbb_root_path; // Does the target directory exist, is it a directory and writeable. if ($create_directory) { ! if (!file_exists($phpbb_root_path . $upload_dir)) { ! @mkdir($phpbb_root_path . $upload_dir, 0777); ! @chmod($phpbb_root_path . $upload_dir, 0777); } } ! if (!file_exists($phpbb_root_path . $upload_dir)) { ! $error[] = sprintf($user->lang["NO_UPLOAD_DIR"], $upload_dir); return; } ! if (!is_dir($phpbb_root_path . $upload_dir)) { ! $error[] = sprintf($user->lang["UPLOAD_NOT_DIR"], $upload_dir); return; } ! if (!is_writable($phpbb_root_path . $upload_dir)) { ! $error[] = sprintf($user->lang["NO_WRITE_UPLOAD"], $upload_dir); return; } --- NEW FILE: phpbb-patches-2004-12-19-09.59.txt --- Update of /cvsroot/phpbb/phpBB2/includes/acm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12148/includes/acm Modified Files: acm_file.php Log Message: - some fixes/changes Index: acm_file.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/acm/acm_file.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** acm_file.php 26 May 2004 18:55:26 -0000 1.15 --- acm_file.php 19 Dec 2004 17:59:13 -0000 1.16 *************** *** 14,18 **** class acm { ! var $vars = ""; var $var_expires = array(); var $is_modified = FALSE; --- 14,18 ---- class acm { ! var $vars = array(); var $var_expires = array(); var $is_modified = FALSE; *************** *** 91,95 **** if (file_exists($this->cache_dir . "data_global." . $phpEx)) { ! if (!is_array($this->vars)) { $this->load(); --- 91,95 ---- if (file_exists($this->cache_dir . "data_global." . $phpEx)) { ! if (!sizeof($this->vars)) { $this->load(); *************** *** 191,195 **** else { ! if (!is_array($this->vars)) { $this->load(); --- 191,195 ---- else { ! if (!sizeof($this->vars)) { $this->load(); Update of /cvsroot/phpbb/phpBB2/adm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12148/adm Modified Files: admin_viewlogs.php Log Message: - some fixes/changes Index: admin_viewlogs.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/adm/admin_viewlogs.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** admin_viewlogs.php 6 Nov 2004 14:11:47 -0000 1.13 --- admin_viewlogs.php 19 Dec 2004 17:59:12 -0000 1.14 *************** *** 148,154 **** view_log($mode, $log_data, $log_count, $config["topics_per_page"], $start, $forum_id, 0, 0, $sql_where, $sql_sort); if ($log_count) { ! for($i = 0; $i < sizeof($log_data); $i++) { $row_class = ($row_class == "row1") ? "row2" : "row1"; --- 148,156 ---- view_log($mode, $log_data, $log_count, $config["topics_per_page"], $start, $forum_id, 0, 0, $sql_where, $sql_sort); + $row_class = ""; + if ($log_count) { ! for ($i = 0; $i < sizeof($log_data); $i++) { $row_class = ($row_class == "row1") ? "row2" : "row1"; *************** *** 166,170 **** foreach (array("viewtopic", "viewlogs", "viewforum") as $check) { ! if ($log_data[$i][$check]) { $data[] = "<a href="" . $log_data[$i][$check] . "">" . $user->lang["LOGVIEW_" . strtoupper($check)] . "</a>"; --- 168,172 ---- foreach (array("viewtopic", "viewlogs", "viewforum") as $check) { ! if (isset($log_data[$i][$check]) && $log_data[$i][$check]) { $data[] = "<a href="" . $log_data[$i][$check] . "">" . $user->lang["LOGVIEW_" . strtoupper($check)] . "</a>"; Update of /cvsroot/phpbb/phpBB2/includes/ucp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12148/includes/ucp Modified Files: ucp_pm_viewmessage.php Log Message: - some fixes/changes Index: ucp_pm_viewmessage.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/ucp/ucp_pm_viewmessage.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** ucp_pm_viewmessage.php 8 Oct 2004 11:13:00 -0000 1.7 --- ucp_pm_viewmessage.php 19 Dec 2004 17:59:14 -0000 1.8 *************** *** 16,20 **** global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db; ! $user->add_lang("viewtopic"); $msg_id = (int) $msg_id; --- 16,20 ---- global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db; ! $user->add_lang(array("viewtopic", "memberlist")); $msg_id = (int) $msg_id; *************** *** 413,416 **** --- 413,418 ---- } + $user_row["rank_title"] = $user_row["rank_image"] = ""; + if (!empty($user_row["user_rank"])) { Update of /cvsroot/phpbb/phpBB2/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12148/includes Modified Files: bbcode.php functions_display.php message_parser.php template.php Log Message: - some fixes/changes Index: bbcode.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/bbcode.php,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -r1.81 -r1.82 *** bbcode.php 14 Nov 2004 17:12:06 -0000 1.81 --- bbcode.php 19 Dec 2004 17:59:13 -0000 1.82 *************** *** 46,49 **** --- 46,50 ---- { $this->bbcode_bitfield = $bbcode_bitfield; + // Init those added with a new bbcode_bitfield (already stored codes will not get parsed again) $this->bbcode_cache_init(); *************** *** 113,117 **** if ($this->bbcode_bitfield & $user->theme["primary"]["bbcode_bitfield"]) { ! $style = (file_exists($phpbb_root_path . "styles/templates/" . $user->theme["primary"]["template_path"] . "/bbcode.html")) ? "primary" : "secondary"; } } --- 114,118 ---- if ($this->bbcode_bitfield & $user->theme["primary"]["bbcode_bitfield"]) { ! $style = (file_exists($phpbb_root_path . "styles/" . $user->theme["primary"]["template_path"] . "/template/bbcode.html")) ? "primary" : "secondary"; } } Index: functions_display.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/functions_display.php,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -r1.61 -r1.62 *** functions_display.php 12 Dec 2004 14:07:01 -0000 1.61 --- functions_display.php 19 Dec 2004 17:59:13 -0000 1.62 *************** *** 501,509 **** // Generate Template ! // TODO: secondary template ! $template_filename = $phpbb_root_path . "styles/" . $user->theme["primary"]["template_path"] . "/template/attachment.html"; if (!($fp = @fopen($template_filename, "rb"))) { ! trigger_error("Could not load attachment template"); } $attachment_template = fread($fp, filesize($template_filename)); --- 501,515 ---- // Generate Template ! $style = "primary"; ! ! if (!empty($user->theme["secondary"])) ! { ! $style = (file_exists($phpbb_root_path . "styles/" . $user->theme["primary"]["template_path"] . "/template/attachment.html")) ? "primary" : "secondary"; ! } ! ! $template_filename = $phpbb_root_path . "styles/" . $user->theme[$style]["template_path"] . "/template/attachment.html"; if (!($fp = @fopen($template_filename, "rb"))) { ! trigger_error("Could not load template file "" . $template_filename . """); } $attachment_template = fread($fp, filesize($template_filename)); Index: message_parser.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/message_parser.php,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -r1.82 -r1.83 *** message_parser.php 14 Nov 2004 17:12:06 -0000 1.82 --- message_parser.php 19 Dec 2004 17:59:13 -0000 1.83 *************** *** 12,22 **** // ------------------------------------------------------------- - /* - TODO list for M-3: - - add other languages to syntax highlighter - - better (and unified, wrt other pages such as registration) validation for urls, emails, etc... - - need size limit checks on img/flash tags ... probably warrants some discussion - */ - if (!defined("IN_PHPBB")) { --- 12,15 ---- *************** *** 719,722 **** --- 712,716 ---- { $this->warn_msg[] = sprintf($user->lang["TOO_MANY_URLS"], $config["max_" . $mode . "_urls"]); + return $this->warn_msg; } *************** *** 730,734 **** $this->message_status = "parsed"; return; - //return implode("<br />", $this->warn_msg); } --- 724,727 ---- Index: template.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/template.php,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -r1.65 -r1.66 *** template.php 30 Oct 2004 17:11:58 -0000 1.65 --- template.php 19 Dec 2004 17:59:13 -0000 1.66 *************** *** 158,162 **** } ! if (!file_exists($this->files[$handle])) { $this->tpl = "secondary"; --- 158,162 ---- } ! if (!file_exists($this->files[$handle]) && !empty($user->theme["secondary"])) { $this->tpl = "secondary"; Update of /cvsroot/phpbb/phpBB2/styles/subSilver/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12148/styles/subSilver/template Modified Files: ucp_pm_viewmessage.html Log Message: - some fixes/changes Index: ucp_pm_viewmessage.html =================================================================== RCS file: /cvsroot/phpbb/phpBB2/styles/subSilver/template/ucp_pm_viewmessage.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ucp_pm_viewmessage.html 5 Sep 2004 15:45:50 -0000 1.2 --- ucp_pm_viewmessage.html 19 Dec 2004 17:59:15 -0000 1.3 *************** *** 53,102 **** <tr> - <th width="150" nowrap="nowrap">{L_AUTHOR}</th> <th nowrap="nowrap">{L_MESSAGE}</th> </tr> <tr> ! <td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td> </tr> <tr class="row1"> - <td valign="top"> - - <div align="center"> - - <b class="postauthor">{AUTHOR_NAME}</b><br /><br /> - - <table cellspacing="4" align="center"> - <!-- IF ONLINE_IMG --> - <tr> - <td>{ONLINE_IMG}</td> - </tr> - <!-- ENDIF --> - <!-- IF AUTHOR_RANK --> - <tr> - <td class="postdetails">{AUTHOR_RANK}</td> - </tr> - <!-- ENDIF --> - <!-- IF RANK_IMAGE --> - <tr> - <td>{RANK_IMAGE}</td> - </tr> - <!-- ENDIF --> - <!-- IF AUTHOR_AVATAR --> - <tr> - <td>{AUTHOR_AVATAR}</td> - </tr> - <!-- ENDIF --> - </table> - - <span class="postdetails"> - <!-- IF AUTHOR_POSTS --><br /><b>{L_JOINED}:</b> {AUTHOR_JOINED}<!-- ENDIF --> - <!-- IF AUTHOR_POSTS --><br /><b>{L_POSTS}:</b> {AUTHOR_POSTS}<!-- ENDIF --> - <!-- IF AUTHOR_FROM --><br /><b>{L_LOCATION}:</b> {AUTHOR_FROM}<!-- ENDIF --> - </span> - - </div> - </td> <td valign="top"><table width="100%" cellspacing="5"> <tr> --- 53,64 ---- <tr> <th nowrap="nowrap">{L_MESSAGE}</th> </tr> <tr> ! <td class="spacer" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td> </tr> <tr class="row1"> <td valign="top"><table width="100%" cellspacing="5"> ... [truncated message content] |