summaryrefslogtreecommitdiffstats
path: root/core/ajax
diff options
context:
space:
mode:
Diffstat (limited to 'core/ajax')
-rw-r--r--core/ajax/preview.php2
-rw-r--r--core/ajax/share.php4
2 files changed, 5 insertions, 1 deletions
diff --git a/core/ajax/preview.php b/core/ajax/preview.php
index af0f0493f4c..a1267d6f5cf 100644
--- a/core/ajax/preview.php
+++ b/core/ajax/preview.php
@@ -7,7 +7,7 @@
*/
\OC_Util::checkLoggedIn();
-$file = array_key_exists('file', $_GET) ? (string) urldecode($_GET['file']) : '';
+$file = array_key_exists('file', $_GET) ? (string) $_GET['file'] : '';
$maxX = array_key_exists('x', $_GET) ? (int) $_GET['x'] : '36';
$maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : '36';
$scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true;
diff --git a/core/ajax/share.php b/core/ajax/share.php
index 8b48effb458..c251f8e7bae 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -354,6 +354,10 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
break;
}
}
+ $sorter = new \OC\Share\SearchResultSorter($_GET['search'],
+ 'label',
+ new \OC\Log());
+ usort($shareWith, array($sorter, 'sort'));
OC_JSON::success(array('data' => $shareWith));
}
break;