diff --git a/modules/moduleupdates/controllers/admin_moduleupdates.php b/modules/moduleupdates/controllers/admin_moduleupdates.php
index fc9d1905..ba812515 100644
--- a/modules/moduleupdates/controllers/admin_moduleupdates.php
+++ b/modules/moduleupdates/controllers/admin_moduleupdates.php
@@ -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() . '
';
@@ -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() . '
';
diff --git a/modules/moduleupdates/views/admin_moduleupdates.html.php b/modules/moduleupdates/views/admin_moduleupdates.html.php
index e4e3f038..8a7c6494 100644
--- a/modules/moduleupdates/views/admin_moduleupdates.html.php
+++ b/modules/moduleupdates/views/admin_moduleupdates.html.php
@@ -1,11 +1,13 @@
= t("Compares your installed module version against the ones stored in the GitHub.
") ?>
- = t("Red = Out of Date
") ?>
- = t("Green = Your version is newer
") ?>
+ = t("Red = Your version is older than the GitHub
") ?>
+ = t("Green = Your version is newer than the GitHub
") ?>
+ = t("Orange = Your file version is newer than the installed version
") ?>
+ = t("Pink = Your installed version is newer than file version
") ?>
= t("Blue = Does Not Exist/No information available
") ?>
= t("Module") ?> | -= t("Your Version") ?> | + = t("Your Version [File/Installed]") ?> |
= t("Remote Version") ?> | = t("Description") ?> |
---|---|---|---|---|
echo ""; ?> = $module_name['name'] ?> | -echo ""; ?> = $module_name['code_version'] ?> | +echo ""; ?> = $module_name['code_version'] ?> if ($module_name['version'] != '') echo "/".$module_name['version']; ?> | echo ""; ?> = $module_name['remote_version'] ?> = $module_name['remote_server'] ?> | echo ""; ?> = $module_name['description'] ?> |