Browse Source

only enable appcache on the '/new' page

pull/10/head
Aaron Parecki 9 years ago
parent
commit
fd2f8e9bdc
2 changed files with 3 additions and 2 deletions
  1. +2
    -1
      controllers/controllers.php
  2. +1
    -1
      views/layout.php

+ 2
- 1
controllers/controllers.php View File

@ -58,7 +58,8 @@ $app->get('/new', function() use($app) {
'access_token' => $user->access_token, 'access_token' => $user->access_token,
'response_date' => $user->last_micropub_response_date, 'response_date' => $user->last_micropub_response_date,
'location_enabled' => $user->location_enabled, 'location_enabled' => $user->location_enabled,
'default_options' => get_entry_options($user->id)
'default_options' => get_entry_options($user->id),
'enable_appcache' => true
)); ));
$app->response()->body($html); $app->response()->body($html);
} }

+ 1
- 1
views/layout.php View File

@ -1,5 +1,5 @@
<!doctype html> <!doctype html>
<html lang="en" manifest="teacup.appcache">
<html lang="en"<?= property_exists($this, 'enable_appcache') ? ' manifest="teacup.appcache"' : '' ?>>
<head> <head>
<title><?= $this->title ?></title> <title><?= $this->title ?></title>
<meta charset="utf-8"> <meta charset="utf-8">

Loading…
Cancel
Save