Changeset 2952
- Timestamp:
- 05/31/10 07:46:28 (21 months ago)
- File:
-
- 1 edited
-
trunk/gui/admin/settings_ports.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/admin/settings_ports.php
r2951 r2952 145 145 * @param int $show 146 146 * @param boolean $on_updt True: validates for update 147 * @return TRUE if valid s, FALSE otherwise147 * @return TRUE if valid, FALSE otherwise 148 148 */ 149 149 function validates_service($name, $ip, $port, $proto, $show, $on_updt = false) { … … 160 160 } elseif(!is_number($port) || $port <= 0) { 161 161 $e = tr('ERROR: Only positive numbers are allowed!'); 162 } elseif( isset($db_cfg->$db_sname) && !$on_updt) {162 } elseif(!$on_updt && isset($db_cfg->$db_sname)) { 163 163 $e = tr('ERROR: Service port already exists!'); 164 164 } elseif($proto != 'tcp' && $proto != 'udp') { … … 218 218 $port = $_POST['port'][$index]; 219 219 $proto = $_POST['port_type'][$index]; 220 $name = strtoupper($name); 220 221 $show = $_POST['show_val'][$index]; 221 222 $custom = $_POST['custom'][$index]; … … 223 224 224 225 if(validates_service($name, $ip, $port, $proto, $show, true)) { 225 $db_sname = "PORT_$name";226 $db_sname = $_POST['var_name'][$index]; 226 227 227 228 // Update the service port in the database
Note: See TracChangeset
for help on using the changeset viewer.
