From cfinck@svn.reactos.org Fri Aug 3 18:24:37 2007 From: cfinck@svn.reactos.org To: ros-diffs@reactos.org Subject: [ros-diffs] [cfinck] 28140: - Fix my fix - Also add it to the "insert_match" function - Use brackets for the if statements Date: Fri, 03 Aug 2007 16:24:11 +0000 Message-ID: <20070803162411.70A7CFA89A@mail.smartxx.ru> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7661654854890662117==" --===============7661654854890662117== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: cfinck Date: Fri Aug 3 20:24:10 2007 New Revision: 28140 URL: http://svn.reactos.org/svn/reactos?rev=3D28140&view=3Drev Log: - Fix my fix - Also add it to the "insert_match" function - Use brackets for the if statements Modified: trunk/web/reactos.org/htdocs/roscms/inc/data_export_page.php Modified: trunk/web/reactos.org/htdocs/roscms/inc/data_export_page.php URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/i= nc/data_export_page.php?rev=3D28140&r1=3D28139&r2=3D28140&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- trunk/web/reactos.org/htdocs/roscms/inc/data_export_page.php (original) +++ trunk/web/reactos.org/htdocs/roscms/inc/data_export_page.php Fri Aug 3 2= 0:24:10 2007 @@ -326,8 +326,12 @@ =09 // Try to get the dataset with r.rev_language =3D=3D $g_lang if( mysql_num_rows($query_g_page) =3D=3D 2 ) - if( $result_g_page['r.rev_language'] =3D=3D $roscms_standard_language ) + { + if( $result_g_page['rev_language'] =3D=3D $roscms_standard_language ) + { $result_g_page =3D mysql_fetch_assoc($query_g_page); + } + } =09 /* =09 $g_log .=3D "generate_page(".$g_page_name.", ".$g_lang.", ".$g_page_dynid.= ")"; @@ -470,7 +474,7 @@ =09 global $g_page_dynid; =09 - $query_content_temp =3D "SELECT d.data_acl, t.text_content, r.rev_version,= r.rev_usrid, r.rev_datetime , r.data_id, r.rev_id + $query_content_temp =3D "SELECT d.data_acl, t.text_content, r.rev_version,= r.rev_usrid, r.rev_datetime , r.data_id, r.rev_id, r.rev_language FROM data_ d, data_revision r, data_text t WHERE data_name =3D '".mysql_real_escape_string($g_match_name)."'=20 AND data_type =3D '".mysql_real_escape_string($g_insert_match_type)= ."' @@ -481,13 +485,22 @@ AND t.data_rev_id =3D r.rev_id=20 AND t.text_name =3D 'content' ORDER BY r.rev_version DESC - LIMIT 1;"; - + LIMIT 2;"; + =09 // echo $query_content_temp; =20 $query_content =3D mysql_query($query_content_temp); - $result_content =3D mysql_fetch_array($query_content); -=09 + $result_content =3D mysql_fetch_assoc($query_content); +=09 + // Try to get the dataset with r.rev_language =3D=3D $g_lang + if( mysql_num_rows($query_content) =3D=3D 2 ) + { + if( $result_content['rev_language'] =3D=3D $roscms_standard_language ) + { + $result_content =3D mysql_fetch_assoc($query_content); + } + } + =09 // preview-edit-mode if ($RosCMS_GET_d_value4 =3D=3D "edit" && $result_content['data_acl'] =3D= =3D "default" && $g_insert_match_type !=3D "script") { $RosCMS_result_content_temp =3D "