Changeset 203
- Timestamp:
- 09/24/2009 01:25:39 AM (2 years ago)
- Location:
- branches/awmn
- Files:
-
- 4 edited
-
globals/functions.php (modified) (2 diffs)
-
globals/language/english.php (modified) (1 diff)
-
globals/language/greek.php (modified) (1 diff)
-
includes/pages/mynodes/mynodes_dnszone.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/awmn/globals/functions.php
r198 r203 4 4 * 5 5 * Copyright (C) 2005 Nikolaos Nikalexis <winner@cube.gr> 6 * Copyright (C) 2009 Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr> 6 7 * 7 8 * This program is free software; you can redistribute it and/or modify … … 312 313 } 313 314 315 function validate_zone($name) { 316 $name = str_replace("_", "-", $name); 317 $name = strtolower($name); 318 if (preg_match('/^((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)*([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])|)$/', $name) == 0) return NULL; 319 return $name; 320 } 321 314 322 function validate_name_ns($name, $node) { 315 323 global $db; -
branches/awmn/globals/language/english.php
r199 r203 496 496 'body' => 'The node you are looking for does not exist. Check that you supplied the correct data and try again. If you are sure that you submit the correct data, it is likely that the node has been deleted or that the user has not activated his/her account yet.' 497 497 ), 498 'zone_invalid_name' => array( 499 'title' => 'Invalid zone name', 500 body => 'The name of the zone contains invalid characters.' 501 ), 498 502 'generic' => array( 499 503 'title' => "General error", -
branches/awmn/globals/language/greek.php
r199 r203 686 686 λογαÏιαÏΌοÏ.' 687 687 ), 688 'zone_invalid_name' => array( 689 'title' => 'Îη ÎÎ³ÎºÏ 690 Ïο ÏΜοΌα ζÏΜηÏ', 691 body => '΀ο ÏΜοΌα ζÏÎœÎ·Ï ÏÎ¿Ï 692 ΎηλÏÏαÏε ÏεÏιÎÏει Όη ÎÎ³ÎºÏ 693 ÏÎ¿Ï 694 Ï ÏαÏακÏήÏεÏ.' 695 ), 688 696 'generic' => array( 689 697 'title' => "ÎÎµÎœÎ¹ÎºÏ ÏÏάλΌα", -
branches/awmn/includes/pages/mynodes/mynodes_dnszone.php
r202 r203 4 4 * 5 5 * Copyright (C) 2005 Nikolaos Nikalexis <winner@cube.gr> 6 * Copyright (C) 2009 Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr> 6 7 * 7 8 * This program is free software; you can redistribute it and/or modify … … 77 78 $_POST['dns_zones__name'] = substr($_POST['dns_zones__name'], 0, -strlen($vars['dns']['root_zone'])-1); 78 79 } 80 $_POST['dns_zones__name'] = validate_zone($_POST['dns_zones__name']); 79 81 $form_zone = $this->form_zone(); 80 82 $ret = TRUE; … … 82 84 if (get('zone') == 'add') { 83 85 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')); 85 88 return; 86 89 }
Note: See TracChangeset
for help on using the changeset viewer.
