Changeset 1091 for trunk/wifidog-auth/wifidog/classes/Node.php
- Timestamp:
- 09/06/06 10:58:06 (5 years ago)
- Files:
-
- 1 modified
-
trunk/wifidog-auth/wifidog/classes/Node.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/wifidog/classes/Node.php
r1090 r1091 50 50 require_once('classes/Utils.php'); 51 51 require_once('classes/DateTime.php'); 52 require_once('classes/InterfaceElements.php');53 require_once('classes/MainUI.php');54 52 55 53 /** … … 230 228 $node_name = _("New node"); 231 229 232 try {233 230 if (Node::nodeExists($node_id)) { 234 231 throw new Exception(_('This node already exists.')); … … 244 241 245 242 return $object; 246 } catch (Exception $e) {247 $ui = new MainUI();248 $ui->setToolSection('ADMIN');249 $ui->displayError($e->getMessage(), false);250 exit;251 }252 243 } 253 244 … … 815 806 public function getAdminUI() 816 807 { 808 require_once('classes/InterfaceElements.php'); 817 809 // Init values 818 810 $html = ''; 819 820 try {821 811 if (!User::getCurrentUser()) { 822 812 throw new Exception(_('Access denied!')); 823 813 } 824 } catch (Exception $e) {825 $ui = new MainUI();826 $ui->setToolSection('ADMIN');827 $ui->displayError($e->getMessage(), false);828 exit;829 }830 814 831 815 // Get information about the network … … 1076 1060 $user = User::getCurrentUser(); 1077 1061 1078 try {1079 1062 if (!$this->isOwner($user) && !$user->isSuperAdmin()) { 1080 1063 throw new Exception(_('Access denied!')); 1081 1064 } 1082 } catch (Exception $e) { 1083 $ui = new MainUI(); 1084 $ui->setToolSection('ADMIN'); 1085 $ui->displayError($e->getMessage(), false); 1086 exit; 1087 } 1065 1088 1066 1089 1067 // Check if user is a admin
