Changeset 2490:a7398fa0bfeb for inc/admin
- Timestamp:
- 10/25/13 00:53:21 (12 years ago)
- Branch:
- 2.6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.moduleslist.php
r2488 r2490 795 795 796 796 # Deactivate 797 case 'activate': if ($ module['root_writable']) {797 case 'activate': if ($this->core->auth->isSuperAdmin() && $module['root_writable']) { 798 798 $submits[] = 799 799 '<input type="submit" name="activate['.html::escapeHTML($id).']" value="'.__('Activate').'" />'; … … 801 801 802 802 # Activate 803 case 'deactivate': if ($ module['root_writable']) {803 case 'deactivate': if ($this->core->auth->isSuperAdmin() && $module['root_writable']) { 804 804 $submits[] = 805 805 '<input type="submit" name="deactivate['.html::escapeHTML($id).']" value="'.__('Deactivate').'" class="reset" />'; … … 807 807 808 808 # Delete 809 case 'delete': if ($this-> isDeletablePath($module['root'])) {809 case 'delete': if ($this->core->auth->isSuperAdmin() && $this->isDeletablePath($module['root'])) { 810 810 $dev = !preg_match('!^'.$this->path_pattern.'!', $module['root']) && defined('DC_DEV') && DC_DEV ? ' debug' : ''; 811 811 $submits[] = … … 814 814 815 815 # Install (from store) 816 case 'install': if ($this-> path_writable) {816 case 'install': if ($this->core->auth->isSuperAdmin() && $this->path_writable) { 817 817 $submits[] = 818 818 '<input type="submit" name="install['.html::escapeHTML($id).']" value="'.__('Install').'" />'; … … 820 820 821 821 # Update (from store) 822 case 'update': if ($this-> path_writable) {822 case 'update': if ($this->core->auth->isSuperAdmin() && $this->path_writable) { 823 823 $submits[] = 824 824 '<input type="submit" name="update['.html::escapeHTML($id).']" value="'.__('Update').'" />'; … … 857 857 858 858 # Deactivate 859 case 'activate': if ($this-> path_writable) {859 case 'activate': if ($this->core->auth->isSuperAdmin() && $this->path_writable) { 860 860 $submits[] = 861 861 '<input type="submit" name="activate" value="'.($with_selection ? … … 866 866 867 867 # Activate 868 case 'deactivate': if ($this-> path_writable) {868 case 'deactivate': if ($this->core->auth->isSuperAdmin() && $this->path_writable) { 869 869 $submits[] = 870 870 '<input type="submit" name="deactivate" value="'.($with_selection ? … … 875 875 876 876 # Update (from store) 877 case 'update': if ($this-> path_writable) {877 case 'update': if ($this->core->auth->isSuperAdmin() && $this->path_writable) { 878 878 $submits[] = 879 879 '<input type="submit" name="update" value="'.($with_selection ? … … 909 909 { 910 910 if (empty($_POST) || !empty($_REQUEST['conf']) 911 || !$this-> core->auth->isSuperAdmin() || !$this->isWritablePath()) {911 || !$this->isWritablePath()) { 912 912 return null; 913 913 } … … 915 915 $modules = !empty($_POST['modules']) && is_array($_POST['modules']) ? array_values($_POST['modules']) : array(); 916 916 917 if ( !empty($_POST['delete'])) {917 if ($this->core->auth->isSuperAdmin() && !empty($_POST['delete'])) { 918 918 919 919 if (is_array($_POST['delete'])) { … … 970 970 } 971 971 972 elseif ( !empty($_POST['install'])) {972 elseif ($this->core->auth->isSuperAdmin() && !empty($_POST['install'])) { 973 973 974 974 if (is_array($_POST['install'])) { … … 1008 1008 } 1009 1009 1010 elseif ( !empty($_POST['activate'])) {1010 elseif ($this->core->auth->isSuperAdmin() && !empty($_POST['activate'])) { 1011 1011 1012 1012 if (is_array($_POST['activate'])) { … … 1043 1043 } 1044 1044 1045 elseif ( !empty($_POST['deactivate'])) {1045 elseif ($this->core->auth->isSuperAdmin() && !empty($_POST['deactivate'])) { 1046 1046 1047 1047 if (is_array($_POST['deactivate'])) { … … 1091 1091 } 1092 1092 1093 elseif ( !empty($_POST['update'])) {1093 elseif ($this->core->auth->isSuperAdmin() && !empty($_POST['update'])) { 1094 1094 1095 1095 if (is_array($_POST['update'])) { … … 1633 1633 1634 1634 # Update (from store) 1635 case 'update': if ($this-> path_writable) {1635 case 'update': if ($this->core->auth->isSuperAdmin() && $this->path_writable) { 1636 1636 $submits[] = 1637 1637 '<input type="submit" name="update" value="'.($with_selection ? … … 1659 1659 public function doActions() 1660 1660 { 1661 if (empty($_POST) || !empty($_REQUEST['conf']) 1662 || !$this->core->auth->isSuperAdmin() || !$this->isWritablePath()) { 1661 if (empty($_POST) || !empty($_REQUEST['conf']) || !$this->isWritablePath()) { 1663 1662 return null; 1664 1663 } … … 1686 1685 } 1687 1686 1688 elseif ( !empty($_POST['activate'])) {1687 elseif ($this->core->auth->isSuperAdmin() && !empty($_POST['activate'])) { 1689 1688 1690 1689 if (is_array($_POST['activate'])) { … … 1721 1720 } 1722 1721 1723 elseif ( !empty($_POST['deactivate'])) {1722 elseif ($this->core->auth->isSuperAdmin() && !empty($_POST['deactivate'])) { 1724 1723 1725 1724 if (is_array($_POST['deactivate'])) { … … 1769 1768 } 1770 1769 1771 elseif ( !empty($_POST['delete'])) {1770 elseif ($this->core->auth->isSuperAdmin() && !empty($_POST['delete'])) { 1772 1771 1773 1772 if (is_array($_POST['delete'])) { … … 1824 1823 } 1825 1824 1826 elseif ( !empty($_POST['install'])) {1825 elseif ($this->core->auth->isSuperAdmin() && !empty($_POST['install'])) { 1827 1826 1828 1827 if (is_array($_POST['install'])) { … … 1862 1861 } 1863 1862 1864 elseif ( !empty($_POST['update'])) {1863 elseif ($this->core->auth->isSuperAdmin() && !empty($_POST['update'])) { 1865 1864 1866 1865 if (is_array($_POST['update'])) {
Note: See TracChangeset
for help on using the changeset viewer.