Author: david
Date: 2008-09-29 14:55:17 -0700 (Mon, 29 Sep 2008)
New Revision: 1401

Modified:
   trunk/apps/qubit/lib/SearchPager.class.php
   trunk/apps/qubit/modules/search/actions/keywordAction.class.php
   trunk/apps/qubit/modules/search/templates/keywordSuccess.php
Log:
Set svn:keywords property on apps/qubit/list/SearchPager.class.php to "Author 
Id Revision". Convert searchPager() to SearchPager() to match symfony/Qubit 
naming standards for classes and fix up docblock a bit. Urlencode()/urldecode() 
$query variable in search/keywords page to preserve special characters (such as 
quotes) when paging. Fixes issue #451.

Modified: trunk/apps/qubit/lib/SearchPager.class.php
===================================================================
--- trunk/apps/qubit/lib/SearchPager.class.php  2008-09-29 19:18:57 UTC (rev 
1400)
+++ trunk/apps/qubit/lib/SearchPager.class.php  2008-09-29 21:55:17 UTC (rev 
1401)
@@ -22,13 +22,13 @@
  * Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-/*
- * @package Qubit
- * @author  Peter Van Garderen <[EMAIL PROTECTED]>
- * @version svn:$Id$
+/**
+ * @package    Qubit
+ * @subpackage search
+ * @author     Peter Van Garderen <[EMAIL PROTECTED]>
+ * @version    svn:$Id$
  */  
-
-class searchPager
+class SearchPager
 {
   /*
    * Class constructor


Property changes on: trunk/apps/qubit/lib/SearchPager.class.php
___________________________________________________________________
Added: svn:keywords
   + Author Id Revision

Modified: trunk/apps/qubit/modules/search/actions/keywordAction.class.php
===================================================================
--- trunk/apps/qubit/modules/search/actions/keywordAction.class.php     
2008-09-29 19:18:57 UTC (rev 1400)
+++ trunk/apps/qubit/modules/search/actions/keywordAction.class.php     
2008-09-29 21:55:17 UTC (rev 1401)
@@ -25,7 +25,7 @@
   {
   $culture = $this->getUser()->getCulture();
   setlocale(LC_CTYPE, $culture.'.utf-8');
-  $this->query = $this->getRequestParameter('query');
+  $this->query = urldecode($this->getRequestParameter('query'));
 
   if ($this->query)
   {
@@ -58,7 +58,7 @@
     $page = 1;
   }
 
-  $this->results = new searchPager($hits, $page);
+  $this->results = new SearchPager($hits, $page);
   //* end pager expirement */
 
   }

Modified: trunk/apps/qubit/modules/search/templates/keywordSuccess.php
===================================================================
--- trunk/apps/qubit/modules/search/templates/keywordSuccess.php        
2008-09-29 19:18:57 UTC (rev 1400)
+++ trunk/apps/qubit/modules/search/templates/keywordSuccess.php        
2008-09-29 21:55:17 UTC (rev 1401)
@@ -23,13 +23,13 @@
 <?php if ($results->haveToPaginate()): ?>
   <div class="pager">
     <?php if ($results->getCurrentPage() != 1): ?>
-      <?php echo link_to('< '.__('previous'), 
'search/keyword?query='.$query.'&page='.($results->getCurrentPage() -1)) ?>
+      <?php echo link_to('< '.__('previous'), 
'search/keyword?query='.urlencode($sf_data->getRaw('query')).'&page='.($results->getCurrentPage()
 -1)) ?>
     <?php endif; ?>
   <?php foreach ($results->getPages() as $page): ?>
-    <?php echo ($page == $results->getCurrentPage()) ? 
'<strong>'.$page.'</strong>' : link_to($page, 
'search/keyword?query='.$query.'&page='.$page) ?>
+    <?php echo ($page == $results->getCurrentPage()) ? 
'<strong>'.$page.'</strong>' : link_to($page, 
'search/keyword?query='.urlencode($sf_data->getRaw('query')).'&page='.$page) ?>
   <?php endforeach; ?>
   <?php if (count($results->getPages()) > $results->getCurrentPage()): ?>
-    <?php echo link_to(__('next').' >', 
'search/keyword?query='.$query.'&page='.($results->getCurrentPage() +1)) ?>
+    <?php echo link_to(__('next').' >', 
'search/keyword?query='.urlencode($sf_data->getRaw('query')).'&page='.($results->getCurrentPage()
 +1)) ?>
   <?php endif; ?>
   </div>
 <?php endif; ?>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to