mirror of
https://github.com/danpros/htmly.git
synced 2026-04-23 14:06:23 +05:30
Fixes and Improvements
This commit is contained in:
parent
ffb46f9981
commit
0ea29cc905
6 changed files with 43 additions and 33 deletions
|
|
@ -12,9 +12,9 @@
|
|||
</tr>
|
||||
<?php
|
||||
global $config_file;
|
||||
$array = [
|
||||
$array = array(
|
||||
"google.wmt" => "hallo",
|
||||
];
|
||||
);
|
||||
if (file_exists($config_file)) {
|
||||
$array = parse_ini_file($config_file, true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,18 +12,22 @@ $updater = new HubUpdater(array(
|
|||
if ($updater->able()) {
|
||||
$info = $updater->getNewestInfo();
|
||||
echo '<h2>Update Available</h2>';
|
||||
echo '<h3>'. $info['name'] .'</h3>';
|
||||
echo '<p>Version: '. $info['tag_name'] .'</p>';
|
||||
echo '<p>Release Title: <strong>'. $info['name'] .'</strong></p>';
|
||||
echo '<p>Version: <strong>'. $info['tag_name'] .'</strong></p>';
|
||||
echo '<h4>Release Notes</h4>';
|
||||
echo '<pre><code>'. $info['body'] .'</code></pre>';
|
||||
echo '<div style="background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;color:#333;display:block;font-size:13px;line-height:1.42857;margin:20px 0;padding:0 1em;word-break:break-all;word-wrap:break-word;">';
|
||||
echo \Michelf\MarkdownExtra::defaultTransform($info['body']);
|
||||
echo '</div>';
|
||||
echo '<p><strong>Important:</strong> Please always backup your files before upgrading to newer version.</p>';
|
||||
echo '<p><a href="' . site_url() . 'admin/update/now/' . $CSRF . '" alt="' . $info['name'] . '">Update to ' . $info['tag_name'] . ' now</a></p>';
|
||||
} else {
|
||||
echo '<h2>Congrats! You have the latest version of HTMLy</h2>';
|
||||
$info = $updater->getCurrentInfo();
|
||||
echo '<p>Release Title: '. $info['name'] .'</p>';
|
||||
echo '<p>Installed Version: '. $info['tag_name'] .'</p>';
|
||||
echo '<p>Release Notes: </p>';
|
||||
echo '<pre><code>'. $info['body'] .'</code></pre>';
|
||||
echo '<p>Release Title: <strong>'. $info['name'] .'</strong></p>';
|
||||
echo '<p>Installed Version: <strong>'. $info['tag_name'] .'</strong></p>';
|
||||
echo '<h4>Release Notes: </h4>';
|
||||
echo '<div style="background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;color:#333;display:block;font-size:13px;line-height:1.42857;margin:20px 0;padding:0 1em;word-break:break-all;word-wrap:break-word;">';
|
||||
echo \Michelf\MarkdownExtra::defaultTransform($info['body']);
|
||||
echo '</div>';
|
||||
echo '<p>Read on <a target="_blank" href="' . $info['html_url'] . '">Github</a>.</p>';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue