Fixed LIMIT and lack of $phpbb_root_path

This commit is contained in:
Ice
2008-08-09 13:36:58 +00:00
parent 2f7427a29e
commit 55f2568b0c
2 changed files with 8 additions and 10 deletions

View File

@@ -14,7 +14,7 @@ define('IN_PORTAL_INSTALL', true);
$phpEx = substr(strrchr(__FILE__, '.'), 1); $phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path = '../'; $phpbb_root_path = '../';
$portal_root_path = '../portal/'; $portal_root_path = $phpbb_root_path.'portal/';
include($phpbb_root_path . 'common.'.$phpEx); include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/acp/acp_modules.' . $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']])) 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"; $sql2 = 'UPDATE ' . PORTAL_CONFIG_TABLE . " SET config_value = '" . $config[$row['config_name']] . "' WHERE config_name = '" . $row['config_name'] . "'";
$db->sql_query($sql2); $db->sql_query_limit($sql2, 1);
$sql3 = 'DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = '" . $row['config_name'] . "' LIMIT 1"; $sql3 = 'DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = '" . $row['config_name'] . "'";
$db->sql_query($sql3); $db->sql_query_limit($sql3, 1);
} }
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
@@ -856,7 +856,7 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') )
{ {
$portal_update_array = array(); $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 ) foreach( $sql_update as $sql_ver => $sql_data )
{ {

View File

@@ -168,12 +168,10 @@ if (!defined('IN_MINI_CAL'))
AND topic_calendar_time <> 0 AND topic_calendar_time <> 0
$mini_cal_auth_sql $mini_cal_auth_sql
ORDER BY ORDER BY
t.topic_calendar_time ASC t.topic_calendar_time ASC";
LIMIT
0," . MINI_CAL_LIMIT;
// did we get a result? // 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()); $template->assign_block_vars('switch_mini_cal_events', array());
if ( $db->sql_numrows($result) > 0 ) if ( $db->sql_numrows($result) > 0 )