Ejemplo n.º 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;
	}
Ejemplo n.º 2
0
 /**
  * Detect JoomlaBoard version.
  *
  * @return  string  JoomlaBoard version or null.
  */
 public function detect()
 {
     foreach ($this->versions as $version) {
         if (KunenaInstaller::getTableColumn($version['table'], $version['column'])) {
             return $version->version;
         }
     }
     return null;
 }