plugins/SpecialPageFuncs.php
changeset 1204 eaab1c22e237
parent 1199 8d85b52ac9b6
child 1208 438f36013432
equal deleted inserted replaced
1203:c6587072e4c4 1204:eaab1c22e237
   296       break;
   296       break;
   297   }
   297   }
   298   
   298   
   299   $db->free_result();
   299   $db->free_result();
   300   
   300   
   301   $q = $db->sql_unbuffered_query('SELECT CONCAT("ns=",namespace,";pid=",urlname) AS identifier, name FROM '.table_prefix.'pages WHERE visible!=0 ORDER BY name ASC;');
   301   // This query needs to be generated based on the DBMS
       
   302   $concat_column = ENANO_DBLAYER == 'MYSQL'
       
   303                      ? 'CONCAT("ns=",namespace,";pid=",urlname)'
       
   304                      : "'ns=' || namespace || ';pid=' || urlname";
       
   305   
       
   306   $q = $db->sql_unbuffered_query("SELECT $concat_column AS identifier, name FROM " . table_prefix . "pages WHERE visible != 0 ORDER BY name ASC;");
   302   if ( !$q )
   307   if ( !$q )
   303     $db->_die();
   308     $db->_die();
   304   
   309   
   305   $offset = ( isset($_GET['offset']) ) ? intval($_GET['offset']) : 0;
   310   $offset = ( isset($_GET['offset']) ) ? intval($_GET['offset']) : 0;
   306   
   311