From: Andrea Zagli Date: Sat, 12 Dec 2009 15:49:23 +0000 (+0100) Subject: Bugfixes. X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=94da87b9947d11fcd41ca32413684b08393e3f09;p=joomla%2Fjmnogosearch Bugfixes. --- diff --git a/com_jmnogosearch/admin/admin.jmnogosearch.php b/com_jmnogosearch/admin/admin.jmnogosearch.php index 4c507a4..695bc0b 100644 --- a/com_jmnogosearch/admin/admin.jmnogosearch.php +++ b/com_jmnogosearch/admin/admin.jmnogosearch.php @@ -1,10 +1,10 @@ execute( JRequest::getCmd( 'task' ) ); $controller->redirect(); diff --git a/com_jmnogosearch/admin/controller.php b/com_jmnogosearch/admin/controller.php index c684b0d..e153231 100644 --- a/com_jmnogosearch/admin/controller.php +++ b/com_jmnogosearch/admin/controller.php @@ -1,10 +1,10 @@ getModel( 'Search' ); - $view =& $this->getView( 'Search' ); + $model =& $this->getModel( 'JMnoGoSearch' ); + $view =& $this->getView( 'JMnoGoSearch' ); $view->setModel( $model, true ); $view->display(); } @@ -38,8 +38,8 @@ class mnoGoSearchController extends JController */ function reset() { - $model =& $this->getModel( 'Search' ); + $model =& $this->getModel( 'JMnoGoSearch' ); $model->reset(); - $this->setRedirect('index.php?option=com_mnogosearch'); + $this->setRedirect('index.php?option=com_jmnogosearch'); } } diff --git a/com_jmnogosearch/admin/helpers/jmnogosearch.php b/com_jmnogosearch/admin/helpers/jmnogosearch.php index b2b5cdf..b00a3af 100644 --- a/com_jmnogosearch/admin/helpers/jmnogosearch.php +++ b/com_jmnogosearch/admin/helpers/jmnogosearch.php @@ -1,11 +1,10 @@ setQuery( 'DELETE FROM #__mnogosearch_log_searches' ); + $db->setQuery( 'DELETE FROM #__jmnogosearch_log_searches' ); $db->query(); } @@ -46,11 +46,11 @@ class mnoGoSearchModelSearch extends JModel global $mainframe, $option; $db =& JFactory::getDBO(); - $filter_order = $mainframe->getUserStateFromRequest( 'com_mnogosearch.filter_order', 'filter_order', 'hits', 'cmd' ); - $filter_order_Dir = $mainframe->getUserStateFromRequest( 'com_mnogosearch.filter_order_Dir', 'filter_order_Dir', '', 'word' ); + $filter_order = $mainframe->getUserStateFromRequest( 'com_jmnogosearch.filter_order', 'filter_order', 'hits', 'cmd' ); + $filter_order_Dir = $mainframe->getUserStateFromRequest( 'com_jmnogosearch.filter_order_Dir', 'filter_order_Dir', '', 'word' ); $limit = $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int' ); - $limitstart = $mainframe->getUserStateFromRequest( 'com_mnogosearch.limitstart', 'limitstart', 0, 'int' ); - $search = $mainframe->getUserStateFromRequest( 'com_mnogosearch.search', 'search', '', 'string' ); + $limitstart = $mainframe->getUserStateFromRequest( 'com_jmnogosearch.limitstart', 'limitstart', 0, 'int' ); + $search = $mainframe->getUserStateFromRequest( 'com_jmnogosearch.search', 'search', '', 'string' ); $search = JString::strtolower( $search ); $showResults = JRequest::getInt('search_results'); @@ -75,7 +75,7 @@ class mnoGoSearchModelSearch extends JModel // get the total number of records $query = 'SELECT COUNT(*)' - . ' FROM #__mnogosearch_log_searches' + . ' FROM #__jmnogosearch_log_searches' . $where; $db->setQuery( $query ); $total = $db->loadResult(); @@ -84,14 +84,14 @@ class mnoGoSearchModelSearch extends JModel $pageNav = new JPagination( $total, $limitstart, $limit ); $query = ' SELECT * ' - . ' FROM #__mnogosearch_log_searches ' + . ' FROM #__jmnogosearch_log_searches ' . $where . $orderby; $db->setQuery( $query, $pageNav->limitstart, $pageNav->limit ); $rows = $db->loadObjectList(); - JPluginHelper::importPlugin( 'search' ); + JPluginHelper::importPlugin( 'jmnogosearch' ); if (!class_exists( 'JSite' )) { diff --git a/com_jmnogosearch/admin/sql/install.sql b/com_jmnogosearch/admin/sql/install.sql index e20d243..cac00d9 100644 --- a/com_jmnogosearch/admin/sql/install.sql +++ b/com_jmnogosearch/admin/sql/install.sql @@ -1,6 +1,6 @@ DROP TABLE IF EXISTS `#__jmnogosearch_log_searches`; -CREATE TABLE `#_jmnogosearch_log_searches` ( +CREATE TABLE `#__jmnogosearch_log_searches` ( `search_term` varchar(128) NOT NULL default '', `hits` int(11) unsigned NOT NULL default '0' ) DEFAULT CHARSET=utf8 diff --git a/com_jmnogosearch/admin/views/jmnogosearch/tmpl/default.php b/com_jmnogosearch/admin/views/jmnogosearch/tmpl/default.php index cb86877..ec85c96 100644 --- a/com_jmnogosearch/admin/views/jmnogosearch/tmpl/default.php +++ b/com_jmnogosearch/admin/views/jmnogosearch/tmpl/default.php @@ -16,9 +16,9 @@ showResults ) : ?> - + - + @@ -82,7 +82,7 @@ - + diff --git a/com_jmnogosearch/admin/views/jmnogosearch/view.html.php b/com_jmnogosearch/admin/views/jmnogosearch/view.html.php new file mode 100644 index 0000000..89d75a0 --- /dev/null +++ b/com_jmnogosearch/admin/views/jmnogosearch/view.html.php @@ -0,0 +1,63 @@ +setTitle(JText::_('Search Statistics')); + + $limit = $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int' ); + $limitstart = $mainframe->getUserStateFromRequest( 'com_jmnogosearch.limitstart', 'limitstart', 0, 'int' ); + + $model = $this->getModel(); + $items = $model->getItems(); + $params = &JComponentHelper::getParams( 'com_jmnogosearch' ); + $enabled = $params->get('enabled'); + JHTML::_('behavior.tooltip'); + jimport('joomla.html.pagination'); + $pageNav = new JPagination( count($items), $limitstart, $limit ); + + $showResults = JRequest::getInt('search_results'); + + $search = $mainframe->getUserStateFromRequest( 'com_jmnogosearch.search', 'search', '', 'string' ); + + $this->assignRef('items', $items); + $this->assignRef('enabled', $enabled); + $this->assignRef('pageNav', $pageNav); + $this->assignRef('search', $search ); + $this->assignRef('lists', $model->lists ); + + $this->assignRef('showResults', $showResults); + + parent::display($tpl); + } +} diff --git a/com_jmnogosearch/admin/views/jmnogosearch/view.php b/com_jmnogosearch/admin/views/jmnogosearch/view.php deleted file mode 100644 index 223b68b..0000000 --- a/com_jmnogosearch/admin/views/jmnogosearch/view.php +++ /dev/null @@ -1,63 +0,0 @@ -setTitle(JText::_('Search Statistics')); - - $limit = $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int' ); - $limitstart = $mainframe->getUserStateFromRequest( 'com_mnogosearch.limitstart', 'limitstart', 0, 'int' ); - - $model = $this->getModel(); - $items = $model->getItems(); - $params = &JComponentHelper::getParams( 'com_mnogosearch' ); - $enabled = $params->get('enabled'); - JHTML::_('behavior.tooltip'); - jimport('joomla.html.pagination'); - $pageNav = new JPagination( count($items), $limitstart, $limit ); - - $showResults = JRequest::getInt('search_results'); - - $search = $mainframe->getUserStateFromRequest( 'com_mnosearch.search', 'search', '', 'string' ); - - $this->assignRef('items', $items); - $this->assignRef('enabled', $enabled); - $this->assignRef('pageNav', $pageNav); - $this->assignRef('search', $search ); - $this->assignRef('lists', $model->lists ); - - $this->assignRef('showResults', $showResults); - - parent::display($tpl); - } -} diff --git a/com_jmnogosearch/jmnogosearch.xml b/com_jmnogosearch/jmnogosearch.xml index c6f3c93..affcd23 100644 --- a/com_jmnogosearch/jmnogosearch.xml +++ b/com_jmnogosearch/jmnogosearch.xml @@ -30,23 +30,23 @@ JMnoGoSearch - admin.mnogosearch.php + admin.jmnogosearch.php config.xml controller.php index.html helpers/index.html - helpers/mnogosearch.php + helpers/jmnogosearch.php helpers/site.php models/index.html - models/mnogosearch.php + models/jmnogosearch.php sql/index.html sql/install.sql sql/uninstall.sql views/index.html - views/mnogosearch/index.html - views/mnogosearch/view.php - views/mnogosearch/tmpl/index.html - views/mnogosearch/tmpl/default.php + views/jmnogosearch/index.html + views/jmnogosearch/view.html.php + views/jmnogosearch/tmpl/index.html + views/jmnogosearch/tmpl/default.php diff --git a/com_jmnogosearch/site/views/jmnogosearch/metadata.xml b/com_jmnogosearch/site/views/jmnogosearch/metadata.xml index 1d0748d..a229260 100644 --- a/com_jmnogosearch/site/views/jmnogosearch/metadata.xml +++ b/com_jmnogosearch/site/views/jmnogosearch/metadata.xml @@ -1,6 +1,6 @@ - + - \ No newline at end of file + diff --git a/com_jmnogosearch/site/views/jmnogosearch/view.html.php b/com_jmnogosearch/site/views/jmnogosearch/view.html.php index cb721c6..f0f2cef 100644 --- a/com_jmnogosearch/site/views/jmnogosearch/view.html.php +++ b/com_jmnogosearch/site/views/jmnogosearch/view.html.php @@ -17,20 +17,18 @@ defined('_JEXEC') or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); /** - * HTML View class for the WebLinks component - * * @static - * @package Joomla - * @subpackage Weblinks + * @package JMnoGoSearch + * @subpackage JMnoGoSearch * @since 1.0 */ -class mnoGoSearchViewSearch extends JView +class JMnoGoSearchViewJMnoGoSearch extends JView { function display($tpl = null) { global $mainframe; - require_once(JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'mnogosearch.php' ); + require_once(JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'jmnogosearch.php' ); // Initialize some variables $pathway =& $mainframe->getPathway(); diff --git a/mod_jmnogosearch/mod_jmnogosearch.xml b/mod_jmnogosearch/mod_jmnogosearch.xml index 560fe13..1bdcb0c 100644 --- a/mod_jmnogosearch/mod_jmnogosearch.xml +++ b/mod_jmnogosearch/mod_jmnogosearch.xml @@ -4,7 +4,7 @@ JMnoGoSearch Andrea Zagli December 2009 - Copyright (C) 2000 Andrea Zagli. All rights reserved. + Copyright (C) 2009 Andrea Zagli. All rights reserved. http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL azagli@libero.it http://saetta.homelinux.org/