[geeklog-cvs] geeklog: Changing $_REQUEST to $_GET in the search engine

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Tue Mar 31 18:47:59 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c641bc40ac18
changeset: 6884:c641bc40ac18
user:      Sami Barakat
date:      Tue Mar 31 21:45:20 2009 +0100
description:
Changing $_REQUEST to $_GET in the search engine

diffstat:

2 files changed, 19 insertions(+), 19 deletions(-)
system/classes/listfactory.class.php |   12 ++++++------
system/classes/search.class.php      |   26 +++++++++++++-------------

diffs (83 lines):

diff -r 8effbffba587 -r c641bc40ac18 system/classes/listfactory.class.php
--- a/system/classes/listfactory.class.php	Tue Mar 31 20:39:43 2009 +0200
+++ b/system/classes/listfactory.class.php	Tue Mar 31 21:45:20 2009 +0100
@@ -353,9 +353,9 @@
     function ExecuteQueries()
     {
         // Get the details for sorting the list
-        $this->_sort_arr['field'] = isset($_REQUEST['order']) ? COM_applyFilter($_REQUEST['order']) : $this->_def_sort_arr['field'];
-        if (isset($_REQUEST['direction']))
-            $this->_sort_arr['direction'] = $_REQUEST['direction'] == 'asc' ? 'asc' : 'desc';
+        $this->_sort_arr['field'] = isset($_GET['order']) ? COM_applyFilter($_GET['order']) : $this->_def_sort_arr['field'];
+        if (isset($_GET['direction']))
+            $this->_sort_arr['direction'] = $_GET['direction'] == 'asc' ? 'asc' : 'desc';
         else
             $this->_sort_arr['direction'] = $this->_def_sort_arr['direction'];
 
@@ -370,9 +370,9 @@
         }
         $order_sql = ' ORDER BY "' . addslashes($ord) . '" ' . strtoupper($this->_sort_arr['direction']);
 
-        $this->_page = isset($_REQUEST['page']) ? COM_applyFilter($_REQUEST['page'], true) : 1;
-        if (isset($_REQUEST['results'])) {
-            $this->_per_page = COM_applyFilter($_REQUEST['results'], true);
+        $this->_page = isset($_GET['page']) ? COM_applyFilter($_GET['page'], true) : 1;
+        if (isset($_GET['results'])) {
+            $this->_per_page = COM_applyFilter($_GET['results'], true);
         }
 
         // Calculate the limits for each query
diff -r 8effbffba587 -r c641bc40ac18 system/classes/search.class.php
--- a/system/classes/search.class.php	Tue Mar 31 20:39:43 2009 +0200
+++ b/system/classes/search.class.php	Tue Mar 31 21:45:20 2009 +0100
@@ -75,20 +75,20 @@
         global $_CONF, $_TABLES;
 
         // Set search criteria
-        if (isset ($_REQUEST['query'])) {
-            $this->_query = strip_tags (COM_stripslashes ($_REQUEST['query']));
+        if (isset ($_GET['query'])) {
+            $this->_query = strip_tags (COM_stripslashes ($_GET['query']));
         }
-        if (isset ($_REQUEST['topic'])) {
-            $this->_topic = COM_applyFilter ($_REQUEST['topic']);
+        if (isset ($_GET['topic'])) {
+            $this->_topic = COM_applyFilter ($_GET['topic']);
         }
-        if (isset ($_REQUEST['datestart'])) {
-            $this->_dateStart = COM_applyFilter ($_REQUEST['datestart']);
+        if (isset ($_GET['datestart'])) {
+            $this->_dateStart = COM_applyFilter ($_GET['datestart']);
         }
-        if (isset ($_REQUEST['dateend'])) {
-            $this->_dateEnd = COM_applyFilter ($_REQUEST['dateend']);
+        if (isset ($_GET['dateend'])) {
+            $this->_dateEnd = COM_applyFilter ($_GET['dateend']);
         }
-        if (isset ($_REQUEST['author'])) {
-            $this->_author = COM_applyFilter($_REQUEST['author']);
+        if (isset ($_GET['author'])) {
+            $this->_author = COM_applyFilter($_GET['author']);
 
             // In case we got a username instead of uid, convert it.  This should
             // make custom themes for search page easier.
@@ -100,8 +100,8 @@
                 $this->_author = '';
             }
         }
-        $this->_type = isset($_REQUEST['type']) ? COM_applyFilter($_REQUEST['type']) : 'all';
-        $this->_keyType = isset($_REQUEST['keyType']) ? COM_applyFilter($_REQUEST['keyType']) : $_CONF['search_def_keytype'];
+        $this->_type = isset($_GET['type']) ? COM_applyFilter($_GET['type']) : 'all';
+        $this->_keyType = isset($_GET['keyType']) ? COM_applyFilter($_GET['keyType']) : $_CONF['search_def_keytype'];
     }
 
     /**
@@ -532,7 +532,7 @@
         $searchtimer->startTimer();
 
         // Have plugins do their searches
-        $page = isset($_REQUEST['page']) ? COM_applyFilter($_REQUEST['page'], true) : 1;
+        $page = isset($_GET['page']) ? COM_applyFilter($_GET['page'], true) : 1;
         $result_plugins = PLG_doSearch($this->_query, $this->_dateStart, $this->_dateEnd, $this->_topic, $this->_type, $this->_author, $this->_keyType, $page, 5);
 
         // Add core searches



More information about the geeklog-cvs mailing list