aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_category.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2008-05-23 10:15:48 +0000
committerrvelices <rv-github@modusoptimus.com>2008-05-23 10:15:48 +0000
commit553727dffacc48e8337c1d141f2a25af359e74b1 (patch)
tree3862effd5384b7c39295ed6690c9ccafd1677e54 /include/functions_category.inc.php
parent9300a7118d82ed3b1dd4359509d6cbcd40a0ab98 (diff)
- merge r2355 from 1.7 to trunk: fix display of menubar related tags in IE7
- optimized sql query in permalinks - remove some unused global variable declarations - fix bug in admin/themeconf.inc.php git-svn-id: http://piwigo.org/svn/trunk@2356 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_category.inc.php')
-rw-r--r--include/functions_category.inc.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index c647d19ef..721cc0038 100644
--- a/include/functions_category.inc.php
+++ b/include/functions_category.inc.php
@@ -365,10 +365,9 @@ function get_cat_id_from_permalinks( $permalinks, &$idx )
$in .= '"'.$permalink.'"';
}
$query ='
-SELECT c.id, op.permalink, 1 AS is_old
- FROM '.OLD_PERMALINKS_TABLE.' op INNER JOIN '.CATEGORIES_TABLE.' c
- ON op.cat_id=c.id
- WHERE op.permalink IN ('.$in.')
+SELECT cat_id AS id, permalink, 1 AS is_old
+ FROM '.OLD_PERMALINKS_TABLE.'
+ WHERE permalink IN ('.$in.')
UNION
SELECT id, permalink, 0 AS is_old
FROM '.CATEGORIES_TABLE.'