Changeset 3007:f9d013776723 for inc/admin
- Timestamp:
- 06/05/15 15:56:08 (10 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.moduleslist.php
r2997 r3007 672 672 echo 673 673 '<td class="module-desc maximal">'.html::escapeHTML(__($module['desc'])); 674 if (in_array('deps', $cols)) { 675 676 if (isset($module['disable_also'])) { 677 echo 678 '<br/><span class="info">'.__('Disabling or removing this plugin will also disable the following plugins: '). 679 join(',',$module['disable_also']).'</span>'; 674 if (isset($module['cannot_disable']) && $module['enabled']) { 675 echo 676 '<br/><span class="info">'. 677 sprintf(__('This module cannot be disabled nor deleted, since the following modules are also enabled : %s'), 678 join(',',$module['cannot_disable'])). 679 '</span>'; 680 } 681 if (isset($module['cannot_enable']) && !$module['enabled']) { 682 echo 683 '<br/><span class="info">'. 684 __('This module cannot be enabled, because of the following reasons :'). 685 '<ul>'; 686 foreach ($module['cannot_enable'] as $m=>$reason) { 687 echo '<li>'.$reason.'</li>'; 680 688 } 689 echo '</ul>'. 690 '</span>'; 681 691 } 682 692 echo '</td>'; … … 815 825 816 826 # Deactivate 817 case 'activate': if ($this->core->auth->isSuperAdmin() && $module['root_writable'] ) {827 case 'activate': if ($this->core->auth->isSuperAdmin() && $module['root_writable'] && !isset($module['cannot_enable'])) { 818 828 $submits[] = 819 829 '<input type="submit" name="activate['.html::escapeHTML($id).']" value="'.__('Activate').'" />'; … … 821 831 822 832 # Activate 823 case 'deactivate': if ($this->core->auth->isSuperAdmin() && $module['root_writable'] ) {833 case 'deactivate': if ($this->core->auth->isSuperAdmin() && $module['root_writable'] && !isset($module['cannot_disable'])) { 824 834 $submits[] = 825 835 '<input type="submit" name="deactivate['.html::escapeHTML($id).']" value="'.__('Deactivate').'" class="reset" />'; … … 827 837 828 838 # Delete 829 case 'delete': if ($this->core->auth->isSuperAdmin() && $this->isDeletablePath($module['root']) ) {839 case 'delete': if ($this->core->auth->isSuperAdmin() && $this->isDeletablePath($module['root'])&& !isset($module['cannot_disable'])) { 830 840 $dev = !preg_match('!^'.$this->path_pattern.'!', $module['root']) && defined('DC_DEV') && DC_DEV ? ' debug' : ''; 831 841 $submits[] =
Note: See TracChangeset
for help on using the changeset viewer.