[Isocial-svn] SF.net SVN: isocial: [99] app/application_controller.php
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <agu...@us...> - 2008-03-19 19:18:20
|
Revision: 99 http://isocial.svn.sourceforge.net/isocial/?rev=99&view=rev Author: aguidrevitch Date: 2008-03-19 12:18:26 -0700 (Wed, 19 Mar 2008) Log Message: ----------- fix for new country / city db schema Modified Paths: -------------- app/application_controller.php Modified: app/application_controller.php =================================================================== --- app/application_controller.php 2008-03-19 19:17:40 UTC (rev 98) +++ app/application_controller.php 2008-03-19 19:18:26 UTC (rev 99) @@ -194,11 +194,11 @@ $aquery = utf8_to_ascii($query); if ($aquery != $query) { $conditions = array( - 'first_id IS NOT NULL AND name LIKE ? OR name LIKE ?', $query . '%', $aquery . '%' + 'name LIKE ? OR name LIKE ?', $query . '%', $aquery . '%' ); } else { $conditions = array( - 'first_id IS NOT NULL AND name LIKE ?', $query . '%' + 'name LIKE ?', $query . '%' ); } @@ -207,14 +207,14 @@ 'conditions' => $conditions, 'include' => 'country', 'limit' => 10, - 'order' => 'is_native DESC, name' + 'order' => 'name' ) ); - if (!empty($entries)) { + if (!empty($entries)) { $this->renderText( $this->city_helper->auto_complete_result($entries, $query, $this->params['city']) ); - } else { - $this->renderNothing(); - } + } else { + $this->renderNothing(); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |