aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
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')
{