mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 16:32:20 +00:00
- Removed file system execute permission for all files (no directories)
- application/extensions file system permission now is 775 - application/logs file system permission now is 775 - Added extensions directory in application/: config, controllers, helpers, hooks, libraries, models, views and widgets - Added view views/extensions/manage.php - Added controller controllers/system/extensions/Manager.php - Added library ExtensionsLib to manage extensions - Added model models/system/Extensions_model.php - Moved code related to print out info from MigrationLib to EPrintfLib
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Manager extends VileSci_Controller
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Load helpers to upload files
|
||||
$this->load->helper(array('form', 'url'));
|
||||
|
||||
// Loads the extensions library
|
||||
$this->load->library('ExtensionsLib');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$viewData = array(
|
||||
'extensions' => $this->extensionslib->getInstalledExtensions()
|
||||
);
|
||||
|
||||
$this->load->view('core/system/extensions/manager.php', $viewData);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function toggleExtension()
|
||||
{
|
||||
$toggleExtension = false;
|
||||
|
||||
$extension_id = $this->input->post('extension_id');
|
||||
$enabled = $this->input->post('enabled');
|
||||
|
||||
if ($enabled === 'true')
|
||||
{
|
||||
$toggleExtension = $this->extensionslib->enableExtension($extension_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$toggleExtension = $this->extensionslib->disableExtension($extension_id);
|
||||
}
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($toggleExtension));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function delExtension()
|
||||
{
|
||||
$delExtension = false;
|
||||
|
||||
$extension_id = $this->input->post('extension_id');
|
||||
|
||||
$delExtension = $this->extensionslib->delExtension($extension_id);
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($delExtension));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function uploadExtension()
|
||||
{
|
||||
$this->extensionslib->installExtension();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user