# HG changeset patch # User Dan # Date 1262703381 18000 # Node ID eaab1c22e2374a12279e5eacc284f81fba2540a8 # Parent c6587072e4c42d5e8ac2f9bd2b47cb4bcef9b799# Parent 8d85b52ac9b69b297984486b358dd7343df64135 Merging scribus and charlie repos diff -r c6587072e4c4 -r eaab1c22e237 plugins/SpecialPageFuncs.php --- a/plugins/SpecialPageFuncs.php Tue Jan 05 09:56:00 2010 -0500 +++ b/plugins/SpecialPageFuncs.php Tue Jan 05 09:56:21 2010 -0500 @@ -298,7 +298,12 @@ $db->free_result(); - $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;'); + // This query needs to be generated based on the DBMS + $concat_column = ENANO_DBLAYER == 'MYSQL' + ? 'CONCAT("ns=",namespace,";pid=",urlname)' + : "'ns=' || namespace || ';pid=' || urlname"; + + $q = $db->sql_unbuffered_query("SELECT $concat_column AS identifier, name FROM " . table_prefix . "pages WHERE visible != 0 ORDER BY name ASC;"); if ( !$q ) $db->_die();