Ignore:
Timestamp:
09/24/2009 01:25:39 AM (3 years ago)
Author:
Acinonyx
Message:

[awmn] Add zone name validation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/awmn/includes/pages/mynodes/mynodes_dnszone.php

    r202 r203  
    44 * 
    55 * Copyright (C) 2005 Nikolaos Nikalexis <winner@cube.gr> 
     6 * Copyright (C) 2009 Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr> 
    67 *  
    78 * This program is free software; you can redistribute it and/or modify 
     
    7778                        $_POST['dns_zones__name'] = substr($_POST['dns_zones__name'], 0, -strlen($vars['dns']['root_zone'])-1); 
    7879                } 
     80                $_POST['dns_zones__name'] = validate_zone($_POST['dns_zones__name']); 
    7981                $form_zone = $this->form_zone(); 
    8082                $ret = TRUE; 
     
    8284                if (get('zone') == 'add') { 
    8385                        if ($_POST['dns_zones__name'] == '') { 
    84                                 $db->output_error_fields_required(array('dns_zones__name')); 
     86                                if (is_null($_POST['dns_zones__name'])) $main->message->set_fromlang('error', 'zone_invalid_name'); 
     87                                else $db->output_error_fields_required(array('dns_zones__name')); 
    8588                                return; 
    8689                        } 
Note: See TracChangeset for help on using the changeset viewer.