mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-10 02:33:02 +02:00
Fix some sql issues :
- permalink that use if() syntax - add tables themes for other database engines that mysql git-svn-id: http://piwigo.org/svn/trunk@5192 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -98,8 +98,8 @@ elseif ( isset($_GET['delete_permanent']) and !is_adviser() )
|
||||
DELETE FROM '.OLD_PERMALINKS_TABLE.'
|
||||
WHERE permalink="'.$_GET['delete_permanent'].'"
|
||||
LIMIT 1';
|
||||
pwg_query($query);
|
||||
if (pwg_db_affected_rows()==0)
|
||||
$result = pwg_query($query);
|
||||
if (pwg_db_changes($result)==0)
|
||||
array_push($page['errors'], l10n('Cannot delete the old permalink !'));
|
||||
}
|
||||
|
||||
@@ -108,8 +108,8 @@ $template->set_filename('permalinks', 'permalinks.tpl' );
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
id,
|
||||
'.pwg_db_concat(array('id', '\' - \'', 'name', 'IF(permalink IS NULL, \'\', \' √\')')).' AS name,
|
||||
id, permalink,
|
||||
'.pwg_db_concat(array('id', '\' - \'', 'name')).' AS name,
|
||||
uppercats, global_rank
|
||||
FROM '.CATEGORIES_TABLE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user