From 4c461f36b167641fd7e0182d8c2a88f578c14e58 Mon Sep 17 00:00:00 2001 From: nikrou Date: Fri, 19 Mar 2010 19:39:15 +0000 Subject: 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 --- admin/permalinks.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'admin/permalinks.php') diff --git a/admin/permalinks.php b/admin/permalinks.php index 342bf44d5..f12dbc7d0 100644 --- a/admin/permalinks.php +++ b/admin/permalinks.php @@ -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; -- cgit v1.2.3