mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
code simplification
git-svn-id: http://piwigo.org/svn/trunk@18746 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -361,9 +361,7 @@ function send_derivative($expires)
|
|||||||
include_once(PHPWG_ROOT_PATH.'include/functions_cookie.inc.php');
|
include_once(PHPWG_ROOT_PATH.'include/functions_cookie.inc.php');
|
||||||
include_once(PHPWG_ROOT_PATH.'include/functions_url.inc.php');
|
include_once(PHPWG_ROOT_PATH.'include/functions_url.inc.php');
|
||||||
|
|
||||||
$response = new json_response();
|
echo json_encode( array( 'url'=>embellish_url(get_absolute_root_url().$page['derivative_path']) ) );
|
||||||
$response->url = embellish_url(get_absolute_root_url().$page['derivative_path']);
|
|
||||||
echo json_encode($response);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$fp = fopen($page['derivative_path'], 'rb');
|
$fp = fopen($page['derivative_path'], 'rb');
|
||||||
@@ -390,11 +388,6 @@ function send_derivative($expires)
|
|||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
class json_response
|
|
||||||
{
|
|
||||||
var $url;
|
|
||||||
}
|
|
||||||
|
|
||||||
$page=array();
|
$page=array();
|
||||||
$begin = $step = microtime(true);
|
$begin = $step = microtime(true);
|
||||||
$timing=array();
|
$timing=array();
|
||||||
|
|||||||
Reference in New Issue
Block a user