diff --git a/root/install_portal/install.php b/root/install_portal/install.php index c96fea84..b9ad9f6d 100644 --- a/root/install_portal/install.php +++ b/root/install_portal/install.php @@ -39,9 +39,9 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') ) FROM ' . PORTAL_CONFIG_TABLE . " WHERE config_name = 'portal_version'"; $result = @$db->sql_query_limit( $sql, 1 ); - if( $db->sql_affectedrows($result) > 0 ) + $version = $db->sql_fetchrow( $result ); + if( sizeof( $version ) ) { - $version = $db->sql_fetchrow( $result ); $old_version = strtolower($version['version']); } else @@ -51,9 +51,9 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') ) FROM ' . CONFIG_TABLE . " WHERE config_name = 'portal_version'"; $result = @$db->sql_query_limit( $sql, 1 ); - if( $db->sql_affectedrows($result) > 0 ) + $version = $db->sql_fetchrow( $result ); + if( sizeof( $version ) ) { - $version = $db->sql_fetchrow( $result ); $phpbb3portal = true; $old_version = ( strtolower($version['version']) == '1.1.0.b' ) ? '1.1.0b' : strtolower($version['version']) ; } diff --git a/root/portal/includes/functions.php b/root/portal/includes/functions.php index 2b95c6dc..82b9fddb 100644 --- a/root/portal/includes/functions.php +++ b/root/portal/includes/functions.php @@ -163,13 +163,15 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le forum_id'; $result = $db->sql_query_limit($sql, 1); - if ($db->sql_affectedrows() > 0) + + + $row = $db->sql_fetchrow($result); + if( !sizeof( $row ) ) { - $row = $db->sql_fetchrow($result); - $global_f = $row['forum_id']; - } else { return array(); } + $global_f = $row['forum_id']; + } @@ -526,4 +528,4 @@ function ap_validate($str) { return $page_string; } -?> \ No newline at end of file +?>