1
0

Fix for GalleryModules 3.1 version paths and clarified verbiage.

This commit is contained in:
brentil 2011-01-05 20:54:37 -05:00
parent ad0bba3ac3
commit 14cf53f706
4 changed files with 70 additions and 52 deletions

View File

@ -123,23 +123,26 @@ class Admin_Moduleupdates_Controller extends Admin_Controller {
if (is_numeric($core_version)) {
if($core_version > $module_info->version) {
//https://github.com/gallery/gallery3/tree/master/modules/recaptcha
//"http://github.com/gallery/gallery3/tree/master/modules/".$this_module_name
$core_dlink = "http://github.com/gallery/gallery3/tree/master/modules/".$this_module_name;
}
}
if (is_numeric($contrib_version)) {
if($contrib_version > $module_info->version) {
//https://github.com/gallery/gallery3-contrib/tree/master/3.0/modules/moduleupdates
//"http://github.com/gallery/gallery3-contrib/tree/master/". substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")) ."/modules/".$this_module_name
$contrib_dlink = "http://github.com/gallery/gallery3-contrib/tree/master/". substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")) ."/modules/".$this_module_name;
$contrib_dlink = "http://github.com/gallery/gallery3-contrib/tree/master/".
substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")) ."/modules/".$this_module_name;
}
}
if (is_numeric($gh_version)) {
if($gh_version > $module_info->version) {
$gh_dlink = "http://www.gallerymodules.com/update/".$this_module_name;
$this_gm_repo = str_replace(".","",substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")));
if($this_gm_repo == "30"){
$gh_dlink = "http://www.gallerymodules.com/update/".$this_module_name;
} else {
$gh_dlink = "http://www.gallerymodules.com/update".this_gm_repo."/".$this_module_name;
}
}
}
@ -248,7 +251,8 @@ class Admin_Moduleupdates_Controller extends Admin_Controller {
//Check the Gallery3 Community Contributions GitHub
if ($file == null) {
try {
$file = fopen ("http://github.com/gallery/gallery3-contrib/raw/master/". substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")) ."/modules/".$module_name."/module.info", "r");
$file = fopen ("http://github.com/gallery/gallery3-contrib/raw/master/".
substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," "))."/modules/".$module_name."/module.info", "r");
if ($file != null) {
$server = '(GCC)';
}
@ -274,7 +278,12 @@ class Admin_Moduleupdates_Controller extends Admin_Controller {
//Check GalleryModules.com
if ($file == null) {
try {
$file = fopen ("http://www.gallerymodules.com/m/".$module_name, "r");
$this_gm_repo = str_replace(".","",substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")));
if($this_gm_repo == "30"){
$file = fopen ("http://www.gallerymodules.com/m/".$module_name, "r");
} else {
$file = fopen ("http://www.gallerymodules.com/".this_gm_repo."m/".$module_name, "r");
}
if ($file != null) {
$server = '(GH)';
}

View File

@ -3,7 +3,7 @@
<div id="g-admin-moduleupdates" class="g-block">
<h1> <?= t("Module Updates v5.0") ?> </h1>
<?= t("Compares your installed module version against the ones stored in the GitHub.") ?>
<?= t("Compares your installed module version against the ones stored in the GitHub and GalleryModules.") ?>
<div class="g-block-content">
@ -24,35 +24,35 @@
<br>
<ul id="g-action-status" class="g-message-block">
<li class="g-warning"><?= t("Versions are compared from GitHub for Gallery, Gallery Community Contributions, and GalleryModules.com. Versions downloaded from the forums will not be shown.") ?></li>
<li class="g-warning"><?= t("Versions are compared from GitHub for Gallery Core (GC), Gallery Community Contributions (GCC), and GalleryModules.com (GM). Versions downloaded from the forums will not be shown.") ?></li>
</ul>
<table>
<tr>
<th> <?= t("Module") ?> </th>
<th> <?= t("Local /<br>Installed") ?> </th>
<th width=50> <?= t("Core") ?> </th>
<th width=50> <?= t("Contrib") ?> </th>
<th width=85> <?= t("GM") ?> </th>
<th> <?= t("Description") ?> </th>
<th> <?= t("Module") ?> </th>
<th><center> <?= t("Local /<br>Installed") ?> </center></th>
<th width=50><center> <?= t("GC") ?> </center></th>
<th width=50><center> <?= t("GCC") ?> </center></th>
<th width=85><center> <?= t("GM") ?> </center></th>
<th> <?= t("Description") ?> </th>
</tr>
<? foreach ($vars as $module_name): ?>
<tr class="<?= text::alternate("g-odd", "g-even") ?>">
<td> <?= t($module_name['name']) ?> </td>
<td> <? echo "<font color=".$module_name['font_color_local'].">"; ?> <? if($module_name['font_color_local'] != "black"){ echo "<b><u>*"; } ?> <? if (is_numeric($module_name['code_version'])) echo $module_name['code_version']; ?><? if (is_numeric($module_name['version'])) echo " / ".$module_name['version']; ?> <? if($module_name['font_color_local'] != "black"){ echo "*</b></u>"; } ?> </td>
<td> <? echo "<font color=".$module_name['font_color_core'].">"; ?> <? if($module_name['font_color_core'] != "black" and $module_name['font_color_core'] != "" ){ echo "<b><u>*"; } ?> <? if(is_numeric($module_name['core_version'])) if($module_name['core_version'] > $module_name['code_version']) { echo "<a href=\"".$module_name['core_dlink']."\" target=\"_blank\">".$module_name['core_version']."</a>";} else { echo $module_name['core_version']; } ?> <? if($module_name['font_color_core'] != "black"){ echo "*</b></u>"; } ?> </font> </td>
<td> <? echo "<font color=".$module_name['font_color_contrib'].">"; ?> <? if($module_name['font_color_contrib'] != "black" and $module_name['font_color_contrib'] != "" ){ echo "<b><u>*"; } ?> <? if(is_numeric($module_name['contrib_version'])) if($module_name['contrib_version'] > $module_name['version'] or $module_name['core_version'] > $module_name['code_version']) { echo "<a href=\"".$module_name['contrib_dlink']."\" target=\"_blank\">".$module_name['contrib_version']."</a>";} else { echo $module_name['contrib_version']; } ?> <? if($module_name['font_color_contrib'] != "black"){ echo "*</b></u>"; } ?> </font> </td>
<td> <? echo "<font color=".$module_name['font_color_gh'].">"; ?> <? if($module_name['font_color_gh'] != "black" and $module_name['font_color_gh'] != "" ){ echo "<b><u>*"; } ?> <? if(is_numeric($module_name['gh_version'])) if($module_name['gh_version'] > $module_name['version'] or $module_name['core_version'] > $module_name['code_version']) { echo "<a href=\"".$module_name['gh_dlink']."\" target=\"_blank\">".$module_name['gh_version']."</a>";} else { echo $module_name['gh_version']; } ?> <? if($module_name['font_color_gh'] != "black"){ echo "*</b></u>"; } ?> </font> </td>
<td align=center> <? echo "<font color=".$module_name['font_color_local'].">"; ?> <? if($module_name['font_color_local'] != "black"){ echo "<b><u>*"; } ?> <? if (is_numeric($module_name['code_version'])) echo $module_name['code_version']; ?><? if (is_numeric($module_name['version'])) echo " / ".$module_name['version']; ?> <? if($module_name['font_color_local'] != "black"){ echo "*</b></u>"; } ?> </td>
<td align=center> <? echo "<font color=".$module_name['font_color_core'].">"; ?> <? if($module_name['font_color_core'] != "black" and $module_name['font_color_core'] != "" ){ echo "<b><u>*"; } ?> <? if(is_numeric($module_name['core_version'])) if($module_name['core_version'] > $module_name['code_version']) { echo "<a href=\"".$module_name['core_dlink']."\" target=\"_blank\">".$module_name['core_version']."</a>";} else { echo $module_name['core_version']; } ?> <? if($module_name['font_color_core'] != "black"){ echo "*</b></u>"; } ?> </font> </td>
<td align=center> <? echo "<font color=".$module_name['font_color_contrib'].">"; ?> <? if($module_name['font_color_contrib'] != "black" and $module_name['font_color_contrib'] != "" ){ echo "<b><u>*"; } ?> <? if(is_numeric($module_name['contrib_version'])) if($module_name['contrib_version'] > $module_name['version'] or $module_name['core_version'] > $module_name['code_version']) { echo "<a href=\"".$module_name['contrib_dlink']."\" target=\"_blank\">".$module_name['contrib_version']."</a>";} else { echo $module_name['contrib_version']; } ?> <? if($module_name['font_color_contrib'] != "black"){ echo "*</b></u>"; } ?> </font> </td>
<td align=center> <? echo "<font color=".$module_name['font_color_gh'].">"; ?> <? if($module_name['font_color_gh'] != "black" and $module_name['font_color_gh'] != "" ){ echo "<b><u>*"; } ?> <? if(is_numeric($module_name['gh_version'])) if($module_name['gh_version'] > $module_name['version'] or $module_name['core_version'] > $module_name['code_version']) { echo "<a href=\"".$module_name['gh_dlink']."\" target=\"_blank\">".$module_name['gh_version']."</a>";} else { echo $module_name['gh_version']; } ?> <? if($module_name['font_color_gh'] != "black"){ echo "*</b></u>"; } ?> </font> </td>
<td> <?= t($module_name['description']) ?> </td>
</tr>
<? endforeach ?>
<tr>
<th> <?= t("Module") ?> </th>
<th> <?= t("Local /<br>Installed") ?> </th>
<th> <?= t("Core") ?> </th>
<th> <?= t("Contrib") ?> </th>
<th> <?= t("GM") ?> </th>
<th> <?= t("Description") ?> </th>
<th> <?= t("Module") ?> </th>
<th><center> <?= t("Local /<br>Installed") ?> </center></th>
<th width=50><center> <?= t("GC") ?> </center></th>
<th width=50><center> <?= t("GCC") ?> </center></th>
<th width=85><center> <?= t("GM") ?> </center></th>
<th> <?= t("Description") ?> </th>
</tr>
</table>
</div>

View File

@ -123,23 +123,26 @@ class Admin_Moduleupdates_Controller extends Admin_Controller {
if (is_numeric($core_version)) {
if($core_version > $module_info->version) {
//https://github.com/gallery/gallery3/tree/master/modules/recaptcha
//"http://github.com/gallery/gallery3/tree/master/modules/".$this_module_name
$core_dlink = "http://github.com/gallery/gallery3/tree/master/modules/".$this_module_name;
}
}
if (is_numeric($contrib_version)) {
if($contrib_version > $module_info->version) {
//https://github.com/gallery/gallery3-contrib/tree/master/3.0/modules/moduleupdates
//"http://github.com/gallery/gallery3-contrib/tree/master/". substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")) ."/modules/".$this_module_name
$contrib_dlink = "http://github.com/gallery/gallery3-contrib/tree/master/". substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")) ."/modules/".$this_module_name;
$contrib_dlink = "http://github.com/gallery/gallery3-contrib/tree/master/".
substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")) ."/modules/".$this_module_name;
}
}
if (is_numeric($gh_version)) {
if($gh_version > $module_info->version) {
$gh_dlink = "http://www.gallerymodules.com/update/".$this_module_name;
$this_gm_repo = str_replace(".","",substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")));
if($this_gm_repo == "30"){
$gh_dlink = "http://www.gallerymodules.com/update/".$this_module_name;
} else {
$gh_dlink = "http://www.gallerymodules.com/update".this_gm_repo."/".$this_module_name;
}
}
}
@ -248,7 +251,8 @@ class Admin_Moduleupdates_Controller extends Admin_Controller {
//Check the Gallery3 Community Contributions GitHub
if ($file == null) {
try {
$file = fopen ("http://github.com/gallery/gallery3-contrib/raw/master/". substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")) ."/modules/".$module_name."/module.info", "r");
$file = fopen ("http://github.com/gallery/gallery3-contrib/raw/master/".
substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," "))."/modules/".$module_name."/module.info", "r");
if ($file != null) {
$server = '(GCC)';
}
@ -274,7 +278,12 @@ class Admin_Moduleupdates_Controller extends Admin_Controller {
//Check GalleryModules.com
if ($file == null) {
try {
$file = fopen ("http://www.gallerymodules.com/m/".$module_name, "r");
$this_gm_repo = str_replace(".","",substr_replace(gallery::VERSION,"",strpos(gallery::VERSION," ")));
if($this_gm_repo == "30"){
$file = fopen ("http://www.gallerymodules.com/m/".$module_name, "r");
} else {
$file = fopen ("http://www.gallerymodules.com/".this_gm_repo."m/".$module_name, "r");
}
if ($file != null) {
$server = '(GH)';
}

View File

@ -3,7 +3,7 @@
<div id="g-admin-moduleupdates" class="g-block">
<h1> <?= t("Module Updates v5.0") ?> </h1>
<?= t("Compares your installed module version against the ones stored in the GitHub.") ?>
<?= t("Compares your installed module version against the ones stored in the GitHub and GalleryModules.") ?>
<div class="g-block-content">
@ -24,35 +24,35 @@
<br>
<ul id="g-action-status" class="g-message-block">
<li class="g-warning"><?= t("Versions are compared from GitHub for Gallery, Gallery Community Contributions, and GalleryModules.com. Versions downloaded from the forums will not be shown.") ?></li>
<li class="g-warning"><?= t("Versions are compared from GitHub for Gallery Core (GC), Gallery Community Contributions (GCC), and GalleryModules.com (GM). Versions downloaded from the forums will not be shown.") ?></li>
</ul>
<table>
<tr>
<th> <?= t("Module") ?> </th>
<th> <?= t("Local /<br>Installed") ?> </th>
<th width=50> <?= t("Core") ?> </th>
<th width=50> <?= t("Contrib") ?> </th>
<th width=85> <?= t("GM") ?> </th>
<th> <?= t("Description") ?> </th>
<th> <?= t("Module") ?> </th>
<th><center> <?= t("Local /<br>Installed") ?> </center></th>
<th width=50><center> <?= t("GC") ?> </center></th>
<th width=50><center> <?= t("GCC") ?> </center></th>
<th width=85><center> <?= t("GM") ?> </center></th>
<th> <?= t("Description") ?> </th>
</tr>
<? foreach ($vars as $module_name): ?>
<tr class="<?= text::alternate("g-odd", "g-even") ?>">
<td> <?= t($module_name['name']) ?> </td>
<td> <? echo "<font color=".$module_name['font_color_local'].">"; ?> <? if($module_name['font_color_local'] != "black"){ echo "<b><u>*"; } ?> <? if (is_numeric($module_name['code_version'])) echo $module_name['code_version']; ?><? if (is_numeric($module_name['version'])) echo " / ".$module_name['version']; ?> <? if($module_name['font_color_local'] != "black"){ echo "*</b></u>"; } ?> </td>
<td> <? echo "<font color=".$module_name['font_color_core'].">"; ?> <? if($module_name['font_color_core'] != "black" and $module_name['font_color_core'] != "" ){ echo "<b><u>*"; } ?> <? if(is_numeric($module_name['core_version'])) if($module_name['core_version'] > $module_name['code_version']) { echo "<a href=\"".$module_name['core_dlink']."\" target=\"_blank\">".$module_name['core_version']."</a>";} else { echo $module_name['core_version']; } ?> <? if($module_name['font_color_core'] != "black"){ echo "*</b></u>"; } ?> </font> </td>
<td> <? echo "<font color=".$module_name['font_color_contrib'].">"; ?> <? if($module_name['font_color_contrib'] != "black" and $module_name['font_color_contrib'] != "" ){ echo "<b><u>*"; } ?> <? if(is_numeric($module_name['contrib_version'])) if($module_name['contrib_version'] > $module_name['version'] or $module_name['core_version'] > $module_name['code_version']) { echo "<a href=\"".$module_name['contrib_dlink']."\" target=\"_blank\">".$module_name['contrib_version']."</a>";} else { echo $module_name['contrib_version']; } ?> <? if($module_name['font_color_contrib'] != "black"){ echo "*</b></u>"; } ?> </font> </td>
<td> <? echo "<font color=".$module_name['font_color_gh'].">"; ?> <? if($module_name['font_color_gh'] != "black" and $module_name['font_color_gh'] != "" ){ echo "<b><u>*"; } ?> <? if(is_numeric($module_name['gh_version'])) if($module_name['gh_version'] > $module_name['version'] or $module_name['core_version'] > $module_name['code_version']) { echo "<a href=\"".$module_name['gh_dlink']."\" target=\"_blank\">".$module_name['gh_version']."</a>";} else { echo $module_name['gh_version']; } ?> <? if($module_name['font_color_gh'] != "black"){ echo "*</b></u>"; } ?> </font> </td>
<td align=center> <? echo "<font color=".$module_name['font_color_local'].">"; ?> <? if($module_name['font_color_local'] != "black"){ echo "<b><u>*"; } ?> <? if (is_numeric($module_name['code_version'])) echo $module_name['code_version']; ?><? if (is_numeric($module_name['version'])) echo " / ".$module_name['version']; ?> <? if($module_name['font_color_local'] != "black"){ echo "*</b></u>"; } ?> </td>
<td align=center> <? echo "<font color=".$module_name['font_color_core'].">"; ?> <? if($module_name['font_color_core'] != "black" and $module_name['font_color_core'] != "" ){ echo "<b><u>*"; } ?> <? if(is_numeric($module_name['core_version'])) if($module_name['core_version'] > $module_name['code_version']) { echo "<a href=\"".$module_name['core_dlink']."\" target=\"_blank\">".$module_name['core_version']."</a>";} else { echo $module_name['core_version']; } ?> <? if($module_name['font_color_core'] != "black"){ echo "*</b></u>"; } ?> </font> </td>
<td align=center> <? echo "<font color=".$module_name['font_color_contrib'].">"; ?> <? if($module_name['font_color_contrib'] != "black" and $module_name['font_color_contrib'] != "" ){ echo "<b><u>*"; } ?> <? if(is_numeric($module_name['contrib_version'])) if($module_name['contrib_version'] > $module_name['version'] or $module_name['core_version'] > $module_name['code_version']) { echo "<a href=\"".$module_name['contrib_dlink']."\" target=\"_blank\">".$module_name['contrib_version']."</a>";} else { echo $module_name['contrib_version']; } ?> <? if($module_name['font_color_contrib'] != "black"){ echo "*</b></u>"; } ?> </font> </td>
<td align=center> <? echo "<font color=".$module_name['font_color_gh'].">"; ?> <? if($module_name['font_color_gh'] != "black" and $module_name['font_color_gh'] != "" ){ echo "<b><u>*"; } ?> <? if(is_numeric($module_name['gh_version'])) if($module_name['gh_version'] > $module_name['version'] or $module_name['core_version'] > $module_name['code_version']) { echo "<a href=\"".$module_name['gh_dlink']."\" target=\"_blank\">".$module_name['gh_version']."</a>";} else { echo $module_name['gh_version']; } ?> <? if($module_name['font_color_gh'] != "black"){ echo "*</b></u>"; } ?> </font> </td>
<td> <?= t($module_name['description']) ?> </td>
</tr>
<? endforeach ?>
<tr>
<th> <?= t("Module") ?> </th>
<th> <?= t("Local /<br>Installed") ?> </th>
<th> <?= t("Core") ?> </th>
<th> <?= t("Contrib") ?> </th>
<th> <?= t("GM") ?> </th>
<th> <?= t("Description") ?> </th>
<th> <?= t("Module") ?> </th>
<th><center> <?= t("Local /<br>Installed") ?> </center></th>
<th width=50><center> <?= t("GC") ?> </center></th>
<th width=50><center> <?= t("GCC") ?> </center></th>
<th width=85><center> <?= t("GM") ?> </center></th>
<th> <?= t("Description") ?> </th>
</tr>
</table>
</div>