From 6fceaf205a341c2134457bf9f24a7a7f2fba63e0 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Mon, 31 Jan 2011 22:18:02 +0000 Subject: characters / [ and ] are now allowed for the model name --- .../Application/Controllers/GenericController.php | 20 +++++++++++--------- .../Application/Controllers/NotebooksController.php | 4 ++-- .../Application/Controllers/PrintersController.php | 4 ++-- .../Application/Controllers/ScannersController.php | 4 ++-- .../Application/Controllers/SoundcardsController.php | 4 ++-- .../Controllers/ThreegcardsController.php | 4 ++-- .../Application/Controllers/VideocardsController.php | 4 ++-- h-source/Application/Controllers/WifiController.php | 4 ++-- 8 files changed, 25 insertions(+), 23 deletions(-) (limited to 'h-source/Application/Controllers') diff --git a/h-source/Application/Controllers/GenericController.php b/h-source/Application/Controllers/GenericController.php index c8174ab..5c96b76 100644 --- a/h-source/Application/Controllers/GenericController.php +++ b/h-source/Application/Controllers/GenericController.php @@ -210,7 +210,7 @@ class GenericController extends BaseController $name = encodeUrl($ne_name); $data['name'] = $name; $data['ne_name'] = $ne_name; - $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($clean['id_hard'],$name) . " » edit"; + $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($clean['id_hard'],$ne_name) . " » edit"; if (isset($_POST['updateAction'])) { @@ -419,7 +419,7 @@ class GenericController extends BaseController $data['id'] = $clean['id']; $data['ne_name'] = $this->m['HardwareModel']->getTheModelName($clean['id']); $data['name'] = encodeUrl($data['ne_name']); - $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($clean['id'],$data['name'])." » history"; + $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($clean['id'],$data['ne_name'])." » history"; $data['title'] = 'history - '.Website::$generalName; @@ -474,7 +474,7 @@ class GenericController extends BaseController $data['id_hard'] = (int)$data['table'][0]['revisions']['id_hard']; $data['ne_name'] = $this->m['HardwareModel']->getTheModelName($data['id_hard']); $data['name'] = encodeUrl($data['ne_name']); - $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($data['id_hard'],$data['name'])." » " . $this->getHistoryLink($data['id_hard']) . " » revision"; + $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($data['id_hard'],$data['ne_name'])." » " . $this->getHistoryLink($data['id_hard']) . " » revision"; $data['title'] = 'revision - '.Website::$generalName; @@ -496,8 +496,9 @@ class GenericController extends BaseController $clean['id_rev'] = (int)$id_rev; $data['id_hard'] = $clean['id_hard']; - $data['name'] = encodeUrl($this->m['HardwareModel']->getTheModelName((int)$data['id_hard'])); - $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($data['id_hard'],$data['name'])." » " . $this->getHistoryLink($clean['id_hard']) . " » differences"; + $ne_name = $this->m['HardwareModel']->getTheModelName((int)$data['id_hard']); + $data['name'] = encodeUrl($ne_name); + $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($data['id_hard'],$ne_name)." » " . $this->getHistoryLink($clean['id_hard']) . " » differences"; $data['showDiff'] = false; @@ -578,7 +579,7 @@ class GenericController extends BaseController $data['id_hard'] = $clean['id_hard']; $data['ne_name'] = $this->m['HardwareModel']->getTheModelName($clean['id_hard']); $data['name'] = encodeUrl($data['ne_name']); - $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($data['id_hard'],$data['name'])." » " . $this->getHistoryLink($clean['id_hard']) . " » make current"; + $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($data['id_hard'],$data['ne_name'])." » " . $this->getHistoryLink($clean['id_hard']) . " » make current"; $data['notice'] = null; $this->s['registered']->checkStatus(); @@ -628,7 +629,7 @@ class GenericController extends BaseController $data['id_hard'] = $clean['id_hard']; $data['ne_name'] = $this->m['HardwareModel']->getTheModelName($clean['id_hard']); $data['name'] = encodeUrl($data['ne_name']); - $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($clean['id_hard'],$data['name'])." » talk"; + $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($clean['id_hard'],$data['ne_name'])." » talk"; if (isset($_POST['insertAction'])) { @@ -658,9 +659,10 @@ class GenericController extends BaseController $this->loadViewAll('talk,moderator_dialog'); } - protected function getViewLink($id,$name) + protected function getViewLink($id,$ne_name) { - return "controller.'/view/'.$this->lang.'/'.$id.'/'.$name.$this->viewStatus."'>".urldecode($name).""; +// $text = isset() + return "controller.'/view/'.$this->lang.'/'.$id.'/'.encodeUrl($ne_name).$this->viewStatus."'>".$ne_name.""; } protected function getHistoryLink($id) diff --git a/h-source/Application/Controllers/NotebooksController.php b/h-source/Application/Controllers/NotebooksController.php index c663620..03fe4f4 100644 --- a/h-source/Application/Controllers/NotebooksController.php +++ b/h-source/Application/Controllers/NotebooksController.php @@ -45,7 +45,7 @@ class NotebooksController extends GenericController $this->m['HardwareModel']->strongConditions['update'] = array( "checkIsStrings|".Notebooks::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the model name entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", "+checkIsStrings|".Notebooks::compatibilityList() => "compatibility", "checkLength|99" => "model", "+checkLength|299" => "distribution", @@ -60,7 +60,7 @@ class NotebooksController extends GenericController $this->m['HardwareModel']->strongConditions['insert'] = array( "checkIsStrings|".Notebooks::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the model name entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", "+checkIsStrings|".Notebooks::compatibilityList() => "compatibility", "checkLength|99" => "model", "+checkLength|299" => "distribution", diff --git a/h-source/Application/Controllers/PrintersController.php b/h-source/Application/Controllers/PrintersController.php index 8353809..5ea6bf7 100644 --- a/h-source/Application/Controllers/PrintersController.php +++ b/h-source/Application/Controllers/PrintersController.php @@ -45,7 +45,7 @@ class PrintersController extends GenericController $this->m['HardwareModel']->strongConditions['update'] = array( "checkIsStrings|".Printer::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the model name entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", "checkLength|99" => "model", "+checkLength|299" => "distribution", "+checkIsStrings|".Printer::compatibilityList() => "compatibility", @@ -57,7 +57,7 @@ class PrintersController extends GenericController $this->m['HardwareModel']->strongConditions['insert'] = array( "checkIsStrings|".Printer::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the model name entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", "checkLength|99" => "model", "+checkLength|299" => "distribution", "+checkIsStrings|".Printer::compatibilityList() => "compatibility", diff --git a/h-source/Application/Controllers/ScannersController.php b/h-source/Application/Controllers/ScannersController.php index 37e747e..b6c84e3 100644 --- a/h-source/Application/Controllers/ScannersController.php +++ b/h-source/Application/Controllers/ScannersController.php @@ -45,7 +45,7 @@ class ScannersController extends GenericController $this->m['HardwareModel']->strongConditions['update'] = array( "checkIsStrings|".Printer::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the model name entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", "checkLength|99" => "model", "+checkLength|299" => "distribution", "+checkIsStrings|".Printer::compatibilityList() => "compatibility", @@ -56,7 +56,7 @@ class ScannersController extends GenericController $this->m['HardwareModel']->strongConditions['insert'] = array( "checkIsStrings|".Printer::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the model name entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", "checkLength|99" => "model", "+checkLength|299" => "distribution", "+checkIsStrings|".Printer::compatibilityList() => "compatibility", diff --git a/h-source/Application/Controllers/SoundcardsController.php b/h-source/Application/Controllers/SoundcardsController.php index 91d9039..b1d94ce 100644 --- a/h-source/Application/Controllers/SoundcardsController.php +++ b/h-source/Application/Controllers/SoundcardsController.php @@ -45,7 +45,7 @@ class SoundcardsController extends GenericController $this->m['HardwareModel']->strongConditions['update'] = array( "checkIsStrings|".Soundcards::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\@]+$/" => "model|characters not allowed in the model name entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\@\[\]\/]+$/" => "model|characters not allowed in the model name entry", "checkLength|99" => "model", "+checkLength|299" => "distribution", "++checkIsStrings|".Wifi::$commYear => "comm_year", @@ -56,7 +56,7 @@ class SoundcardsController extends GenericController $this->m['HardwareModel']->strongConditions['insert'] = array( "checkIsStrings|".Soundcards::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\@]+$/" => "model|characters not allowed in the model name entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\@\[\]\/]+$/" => "model|characters not allowed in the model name entry", "checkLength|99" => "model", "+checkLength|299" => "distribution", "++checkIsStrings|".Wifi::$commYear => "comm_year", diff --git a/h-source/Application/Controllers/ThreegcardsController.php b/h-source/Application/Controllers/ThreegcardsController.php index 5536da9..e0ee3fe 100644 --- a/h-source/Application/Controllers/ThreegcardsController.php +++ b/h-source/Application/Controllers/ThreegcardsController.php @@ -45,7 +45,7 @@ class ThreegcardsController extends GenericController $this->m['HardwareModel']->strongConditions['update'] = array( "checkIsStrings|".ThreeGcards::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the model name entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", "checkLength|99" => "model", "+checkLength|299" => "distribution", "++checkIsStrings|".ThreeGcards::$commYear => "comm_year", @@ -56,7 +56,7 @@ class ThreegcardsController extends GenericController $this->m['HardwareModel']->strongConditions['insert'] = array( "checkIsStrings|".ThreeGcards::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the model name entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", "checkLength|99" => "model", "+checkLength|299" => "distribution", "++checkIsStrings|".ThreeGcards::$commYear => "comm_year", diff --git a/h-source/Application/Controllers/VideocardsController.php b/h-source/Application/Controllers/VideocardsController.php index 02ec46c..8167d27 100644 --- a/h-source/Application/Controllers/VideocardsController.php +++ b/h-source/Application/Controllers/VideocardsController.php @@ -45,7 +45,7 @@ class VideocardsController extends GenericController $this->m['HardwareModel']->strongConditions['update'] = array( "checkIsStrings|".Videocard::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the model name entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", "checkLength|99" => "model", "+checkLength|299" => "distribution", "++checkIsStrings|".Notebooks::$commYear => "comm_year", @@ -56,7 +56,7 @@ class VideocardsController extends GenericController $this->m['HardwareModel']->strongConditions['insert'] = array( "checkIsStrings|".Videocard::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the model name entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", "checkLength|99" => "model", "+checkLength|299" => "distribution", "++checkIsStrings|".Notebooks::$commYear => "comm_year", diff --git a/h-source/Application/Controllers/WifiController.php b/h-source/Application/Controllers/WifiController.php index 670a91e..8cf38e7 100644 --- a/h-source/Application/Controllers/WifiController.php +++ b/h-source/Application/Controllers/WifiController.php @@ -45,7 +45,7 @@ class WifiController extends GenericController $this->m['HardwareModel']->strongConditions['update'] = array( "checkIsStrings|".Wifi::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the model name entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", "checkLength|99" => "model", "+checkLength|299" => "distribution", "++checkIsStrings|".Wifi::$commYear => "comm_year", @@ -56,7 +56,7 @@ class WifiController extends GenericController $this->m['HardwareModel']->strongConditions['insert'] = array( "checkIsStrings|".Wifi::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the model name entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", "checkLength|99" => "model", "+checkLength|299" => "distribution", "++checkIsStrings|".Wifi::$commYear => "comm_year", -- cgit v1.2.3