diff options
author | nikrou <nikrou@piwigo.org> | 2010-03-19 19:39:15 +0000 |
---|---|---|
committer | nikrou <nikrou@piwigo.org> | 2010-03-19 19:39:15 +0000 |
commit | 4c461f36b167641fd7e0182d8c2a88f578c14e58 (patch) | |
tree | d44f2b7c8fff005db118f177b8f96a0b7f785246 /admin/permalinks.php | |
parent | 6b296b293d7ac666548ec74cecf827699f912ff7 (diff) |
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
Diffstat (limited to '')
-rw-r--r-- | admin/permalinks.php | 8 |
1 files changed, 4 insertions, 4 deletions
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; |