Merge "[FileBackend] Made it easy to use registed file backend config in multi-write...
[lhc/web/wiklou.git] / includes / api / ApiQueryAllImages.php
index 60a05a7..87e7024 100644 (file)
@@ -137,8 +137,8 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase {
 
                $limit = $params['limit'];
                $this->addOption( 'LIMIT', $limit + 1 );
-               $this->addOption( 'ORDER BY', 'img_name' .
-                                               ( $params['dir'] == 'descending' ? ' DESC' : '' ) );
+               $sort = ( $params['dir'] == 'descending' ? ' DESC' : '' );
+               $this->addOption( 'ORDER BY', 'img_name' . $sort );
 
                $res = $this->select( __METHOD__ );