moduleupdates v1.2
-Fixed a bug where it was showing G3CC after a DNE -Added the installed module version information -Added alert for when a new module is on the system but is not yet installed -Added alert for when an installed module is newer than the one on the system -Added version information on the Settings page to permit incremental update verification
This commit is contained in:
parent
3c907bb19c
commit
b95ba26e98
@ -47,16 +47,24 @@ class Admin_Moduleupdates_Controller extends Admin_Controller {
|
||||
|
||||
foreach (module::available() as $this_module_name => $module_info) {
|
||||
|
||||
$remote_version = '';
|
||||
$remote_server = '';
|
||||
|
||||
list ($remote_version, $remote_server) = $this->get_remote_module_version($this_module_name);
|
||||
|
||||
$font_color = "black";
|
||||
if ($remote_version == "DNE") {
|
||||
$font_color = "blue";
|
||||
} else if ($remote_version < $module_info->code_version) {
|
||||
} else if ($module_info->version != '' and $module_info->code_version < $module_info->version) {
|
||||
$font_color = "pink";
|
||||
} else if ($module_info->version != '' and $module_info->code_version > $module_info->version) {
|
||||
$font_color = "orange";
|
||||
} else if ($remote_version < $module_info->code_version or ($module_info->version != '' and $remote_version < $module_info->version)) {
|
||||
$font_color = "green";
|
||||
} else if ($remote_version > $module_info->code_version) {
|
||||
} else if ($remote_version > $module_info->code_version or ($module_info->version != '' and $remote_version > $module_info->version)) {
|
||||
$font_color = "red";
|
||||
}
|
||||
|
||||
$all_modules->$this_module_name = array ("name" => $module_info->name, "locked" => $module_info->locked,
|
||||
"code_version" => $module_info->code_version, "active" => $module_info->active,
|
||||
"version" => $module_info->version,"description" => $module_info->description,
|
||||
@ -91,7 +99,9 @@ class Admin_Moduleupdates_Controller extends Admin_Controller {
|
||||
|
||||
try {
|
||||
$file = fopen ("http://github.com/gallery/gallery3/raw/master/modules/".$module_name."/module.info", "r");
|
||||
$server = '(G3)';
|
||||
if ($file != null) {
|
||||
$server = '(G3)';
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
//echo 'Message: ' .$e->getMessage() . '<br>';
|
||||
@ -100,7 +110,9 @@ class Admin_Moduleupdates_Controller extends Admin_Controller {
|
||||
if ($file == null) {
|
||||
try {
|
||||
$file = fopen ("http://github.com/gallery/gallery3-contrib/raw/master/modules/".$module_name."/module.info", "r");
|
||||
$server = '(G3CC)';
|
||||
if ($file != null) {
|
||||
$server = '(G3CC)';
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
//echo 'Message: ' .$e->getMessage() . '<br>';
|
||||
|
@ -1,11 +1,13 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
|
||||
<div id="g-admin-moduleupdates" class="g-block">
|
||||
<h1> <?= t("Module Updates") ?> </h1>
|
||||
<h1> <?= t("Module Updates v1.2") ?> </h1>
|
||||
<p>
|
||||
<?= t("Compares your installed module version against the ones stored in the GitHub.<br><br>") ?>
|
||||
<?= t("<font color=red>Red = Out of Date</font><br>") ?>
|
||||
<?= t("<font color=green>Green = Your version is newer</font><br>") ?>
|
||||
<?= t("<font color=red>Red = Your version is older than the GitHub</font><br>") ?>
|
||||
<?= t("<font color=green>Green = Your version is newer than the GitHub</font><br>") ?>
|
||||
<?= t("<font color=orange>Orange = Your file version is newer than the installed version</font><br>") ?>
|
||||
<?= t("<font color=pink>Pink = Your installed version is newer than file version</font><br>") ?>
|
||||
<?= t("<font color=blue>Blue = Does Not Exist/No information available</font><br>") ?>
|
||||
</p>
|
||||
|
||||
@ -17,14 +19,14 @@
|
||||
<table>
|
||||
<tr>
|
||||
<th> <?= t("Module") ?> </th>
|
||||
<th> <?= t("Your Version") ?> </th>
|
||||
<th> <?= t("Your Version<br>[File/Installed]") ?> </th>
|
||||
<th> <?= t("Remote Version") ?> </th>
|
||||
<th> <?= t("Description") ?> </th>
|
||||
</tr>
|
||||
<? foreach ($vars as $module_name): ?>
|
||||
<tr class="<?= text::alternate("g-odd", "g-even") ?>">
|
||||
<td> <? echo "<font color=".$module_name['font_color'].">"; ?> <?= $module_name['name'] ?> </font> </td>
|
||||
<td> <? echo "<font color=".$module_name['font_color'].">"; ?> <?= $module_name['code_version'] ?> </font> </td>
|
||||
<td> <? echo "<font color=".$module_name['font_color'].">"; ?> <?= $module_name['code_version'] ?><? if ($module_name['version'] != '') echo "/".$module_name['version']; ?> </font> </td>
|
||||
<td> <? echo "<font color=".$module_name['font_color'].">"; ?> <?= $module_name['remote_version'] ?> <?= $module_name['remote_server'] ?> </font> </td>
|
||||
<td> <? echo "<font color=".$module_name['font_color'].">"; ?> <?= $module_name['description'] ?> </font> </td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user