Browse Source

[TASK] integrated new HubUpdater

pull/123/head
Kanti 11 years ago
parent
commit
5706b93cf1
3 changed files with 6 additions and 10 deletions
  1. +3
    -5
      system/admin/views/updated-to.html.php
  2. +1
    -1
      system/htmly.php
  3. +2
    -4
      system/includes/functions.php

+ 3
- 5
system/admin/views/updated-to.html.php View File

@ -1,5 +1,3 @@
<?php
echo $updater->printOne();
?>
<h3>Updated to<h3>
<h2>[<?php echo $info['tag_name'];?>] <?php echo $info['name']; ?></h2>
<p><?php echo $info['body'];?></p>

+ 1
- 1
system/htmly.php View File

@ -1226,7 +1226,7 @@ get('/admin/update/now/:csrf', function ($CSRF) {
config('views.root', 'system/admin/views'); config('views.root', 'system/admin/views');
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()),
'updater' => $updater,
'info' => $updater->getCurrentInfo(),
)); ));
} else { } else {
$login = site_url() . 'login'; $login = site_url() . 'login';


+ 2
- 4
system/includes/functions.php View File

@ -1,8 +1,5 @@
<?php <?php
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
use \Michelf\MarkdownExtra; use \Michelf\MarkdownExtra;
use \Suin\RSSWriter\Feed; use \Suin\RSSWriter\Feed;
use \Suin\RSSWriter\Channel; use \Suin\RSSWriter\Channel;
@ -1667,7 +1664,8 @@ EOF;
echo '<li><a href="' . $base . 'admin/backup">Backup</a></li>'; echo '<li><a href="' . $base . 'admin/backup">Backup</a></li>';
echo '<li><a href="' . $base . 'admin/clear-cache">Clear cache</a></li>'; echo '<li><a href="' . $base . 'admin/clear-cache">Clear cache</a></li>';
if ($updater->able()) { if ($updater->able()) {
echo '<li><a href="' . $base . 'admin/update/now/' . $CSRF . '">Update to ' . $updater->getName() . '</a></li>';
$info = $updater->getNewestInfo();
echo '<li><a href="' . $base . 'admin/update/now/' . $CSRF . '">Update to ' . $info['tag_name'] . '</a></li>';
} }
echo '<li><a href="' . $base . 'logout">Logout</a></li>'; echo '<li><a href="' . $base . 'logout">Logout</a></li>';


Loading…
Cancel
Save