mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 05:01:43 +00:00
check if extension from repository is suitable for current installation
This commit is contained in:
parent
0a3d3ea382
commit
de0213d30e
|
@ -172,10 +172,12 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Bootstrap_Style {
|
||||||
$list = $extmgr->importExtensionList($reposurl);
|
$list = $extmgr->importExtensionList($reposurl);
|
||||||
foreach($list as $e) {
|
foreach($list as $e) {
|
||||||
if($e[0] != '#') {
|
if($e[0] != '#') {
|
||||||
$re = json_decode($e);
|
$re = json_decode($e, true);
|
||||||
$needsupdate = !isset($GLOBALS['EXT_CONF'][$re->name]) || SeedDMS_Extension_Mgr::cmpVersion($re->version, $GLOBALS['EXT_CONF'][$re->name]['version']) > 0;
|
$extmgr->checkExtension($re);
|
||||||
|
$checkmsgs = $extmgr->getErrorMsgs();
|
||||||
|
$needsupdate = !isset($GLOBALS['EXT_CONF'][$re['name']]) || SeedDMS_Extension_Mgr::cmpVersion($re['version'], $GLOBALS['EXT_CONF'][$re['name']]['version']) > 0;
|
||||||
echo "<tr";
|
echo "<tr";
|
||||||
if(isset($GLOBALS['EXT_CONF'][$re->name])) {
|
if(isset($GLOBALS['EXT_CONF'][$re['name']])) {
|
||||||
if($needsupdate)
|
if($needsupdate)
|
||||||
echo " class=\"warning\"";
|
echo " class=\"warning\"";
|
||||||
else
|
else
|
||||||
|
@ -183,13 +185,16 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Bootstrap_Style {
|
||||||
}
|
}
|
||||||
echo ">";
|
echo ">";
|
||||||
echo "<td></td>";
|
echo "<td></td>";
|
||||||
echo "<td>".$re->title."<br /><small>".$re->description."</small></td>";
|
echo "<td>".$re['title']."<br /><small>".$re['description']."</small>";
|
||||||
echo "<td nowrap>".$re->version."<br /><small>".$re->releasedate."</small></td>";
|
if($checkmsgs)
|
||||||
echo "<td nowrap>".$re->author->name."<br /><small>".$re->author->company."</small></td>";
|
echo "<div><img src=\"".$this->getImgPath("attention.gif")."\"> ".implode('<br /><img src="'.$this->getImgPath("attention.gif").'"> ', $checkmsgs)."</div>";
|
||||||
|
echo "</td>";
|
||||||
|
echo "<td nowrap>".$re['version']."<br /><small>".$re['releasedate']."</small></td>";
|
||||||
|
echo "<td nowrap>".$re['author']['name']."<br /><small>".$re['author']['company']."</small></td>";
|
||||||
echo "<td nowrap>";
|
echo "<td nowrap>";
|
||||||
echo "<div class=\"list-action\">";
|
echo "<div class=\"list-action\">";
|
||||||
if($needsupdate)
|
if($needsupdate && !$checkmsgs)
|
||||||
echo "<form style=\"display: inline-block; margin: 0px;\" method=\"post\" action=\"../op/op.ExtensionMgr.php\" id=\"".$extname."-import\">".createHiddenFieldWithKey('extensionmgr')."<input type=\"hidden\" name=\"action\" value=\"import\" /><input type=\"hidden\" name=\"url\" value=\"".$re->filename."\" /><a class=\"import\" data-extname=\"".$extname."\" title=\"".getMLText('import_extension')."\"><i class=\"icon-download\"></i></a></form>";
|
echo "<form style=\"display: inline-block; margin: 0px;\" method=\"post\" action=\"../op/op.ExtensionMgr.php\" id=\"".$extname."-import\">".createHiddenFieldWithKey('extensionmgr')."<input type=\"hidden\" name=\"action\" value=\"import\" /><input type=\"hidden\" name=\"url\" value=\"".$re['filename']."\" /><a class=\"import\" data-extname=\"".$extname."\" title=\"".getMLText('import_extension')."\"><i class=\"icon-download\"></i></a></form>";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user