Changeset 2951


Ignore:
Timestamp:
05/31/10 05:53:46 (21 months ago)
Author:
nuxwin
Message:
  • [GUI] Restored the readonly attribute for standard services ports in admin/settings_ports.php
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/admin/settings_ports.php

    r2950 r2951  
    145145 * @param int $show 
    146146 * @param boolean $on_updt True: validates for update 
     147 * @return TRUE if valids, FALSE otherwise 
    147148 */ 
    148149function validates_service($name, $ip, $port, $proto, $show, $on_updt = false) { 
     
    187188        if(isset($_POST['name_new']) && !empty($_POST['name_new'])) { 
    188189 
    189                 $name = strtoupper($_POST['name_new']); 
    190                 $ip = $_POST['ip_new']; 
    191190                $port = $_POST['port_new']; 
    192191                $proto = $_POST['port_type_new']; 
     192                $name = strtoupper($_POST['name_new']); 
    193193                $show = $_POST['show_val_new']; 
     194                $ip = $_POST['ip_new']; 
    194195 
    195196                if(validates_service($name, $ip, $port, $proto, $show)) { 
     
    215216                foreach($_POST['name'] as $index => $name) { 
    216217 
    217                         $ip = $_POST['ip'][$index]; 
    218218                        $port = $_POST['port'][$index]; 
    219219                        $proto = $_POST['port_type'][$index]; 
    220220                        $show = $_POST['show_val'][$index]; 
     221                        $custom = $_POST['custom'][$index]; 
     222                        $ip = $_POST['ip'][$index]; 
    221223 
    222224                        if(validates_service($name, $ip, $port, $proto, $show, true)) { 
     
    226228                                // See the {@link IspCP_ConfigHandler_Db} adapter class to learn 
    227229                                // how it work 
    228                                 $db_cfg->$db_sname = "$port;$proto;$name;$show;1;$ip"; 
     230                                $db_cfg->$db_sname = "$port;$proto;$name;$show;$custom;$ip"; 
    229231                        } else { 
    230232                                return; 
     
    286288// Adds a service port or updates one or more services ports 
    287289if (isset($_POST['uaction']) && $_POST['uaction'] == 'apply') { 
    288          
     290 
    289291        add_update_services(); 
    290292        user_goto('settings_ports.php'); 
Note: See TracChangeset for help on using the changeset viewer.