Skip to content

Commit

Permalink
Poweradmin version moved to special class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Edmondas Girkantas committed Mar 13, 2016
1 parent 88accc2 commit 23f1df4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 37 deletions.
6 changes: 4 additions & 2 deletions inc/footer.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
* @copyright 2010-2014 Poweradmin Development Team
* @license http://opensource.org/licenses/GPL-3.0 GPL
*/
include_once('version.inc.php');
require_once dirname(__DIR__) . '/vendor/autoload.php';

$VERSION = Poweradmin\Version::VERSION;

global $db;
if (is_object($db)) {
Expand All @@ -39,7 +41,7 @@
<div class="footer">
<a href="http://www.poweradmin.org/">a complete(r) <strong>poweradmin</strong><?php
if (isset($_SESSION["userid"])) {
echo " v $VERSION";
echo " v$VERSION";
}
?></a> - <a href="http://www.poweradmin.org/credits.html">credits</a>
</div>
Expand Down
32 changes: 0 additions & 32 deletions inc/version.inc.php

This file was deleted.

5 changes: 2 additions & 3 deletions install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
$language = 'en_EN';
}

$step = isset($_POST['step']) || is_numeric($_POST['step']) ? $_POST['step'] : 1;
$step = isset($_POST['step']) && is_numeric($_POST['step']) ? $_POST['step'] : 1;

$loader = new Twig_Loader_Filesystem('templates');
$twig = new Twig_Environment($loader);
Expand Down Expand Up @@ -326,7 +326,6 @@
break;
}

require_once '../inc/version.inc.php';
echo $twig->render('footer.html', array('version' => $VERSION));
echo $twig->render('footer.html', array('version' => Poweradmin\Version::VERSION));


1 change: 1 addition & 0 deletions vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

return array(
'Poweradmin\\Password' => $vendorDir . '/poweradmin/Password.php',
'Poweradmin\\Version' => $vendorDir . '/poweradmin/Version.php',
'Twig_Autoloader' => $vendorDir . '/twig/twig/lib/Twig/Autoloader.php',
'Twig_BaseNodeVisitor' => $vendorDir . '/twig/twig/lib/Twig/BaseNodeVisitor.php',
'Twig_CacheInterface' => $vendorDir . '/twig/twig/lib/Twig/CacheInterface.php',
Expand Down
8 changes: 8 additions & 0 deletions vendor/poweradmin/Version.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace Poweradmin;

class Version
{
const VERSION = '2.1.8';
}

0 comments on commit 23f1df4

Please sign in to comment.