Exemple #1
0
	/**
	 * Detect FireBoard version.
	 *
	 * @return  string  FireBoard version or null.
	 */
	public function detect()
	{
		// Check if FireBoard can be found from the Joomla installation.
		if (KunenaInstaller::detectTable('fb_version'))
		{
			// Get installed version.
			$db = JFactory::getDBO();
			$db->setQuery("SELECT version, versiondate AS date FROM #__fb_version ORDER BY id DESC", 0, 1);
			$version = $db->loadRow();

			// Do not detect Kunena 1.x.
			if ($version && version_compare($version->version, '1.0.5', '>'))
			{
				return null;
			}
			// Return FireBoard version.
			if ($version->version)
			{
				return $version->version;
			}
		}
		foreach ($this->versions as $version)
		{
			if (KunenaInstaller::getTableColumn($version['table'], $version['column']))
			{
				return $version->version;
			}
		}

		return null;
	}
Exemple #2
0
 /**
  * Detect Kunena 1.x version.
  *
  * @return  string  Kunena version or null.
  */
 public function detect()
 {
     // Check if Kunena 1.x can be found from the Joomla installation.
     if (KunenaInstaller::detectTable('fb_version')) {
         // Get installed version.
         $db = JFactory::getDBO();
         $db->setQuery("SELECT version, versiondate AS date FROM #__fb_version ORDER BY id DESC", 0, 1);
         $version = $db->loadRow();
         // Do not detect FireBoard 1.0.5 RC1 / RC2.
         if ($version && version_compare($version->version, '1.0.5', '<=')) {
             return null;
         }
         // Return FireBoard version.
         if ($version->version) {
             return $version->version;
         }
     }
     return null;
 }