don't urldecode get var, php does this automatically
This commit is contained in:
parent
299a8285bd
commit
c5742520e1
3 changed files with 4 additions and 3 deletions
|
@ -11,7 +11,7 @@ if(!\OC_App::isEnabled('files_sharing')){
|
|||
|
||||
\OC_User::setIncognitoMode(true);
|
||||
|
||||
$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;
|
||||
|
|
|
@ -11,7 +11,7 @@ if(!\OC_App::isEnabled('files_trashbin')){
|
|||
exit;
|
||||
}
|
||||
|
||||
$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'] : '44';
|
||||
$maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : '44';
|
||||
$scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true;
|
||||
|
|
|
@ -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;
|
||||
|
@ -26,6 +26,7 @@ if($maxX === 0 || $maxY === 0) {
|
|||
exit;
|
||||
}
|
||||
|
||||
|
||||
try{
|
||||
$preview = new \OC\Preview(\OC_User::getUser(), 'files');
|
||||
$preview->setFile($file);
|
||||
|
|
Loading…
Reference in a new issue