From c8ccbfb4f4e323d828af15f0bc33cc979cc501b9 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Thu, 20 Sep 2012 12:56:41 -0400
Subject: [PATCH] Next step of importer
---
interface/web/sites/form/web_aliasdomain.tform.php | 30 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/interface/web/sites/form/web_aliasdomain.tform.php b/interface/web/sites/form/web_aliasdomain.tform.php
index ef36068..342272e 100644
--- a/interface/web/sites/form/web_aliasdomain.tform.php
+++ b/interface/web/sites/form/web_aliasdomain.tform.php
@@ -72,14 +72,11 @@
'domain' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
- 'errmsg'=> 'domain_error_empty'),
- 1 => array ( 'type' => 'UNIQUE',
- 'errmsg'=> 'domain_error_unique'),
- 2 => array ( 'type' => 'REGEX',
- 'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z]{2,10}$/',
- 'errmsg'=> 'domain_error_regex'),
- ),
+ 'validators' => array ( 0 => array ( 'type' => 'CUSTOM',
+ 'class' => 'validate_domain',
+ 'function' => 'alias_domain',
+ 'errmsg'=> 'domain_error_regex'),
+ ),
'default' => '',
'value' => '',
'width' => '30',
@@ -106,11 +103,15 @@
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'y',
- 'value' => array('' => 'No redirect', 'no' => 'No flag', 'R' => 'R', 'L' => 'L', 'R,L' => 'R,L')
+ 'value' => array('' => 'no_redirect_txt', 'no' => 'no_flag_txt', 'R' => 'R', 'L' => 'L', 'R,L' => 'R,L', 'R=301,L' => 'R=301,L', 'last' => 'last', 'break' => 'break', 'redirect' => 'redirect', 'permanent' => 'permanent')
),
'redirect_path' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'REGEX',
+ 'regex' => '@^(([\.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
+ 'errmsg'=> 'redirect_error_regex'),
+ ),
'default' => '',
'value' => '',
'width' => '30',
@@ -119,8 +120,13 @@
'subdomain' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
- 'default' => 'y',
- 'value' => array('none' => 'none', 'www' => 'www.', '*' => '*.')
+ 'default' => 'www',
+ 'validators' => array ( 0 => array ( 'type' => 'CUSTOM',
+ 'class' => 'validate_domain',
+ 'function' => 'web_domain_autosub',
+ 'errmsg'=> 'domain_error_autosub'),
+ ),
+ 'value' => array('none' => 'none_txt', 'www' => 'www.', '*' => '*.')
),
'active' => array (
'datatype' => 'VARCHAR',
@@ -135,4 +141,4 @@
);
-?>
\ No newline at end of file
+?>
--
Gitblit v1.9.1