/** * Description * * @access public * @return int The number of rows returned from the most recent query. */ function getNumRows($cur = null, $translate = true, $language = null) { $count = parent::getNumRows($cur); if (!$translate) { return $count; } // setup falang plugins $dispatcher = JDispatcher::getInstance(); jimport('joomla.plugin.helper'); JPluginHelper::importPlugin('falang'); // must allow fall back for contnent table localisation to work $allowfallback = true; $refTablePrimaryKey = ""; $reference_table = ""; $ids = ""; //$this->setLanguage($language); $registry = JFactory::getConfig(); $defaultLang = $registry->get("config.defaultlang"); if ($defaultLang == $language) { $rows = array($count); $dispatcher->trigger('onBeforeTranslation', array(&$rows, &$ids, $reference_table, $language, $refTablePrimaryKey, $this->getRefTables(), $this->sql, $allowfallback)); $count = $rows[0]; return $count; } $rows = array($count); $dispatcher->trigger('onBeforeTranslation', array(&$rows, &$ids, $reference_table, $language, $refTablePrimaryKey, $this->getRefTables(), $this->sql, $allowfallback)); $dispatcher->trigger('onAfterTranslation', array(&$rows, &$ids, $reference_table, $language, $refTablePrimaryKey, $this->getRefTables(), $this->sql, $allowfallback)); $count = $rows[0]; return $count; }