зеркало из https://github.com/mozilla/pjs.git
Fixed problems that were preventing caching in these two files.
This commit is contained in:
Родитель
b680219a3b
Коммит
585c5af6c9
|
@ -7,7 +7,7 @@
|
|||
* @todo make this dynamic based on an SQL field (recommended)
|
||||
*/
|
||||
|
||||
startProcessing('recommended.tpl', null, $compileId, 'nonav');
|
||||
startProcessing('recommended.tpl', $cacheId, $compileId, 'nonav');
|
||||
require_once('includes.php');
|
||||
|
||||
// If app is not set or empty, set it to null for our switch.
|
||||
|
|
|
@ -52,7 +52,7 @@ foreach ($required_vars as $var) {
|
|||
}
|
||||
|
||||
// Determine a cache_id based on params.
|
||||
$cache_id = md5( $sql['os_id'] . implode('',$sql) );
|
||||
$cache_id = $sql['os_id'] . implode('',$sql);
|
||||
|
||||
|
||||
|
||||
|
@ -69,6 +69,7 @@ $tpl->caching = true;
|
|||
$tpl->cache_timeout = 3600;
|
||||
|
||||
if ($tpl->is_cached('update.tpl',$cache_id)) {
|
||||
header("Content-type: text/xml");
|
||||
$tpl->display('update.tpl',$cache_id);
|
||||
exit;
|
||||
}
|
||||
|
@ -112,14 +113,8 @@ if (empty($errors)) {
|
|||
applications.guid AS appguid
|
||||
FROM
|
||||
main
|
||||
INNER JOIN
|
||||
version
|
||||
ON
|
||||
main.id = version.id
|
||||
INNER JOIN
|
||||
applications
|
||||
ON
|
||||
version.appid = applications.appid
|
||||
INNER JOIN version ON main.id = version.id
|
||||
INNER JOIN applications ON version.appid = applications.appid
|
||||
WHERE
|
||||
main.guid = '{$sql['id']}' AND
|
||||
applications.guid = '{$sql['appID']}' AND
|
||||
|
@ -165,7 +160,7 @@ if (empty($errors)) {
|
|||
*/
|
||||
if ($debug!=true) {
|
||||
header("Content-type: text/xml");
|
||||
$tpl->display('update.tpl');
|
||||
$tpl->display('update.tpl',$cache_id);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче