Fix update page

This commit is contained in:
Danang Probo Sayekti 2015-07-10 14:02:21 +07:00
commit d702e982de
4 changed files with 4 additions and 2 deletions

View file

@ -12,7 +12,7 @@ $updater = new HubUpdater(array(
if ($updater->able()) { if ($updater->able()) {
$info = $updater->getNewestInfo(); $info = $updater->getNewestInfo();
echo '<h3>Update Available</h3>'; echo '<h3>Update Available</h3>';
echo '<p><a href="' . $base . 'admin/update/now/' . $CSRF . '" alt="' . $info['name'] . '">Update to ' . $info['tag_name'] . '</a></p>'; echo '<p><a href="' . site_url() . 'admin/update/now/' . $CSRF . '" alt="' . $info['name'] . '">Update to ' . $info['tag_name'] . '</a></p>';
} else { } else {
echo '<h3>No Available Update</h3>'; echo '<h3>No Available Update</h3>';
echo '<p>You are using the latest HTMLy version.</p>'; echo '<p>You are using the latest HTMLy version.</p>';

View file

@ -1321,6 +1321,8 @@ get('/admin/update/now/:csrf', function ($CSRF) {
render('updated-to', array( render('updated-to', array(
'head_contents' => head_contents('Updated - ' . blog_title(), blog_description(), site_url()), 'head_contents' => head_contents('Updated - ' . blog_title(), blog_description(), site_url()),
'info' => $updater->getCurrentInfo(), 'info' => $updater->getCurrentInfo(),
'bodyclass' => 'updatepage',
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; Update HTMLy'
)); ));
} else { } else {
$login = site_url() . 'login'; $login = site_url() . 'login';

View file

@ -1,5 +1,4 @@
<?php <?php
$config_file = 'config/config.ini';
require 'system/vendor/autoload.php'; require 'system/vendor/autoload.php';
require 'system/htmly.php'; require 'system/htmly.php';

View file

@ -1,5 +1,6 @@
<?php <?php
$config_file = 'config/config.ini';
config('source', $config_file); config('source', $config_file);
$updater = new Kanti\HubUpdater("danpros/htmly"); $updater = new Kanti\HubUpdater("danpros/htmly");