aboutsummaryrefslogtreecommitdiffstats
path: root/include
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
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 '')
-rw-r--r--include/functions_category.inc.php7
-rw-r--r--include/ws_functions.inc.php2
-rw-r--r--include/ws_protocols/rest_encoder.php1
3 files changed, 4 insertions, 6 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.'
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index 52456b799..2488fd0bf 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -865,7 +865,7 @@ function ws_session_logout($params, &$service)
function ws_session_getStatus($params, &$service)
{
- global $user, $lang_info;
+ global $user;
$res = array();
$res['username'] = is_a_guest() ? 'guest' : $user['username'];
foreach ( array('status', 'template', 'theme', 'language') as $k )
diff --git a/include/ws_protocols/rest_encoder.php b/include/ws_protocols/rest_encoder.php
index ab8ead344..e057c6427 100644
--- a/include/ws_protocols/rest_encoder.php
+++ b/include/ws_protocols/rest_encoder.php
@@ -152,7 +152,6 @@ class PwgRestEncoder extends PwgResponseEncoder
{
function encodeResponse($response)
{
- global $lang_info;
$respClass = strtolower( get_class($response) );
if ($respClass=='pwgerror')
{