From 55f2568b0c7b75b457598b6b5eeb11c3467cf89c Mon Sep 17 00:00:00 2001 From: Ice Date: Sat, 9 Aug 2008 13:36:58 +0000 Subject: [PATCH] Fixed LIMIT and lack of $phpbb_root_path --- root/install_portal/install.php | 12 ++++++------ root/portal/includes/mini_cal/mini_cal_topic.php | 6 ++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/root/install_portal/install.php b/root/install_portal/install.php index b9ad9f6d..cf8aae14 100644 --- a/root/install_portal/install.php +++ b/root/install_portal/install.php @@ -14,7 +14,7 @@ define('IN_PORTAL_INSTALL', true); $phpEx = substr(strrchr(__FILE__, '.'), 1); $phpbb_root_path = '../'; -$portal_root_path = '../portal/'; +$portal_root_path = $phpbb_root_path.'portal/'; include($phpbb_root_path . 'common.'.$phpEx); include($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx); @@ -597,10 +597,10 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') ) { if (isset($config[$row['config_name']])) { - $sql2 = 'UPDATE ' . PORTAL_CONFIG_TABLE . " SET config_value = '" . $config[$row['config_name']] . "' WHERE config_name = '" . $row['config_name'] . "' LIMIT 1"; - $db->sql_query($sql2); - $sql3 = 'DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = '" . $row['config_name'] . "' LIMIT 1"; - $db->sql_query($sql3); + $sql2 = 'UPDATE ' . PORTAL_CONFIG_TABLE . " SET config_value = '" . $config[$row['config_name']] . "' WHERE config_name = '" . $row['config_name'] . "'"; + $db->sql_query_limit($sql2, 1); + $sql3 = 'DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = '" . $row['config_name'] . "'"; + $db->sql_query_limit($sql3, 1); } } $db->sql_freeresult($result); @@ -856,7 +856,7 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') ) { $portal_update_array = array(); - include 'schemas/update_schema.php'; + include $phpbb_root_path.'schemas/update_schema.'.$phpEx; foreach( $sql_update as $sql_ver => $sql_data ) { diff --git a/root/portal/includes/mini_cal/mini_cal_topic.php b/root/portal/includes/mini_cal/mini_cal_topic.php index 297b55bf..6e235009 100644 --- a/root/portal/includes/mini_cal/mini_cal_topic.php +++ b/root/portal/includes/mini_cal/mini_cal_topic.php @@ -168,12 +168,10 @@ if (!defined('IN_MINI_CAL')) AND topic_calendar_time <> 0 $mini_cal_auth_sql ORDER BY - t.topic_calendar_time ASC - LIMIT - 0," . MINI_CAL_LIMIT; + t.topic_calendar_time ASC"; // did we get a result? - if( $result = $db->sql_query($sql) ) + if( $result = $db->sql_query_limit($sql, MINI_CAL_LIMIT) ) { $template->assign_block_vars('switch_mini_cal_events', array()); if ( $db->sql_numrows($result) > 0 )