Fixed LIMIT and lack of $phpbb_root_path
This commit is contained in:
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user