PluginProbe
FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager / 1.2
FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager v1.2
10.56 1.2.1 10 10.1 10.2 10.3 10.31 10.32 10.33 10.34 10.50 10.51 10.52 10.53 10.55 9.0 9.0.1 9.4 trunk 1.0.0 1.1 1.2
easy-code-manager / controllers / installer.php

installer.php in FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager 1.2, at controllers/installer.php

97 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 *
4 */
5
6 // Disallow direct access.
7 defined('ABSPATH') or die("Access denied");
8
9 // import dependencies.
10 cssJSToolbox::import('framework:mvc:controller-ajax.inc.php');
11
12 /**
13 *
14 */
15 class CJTInstallerController extends CJTAjaxController {
16
17 /**
18 * put your comment there...
19 *
20 * @var mixed
21 */
22 protected $controllerInfo = array('model' => 'installer');
23
24 /**
25 * put your comment there...
26 *
27 */
28 public function __construct() {
29 parent::__construct();
30 // Register actions!
31 $this->registryAction('install');
32 $this->registryAction('dismissNotice');
33 $this->registryAction('dismissWarningNotice');
34 }
35
36 /**
37 * put your comment there...
38 *
39 */
40 public function dismissNoticeAction() {
41 $this->model->dismissNotice(true);
42 $this->response = true;
43 }
44
45 public function dismissWarningNoticeAction() {
46 $this->model->dismissWarningNotice(true);
47 $this->response = true;
48 }
49
50 /**
51 * put your comment there...
52 *
53 */
54 protected function installAction()
55 {
56
57 // Installa requested operation.
58 $input['operation'] = $_REQUEST['operation'];
59
60 // Allow extension to process thier owen operations
61 $processed = apply_filters(
62 CJTPluggableHelper::FILTER_INSTALLER_INSTALL_OPERATION,
63 false,
64 $input['operation']
65 );
66
67 if ($processed)
68 {
69 $this->response = $processed;
70
71 return;
72 }
73
74 // Process installer operation
75 try
76 {
77
78 $model =& $this->model;
79
80 $this->response = $model->setInput($input)->install();
81 }
82 catch (Exception $exception)
83 {
84
85 header('HTTP/1.1 501');
86
87 $this->response = $exception->getMessage();
88
89 echo $this->response;
90
91 die();
92 }
93
94 }
95
96 } // End class.
97