aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application')
-rw-r--r--h-source/Application/Controllers/GenericController.php20
-rw-r--r--h-source/Application/Controllers/NotebooksController.php4
-rw-r--r--h-source/Application/Controllers/PrintersController.php4
-rw-r--r--h-source/Application/Controllers/ScannersController.php4
-rw-r--r--h-source/Application/Controllers/SoundcardsController.php4
-rw-r--r--h-source/Application/Controllers/ThreegcardsController.php4
-rw-r--r--h-source/Application/Controllers/VideocardsController.php4
-rw-r--r--h-source/Application/Controllers/WifiController.php4
-rw-r--r--h-source/Application/Include/myFunctions.php9
9 files changed, 30 insertions, 27 deletions
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() . " &raquo; " . $this->getViewLink($clean['id_hard'],$name) . " &raquo; <span class='last_tree_element'>edit</span>";
+ $data['tree'] = $this->getSpecHardLink() . " &raquo; " . $this->getViewLink($clean['id_hard'],$ne_name) . " &raquo; <span class='last_tree_element'>edit</span>";
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() . " &raquo; " . $this->getViewLink($clean['id'],$data['name'])." &raquo; <span class='last_tree_element'>history</span>";
+ $data['tree'] = $this->getSpecHardLink() . " &raquo; " . $this->getViewLink($clean['id'],$data['ne_name'])." &raquo; <span class='last_tree_element'>history</span>";
$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() . " &raquo; " . $this->getViewLink($data['id_hard'],$data['name'])." &raquo; " . $this->getHistoryLink($data['id_hard']) . " &raquo; <span class='last_tree_element'>revision</span>";
+ $data['tree'] = $this->getSpecHardLink() . " &raquo; " . $this->getViewLink($data['id_hard'],$data['ne_name'])." &raquo; " . $this->getHistoryLink($data['id_hard']) . " &raquo; <span class='last_tree_element'>revision</span>";
$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() . " &raquo; " . $this->getViewLink($data['id_hard'],$data['name'])." &raquo; " . $this->getHistoryLink($clean['id_hard']) . " &raquo; <span class='last_tree_element'>differences</span>";
+ $ne_name = $this->m['HardwareModel']->getTheModelName((int)$data['id_hard']);
+ $data['name'] = encodeUrl($ne_name);
+ $data['tree'] = $this->getSpecHardLink() . " &raquo; " . $this->getViewLink($data['id_hard'],$ne_name)." &raquo; " . $this->getHistoryLink($clean['id_hard']) . " &raquo; <span class='last_tree_element'>differences</span>";
$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() . " &raquo; " . $this->getViewLink($data['id_hard'],$data['name'])." &raquo; " . $this->getHistoryLink($clean['id_hard']) . " &raquo; <span class='last_tree_element'>make current</span>";
+ $data['tree'] = $this->getSpecHardLink() . " &raquo; " . $this->getViewLink($data['id_hard'],$data['ne_name'])." &raquo; " . $this->getHistoryLink($clean['id_hard']) . " &raquo; <span class='last_tree_element'>make current</span>";
$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() . " &raquo; " . $this->getViewLink($clean['id_hard'],$data['name'])." &raquo; <span class='last_tree_element'>talk</span>";
+ $data['tree'] = $this->getSpecHardLink() . " &raquo; " . $this->getViewLink($clean['id_hard'],$data['ne_name'])." &raquo; <span class='last_tree_element'>talk</span>";
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 "<a href='".$this->baseUrl.'/'.$this->controller.'/view/'.$this->lang.'/'.$id.'/'.$name.$this->viewStatus."'>".urldecode($name)."</a>";
+// $text = isset()
+ return "<a href='".$this->baseUrl.'/'.$this->controller.'/view/'.$this->lang.'/'.$id.'/'.encodeUrl($ne_name).$this->viewStatus."'>".$ne_name."</a>";
}
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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> 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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> 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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> 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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> 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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> 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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> 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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\@]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\@\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> 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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\@]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\@\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> 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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> 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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> 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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> 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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> 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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> 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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> entry",
"checkLength|99" => "model",
"+checkLength|299" => "distribution",
"++checkIsStrings|".Wifi::$commYear => "comm_year",
diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php
index 55fbd9b..a7ccf58 100644
--- a/h-source/Application/Include/myFunctions.php
+++ b/h-source/Application/Include/myFunctions.php
@@ -23,10 +23,11 @@ if (!defined('EG')) die('Direct access not allowed!');
function encodeUrl($url)
{
$url = str_replace(' ','-',$url);
- $url = str_replace('[',null,$url);
- $url = str_replace(']',null,$url);
- $url = str_replace('(',null,$url);
- $url = str_replace(')',null,$url);
+ $url = str_replace('[','-',$url);
+ $url = str_replace(']','-',$url);
+ $url = str_replace('(','-',$url);
+ $url = str_replace(')','-',$url);
+ $url = str_replace('/','-',$url);
$url = str_replace('@','-at-',$url);
$url = urlencode($url);
// $url = html_entity_decode($url, ENT_QUOTES);