mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Do not activate blacklisted addons
This commit is contained in:
parent
e335aa477e
commit
e0dba3a340
4 changed files with 25 additions and 10 deletions
|
|
@ -46,13 +46,23 @@ class addonAdminModel extends addon
|
|||
$oAutoinstallModel = getModel('autoinstall');
|
||||
foreach($addonList as $key => $addon)
|
||||
{
|
||||
// check blacklist
|
||||
$addonList[$key]->isBlacklisted = Context::isBlacklistedPlugin($addon->addon);
|
||||
|
||||
// get easyinstall remove url
|
||||
$packageSrl = $oAutoinstallModel->getPackageSrlByPath($addon->path);
|
||||
$addonList[$key]->remove_url = $oAutoinstallModel->getRemoveUrlByPackageSrl($packageSrl);
|
||||
|
||||
// get easyinstall need update
|
||||
$package = $oAutoinstallModel->getInstalledPackages($packageSrl);
|
||||
$addonList[$key]->need_update = $package[$packageSrl]->need_update;
|
||||
if($addonList[$key]->isBlacklisted)
|
||||
{
|
||||
$addonList[$key]->need_update = 'N';
|
||||
}
|
||||
else
|
||||
{
|
||||
$package = $oAutoinstallModel->getInstalledPackages($packageSrl);
|
||||
$addonList[$key]->need_update = $package[$packageSrl]->need_update;
|
||||
}
|
||||
|
||||
// get easyinstall update url
|
||||
if($addonList[$key]->need_update == 'Y')
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ class addon extends ModuleObject
|
|||
$oAddonController = getAdminController('addon');
|
||||
$oAddonController->doInsert('autolink', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('blogapi');
|
||||
$oAddonController->doInsert('member_communication', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('member_extra_info', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('mobile', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('resize_image', 0, 'site', 'Y');
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class addonController extends addon
|
|||
$addon_list = $oAddonModel->getInsertedAddons($site_srl, $gtype);
|
||||
foreach($addon_list as $addon => $val)
|
||||
{
|
||||
if($val->addon == "smartphone"
|
||||
if($val->addon == "smartphone" || Context::isBlacklistedPlugin($addon)
|
||||
|| ($type == "pc" && $val->is_used != 'Y')
|
||||
|| ($type == "mobile" && $val->is_used_m != 'Y')
|
||||
|| ($gtype == 'global' && $val->is_fixed != 'Y')
|
||||
|
|
|
|||
|
|
@ -34,23 +34,29 @@
|
|||
<tbody>
|
||||
<tr loop="$addon_list => $addon">
|
||||
<td class="title">
|
||||
<p><strong>{$addon->title}</strong></p>
|
||||
<p><strong style="color:#aaa"|cond="$addon->isBlacklisted">{$addon->title}</strong></p>
|
||||
<p>{$addon->description}</p>
|
||||
<p cond="$addon->need_update == 'Y'" class="update">
|
||||
{$lang->msg_avail_easy_update} <a href="{$addon->update_url}&return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->msg_do_you_like_update}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td>{$addon->version}</td>
|
||||
<td><span style="color:#aaa"|cond="$addon->isBlacklisted">{$addon->version}</span></td>
|
||||
<td class="nowr">
|
||||
<block loop="$addon->author => $author">
|
||||
<a cond="$author->homepage" href="{$author->homepage}" target="_blank">{$author->name}</a>
|
||||
<block cond="!$author->homepage">{$author->name}</block>
|
||||
</block>
|
||||
</td>
|
||||
<td>{$addon->path}</td>
|
||||
<td><a href="{getUrl('act', 'dispAddonAdminSetup', 'selected_addon', $addon->addon_name)}">{$lang->cmd_setup}</a></td>
|
||||
<td><input type="checkbox" name="pc_on[]" title="PC" value="{htmlspecialchars($addon->addon_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" checked="checked"|cond="$addon->activated" /></td>
|
||||
<td><input type="checkbox" name="mobile_on[]" title="Mobile" value="{htmlspecialchars($addon->addon_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" checked="checked"|cond="$addon->mactivated" /></td>
|
||||
<td><span style="color:#aaa"|cond="$addon->isBlacklisted">{$addon->path}</span></td>
|
||||
<td>
|
||||
<!--@if($addon->isBlacklisted)-->
|
||||
<span style="color:#aaa">{$lang->cmd_setup}</span>
|
||||
<!--@else-->
|
||||
<a href="{getUrl('act', 'dispAddonAdminSetup', 'selected_addon', $addon->addon_name)}">{$lang->cmd_setup}</a>
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td><input type="checkbox" name="pc_on[]" title="PC" value="{htmlspecialchars($addon->addon_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" checked="checked"|cond="$addon->activated && !$addon->isBlacklisted" disabled="disabled"|cond="$addon->isBlacklisted" /></td>
|
||||
<td><input type="checkbox" name="mobile_on[]" title="Mobile" value="{htmlspecialchars($addon->addon_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" checked="checked"|cond="$addon->mactivated && !$addon->isBlacklisted" disabled="disabled"|cond="$addon->isBlacklisted" /></td>
|
||||
<td><a cond="$addon->remove_url" href="{$addon->remove_url}&return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->cmd_delete}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue