Skip to content

Commit

Permalink
prepare for next release
Browse files Browse the repository at this point in the history
  • Loading branch information
shi-yang committed Jan 22, 2017
1 parent 4d0bfbe commit f632553
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion backend/views/site/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<tbody>
<tr>
<td>iiSNS version</td>
<td><?= Yii::$app->setting->get('version') ?></td>
<td><?= Yii::$app->setting->getVersion() ?></td>
</tr>
<tr>
<td>The operating system</td>
Expand Down
9 changes: 9 additions & 0 deletions common/components/Setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,13 @@ public function getData()
$settings = Yii::$app->db->createCommand("SELECT * FROM {{%setting}}")->queryAll();
return \yii\helpers\ArrayHelper::map($settings, 'key', 'value');
}

/**
* Returns a string representing the current version of the iisns.
* @return string the version of iisns
*/
public static function getVersion()
{
return '0.6.0';
}
}
5 changes: 2 additions & 3 deletions frontend/themes/basic/site/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@
<h1><?= Yii::t('app', 'Everyone is an artist') ?></h1>
<p class="lead">I hope you like it.</p>
<p>
<a class="btn btn-lg btn-success" href="https://github.com/shi-yang/iisns/archive/v<?= Yii::$app->setting->get('version') ?>.zip">
<a class="btn btn-lg btn-success" href="https://github.com/shi-yang/iisns/archive/v<?= Yii::$app->setting->getVersion() ?>.zip">
<span class="glyphicon glyphicon-download-alt"></span> <?= Yii::t('app', 'Download Source') ?>
</a>
</p>
<p id="version">
Version <?= Yii::$app->setting->get('version') ?> Alpha &nbsp;&nbsp;·&nbsp;&nbsp;
Version <?= Yii::$app->setting->getVersion() ?> Alpha &nbsp;&nbsp;·&nbsp;&nbsp;
<a href="https://github.com/shi-yang/iisns" target="_blank">
GitHub Project</a> &nbsp;&nbsp;·&nbsp;&nbsp;
Created by <a href="http://www.iisns.com/shiyang" target="_blank">Shiyang</a>
Expand Down Expand Up @@ -307,7 +307,6 @@
<!-- /END THE FEATURETTES -->
</div><!-- /.container -->


</div>
<footer class="footer">
<div class="container">
Expand Down
2 changes: 0 additions & 2 deletions install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use yii\base\Security;

$sqlFile = 'data.sql';
$iisnsVersion = '2.1.3';

header('Content-Type: text/html; charset=utf-8');
$PHP_SELF = addslashes(htmlspecialchars($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']));
Expand Down Expand Up @@ -265,7 +264,6 @@ function writable($var)
('siteName', '{$siteName}'),
('siteTitle', '{$siteTitle}'),
('siteDescription', '{$siteDescription}'),
('version', '" . $iisnsVersion . "');
")->execute();
$db->createCommand("
INSERT INTO `pre_user_data` (`user_id`) VALUES
Expand Down

0 comments on commit f632553

Please sign in to comment.