plugins/SpecialPageFuncs.php
changeset 1199 8d85b52ac9b6
parent 1139 5d988bd8fa46
child 1208 438f36013432
equal deleted inserted replaced
1198:3ec9ac297045 1199:8d85b52ac9b6
   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