Files
FHC-Core/application/controllers/system/extensions/CLI_Manager.php
T
Paolo 15f9762d01 - Fixed errors/violations noticed by PHPMD and PHPCS
- Removed parameter perform_sql from public method controllers/system/extensions/CLI_Manager->installExtension
- Added new public method controllers/system/extensions/CLI_Manager->installExtensionNoSQL
- Improved code quality in controllers/system/extensions/Manager->toggleExtension
- controllers/system/extensions/Manager->uploadExtension better check of
  HTTP POST parameter notPerformSql
- application/views/system/extensions/manager.php renamed checkbox
  performSql to notPerformSql
- application/views/system/extensions/tableWidget.php removed PHP close
  tag at the end of the file
- Improved code quality in application/widgets/TableWidget.php
- Removed private method _getColumnsNames from application/widgets/TableWidget.php
- Improved code quality in application/libraries/ExtensionsLib.php
- Added new private methods _getExtensionsPath and _getUploadPath to application/libraries/ExtensionsLib.php
- Changed application/libraries/ExtensionsLib->_toggleExtension to public method toggleExtension
- Removed private properties UPLOAD_PATH and EXTENSIONS_PATH from application/libraries/ExtensionsLib
- Added use imports in application/libraries/ExtensionsLib
- application/libraries/ExtensionsLib->installExtension changed parameters default values
2022-03-04 12:26:37 +01:00

47 lines
1.2 KiB
PHP

<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class CLI_Manager extends CLI_Controller
{
/**
*
*/
public function __construct()
{
parent::__construct();
// Load helpers to upload files
$this->load->helper('form');
// Loads the extensions library
$this->load->library('ExtensionsLib');
}
/**
* Installiert eine Extension.
* Es wird davon ausgegangen, dass die Extension ueber einen Fileupload hochgeladen wird.
* alternativ kann hier auch der Name und Filename uebergeben werden um die installation ueber
* die Commandline ohne Upload durchzufuehren.
* @param $extensioName string Name der Extension
* @param $filename Url Encoded Pfad zum tgz File der Extension
* @param $perform_sql boolean ob die SQL Befehle ausgeführt werden
*/
public function installExtension($extensionName, $filename)
{
$this->extensionslib->installExtension($extensionName, urldecode($filename), true);
}
/**
* Install an extension, same as installExtension but without running the SQL statements
*/
public function installExtensionNoSQL($extensionName, $filename)
{
$this->extensionslib->installExtension($extensionName, urldecode($filename), false);
}
}