Passed
Branch feature/2.1-geodispersion-dev (38d49e)
by Jonathan
04:17
created
src/Webtrees/Hook/HookInterfaces/FactSourceTextExtenderInterface.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
  /**
3
- * webtrees-lib: MyArtJaub library for webtrees
4
- *
5
- * @package MyArtJaub\Webtrees
6
- * @subpackage Hook
7
- * @author Jonathan Jaubart <[email protected]>
8
- * @copyright Copyright (c) 2011-2016, Jonathan Jaubart
9
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
- */
3
+  * webtrees-lib: MyArtJaub library for webtrees
4
+  *
5
+  * @package MyArtJaub\Webtrees
6
+  * @subpackage Hook
7
+  * @author Jonathan Jaubart <[email protected]>
8
+  * @copyright Copyright (c) 2011-2016, Jonathan Jaubart
9
+  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
+  */
11 11
 namespace MyArtJaub\Webtrees\Hook\HookInterfaces;
12 12
 
13 13
 /**
Please login to merge, or discard this patch.
src/Webtrees/Hook/HookInterfaces/PageHeaderExtenderInterface.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
  /**
3
- * webtrees-lib: MyArtJaub library for webtrees
4
- *
5
- * @package MyArtJaub\Webtrees
6
- * @subpackage Hook
7
- * @author Jonathan Jaubart <[email protected]>
8
- * @copyright Copyright (c) 2011-2016, Jonathan Jaubart
9
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
- */
3
+  * webtrees-lib: MyArtJaub library for webtrees
4
+  *
5
+  * @package MyArtJaub\Webtrees
6
+  * @subpackage Hook
7
+  * @author Jonathan Jaubart <[email protected]>
8
+  * @copyright Copyright (c) 2011-2016, Jonathan Jaubart
9
+  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
+  */
11 11
 namespace MyArtJaub\Webtrees\Hook\HookInterfaces;
12 12
 
13 13
 /**
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
  */
16 16
 interface PageHeaderExtenderInterface {
17 17
 		
18
-    /**
19
-     * Get HTML code for extending the header of a page.
20
-     * 
21
-     * @return string HTML code extension
22
-     */
23
-    public function hPrintHeader();
18
+	/**
19
+	 * Get HTML code for extending the header of a page.
20
+	 * 
21
+	 * @return string HTML code extension
22
+	 */
23
+	public function hPrintHeader();
24 24
 	
25 25
 }
26 26
 
Please login to merge, or discard this patch.
src/Webtrees/Hook/HookInterfaces/PageFooterExtenderInterface.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
  /**
3
- * webtrees-lib: MyArtJaub library for webtrees
4
- *
5
- * @package MyArtJaub\Webtrees
6
- * @subpackage Hook
7
- * @author Jonathan Jaubart <[email protected]>
8
- * @copyright Copyright (c) 2011-2016, Jonathan Jaubart
9
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
- */
3
+  * webtrees-lib: MyArtJaub library for webtrees
4
+  *
5
+  * @package MyArtJaub\Webtrees
6
+  * @subpackage Hook
7
+  * @author Jonathan Jaubart <[email protected]>
8
+  * @copyright Copyright (c) 2011-2016, Jonathan Jaubart
9
+  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
+  */
11 11
 namespace MyArtJaub\Webtrees\Hook\HookInterfaces;
12 12
 
13 13
 /**
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
  */
16 16
 interface PageFooterExtenderInterface {
17 17
 		
18
-    /**
19
-     * Get HTML code for extending the footer of a page.
20
-     * 
21
-     * @return string HTML code extension
22
-     */
23
-    public function hPrintFooter();
18
+	/**
19
+	 * Get HTML code for extending the footer of a page.
20
+	 * 
21
+	 * @return string HTML code extension
22
+	 */
23
+	public function hPrintFooter();
24 24
 	
25 25
 }
26 26
 
Please login to merge, or discard this patch.
src/Webtrees/Hook/HookInterfaces/IndividualHeaderExtenderInterface.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
  /**
3
- * webtrees-lib: MyArtJaub library for webtrees
4
- *
5
- * @package MyArtJaub\Webtrees
6
- * @subpackage Hook
7
- * @author Jonathan Jaubart <[email protected]>
8
- * @copyright Copyright (c) 2011-2016, Jonathan Jaubart
9
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
- */
3
+  * webtrees-lib: MyArtJaub library for webtrees
4
+  *
5
+  * @package MyArtJaub\Webtrees
6
+  * @subpackage Hook
7
+  * @author Jonathan Jaubart <[email protected]>
8
+  * @copyright Copyright (c) 2011-2016, Jonathan Jaubart
9
+  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
+  */
11 11
 namespace MyArtJaub\Webtrees\Hook\HookInterfaces;
12 12
 
13 13
 use Fisharebest\Webtrees\Controller\IndividualController;
Please login to merge, or discard this patch.
src/Webtrees/Hook/HookInterfaces/CustomSimpleTagManagerInterface.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
  /**
3
- * webtrees-lib: MyArtJaub library for webtrees
4
- *
5
- * @package MyArtJaub\Webtrees
6
- * @subpackage Hook
7
- * @author Jonathan Jaubart <[email protected]>
8
- * @copyright Copyright (c) 2011-2016, Jonathan Jaubart
9
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
- */
3
+  * webtrees-lib: MyArtJaub library for webtrees
4
+  *
5
+  * @package MyArtJaub\Webtrees
6
+  * @subpackage Hook
7
+  * @author Jonathan Jaubart <[email protected]>
8
+  * @copyright Copyright (c) 2011-2016, Jonathan Jaubart
9
+  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
+  */
11 11
 namespace MyArtJaub\Webtrees\Hook\HookInterfaces;
12 12
 
13 13
 /**
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
 interface CustomSimpleTagManagerInterface {
19 19
 
20 20
 
21
-    /**
22
-     * Returns the list of expected tags, classified by type of records.
23
-     *
24
-     * @return array List of expected tags
25
-     */
26
-    public function hGetExpectedTags();
21
+	/**
22
+	 * Returns the list of expected tags, classified by type of records.
23
+	 *
24
+	 * @return array List of expected tags
25
+	 */
26
+	public function hGetExpectedTags();
27 27
     
28 28
 	/**
29 29
 	 * Return the HTML code to be display for this tag.
Please login to merge, or discard this patch.
src/Webtrees/Hook/Hook.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
  /**
3
- * webtrees-lib: MyArtJaub library for webtrees
4
- *
5
- * @package MyArtJaub\Webtrees
6
- * @subpackage Hook
7
- * @author Jonathan Jaubart <[email protected]>
8
- * @copyright Copyright (c) 2011-2016, Jonathan Jaubart
9
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
- */
3
+  * webtrees-lib: MyArtJaub library for webtrees
4
+  *
5
+  * @package MyArtJaub\Webtrees
6
+  * @subpackage Hook
7
+  * @author Jonathan Jaubart <[email protected]>
8
+  * @copyright Copyright (c) 2011-2016, Jonathan Jaubart
9
+  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
+  */
11 11
 namespace MyArtJaub\Webtrees\Hook;
12 12
 
13 13
 use Fisharebest\Webtrees\Database;
@@ -137,17 +137,17 @@  discard block
 block discarded – undo
137 137
 	 * @return array Results of the hook executions
138 138
 	 */
139 139
 	public function executeOnlyFor(array $module_names) {
140
-	    $result = array();
141
-	    if(HookProvider::getInstance()->isModuleOperational()){
142
-	       $params = func_get_args();
143
-	       array_shift($params);
144
-    	    foreach ($module_names as $module_name) {
145
-    	        if($module = Module::getModuleByName($module_name)) {
146
-    	            $result[] = call_user_func_array(array($module, $this->hook_function), $params);
147
-    	        }
148
-    	    }
149
-	    }
150
-	    return $result;
140
+		$result = array();
141
+		if(HookProvider::getInstance()->isModuleOperational()){
142
+		   $params = func_get_args();
143
+		   array_shift($params);
144
+			foreach ($module_names as $module_name) {
145
+				if($module = Module::getModuleByName($module_name)) {
146
+					$result[] = call_user_func_array(array($module, $this->hook_function), $params);
147
+				}
148
+			}
149
+		}
150
+		return $result;
151 151
 	}
152 152
 
153 153
 	/**
Please login to merge, or discard this patch.
src/Webtrees/Mvc/View/AbstractView.php 1 patch
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -15,66 +15,66 @@
 block discarded – undo
15 15
  */
16 16
 abstract class AbstractView {
17 17
     
18
-    /**
19
-     * Reference controller
20
-     * @var \Fisharebest\Webtrees\Controller\BaseController $ctrl
21
-     */
22
-    protected $ctrl;
18
+	/**
19
+	 * Reference controller
20
+	 * @var \Fisharebest\Webtrees\Controller\BaseController $ctrl
21
+	 */
22
+	protected $ctrl;
23 23
     
24
-    /**
25
-     * Structure containing the data of the view
26
-     * @var ViewBag $data
27
-     */
28
-    protected $data;
24
+	/**
25
+	 * Structure containing the data of the view
26
+	 * @var ViewBag $data
27
+	 */
28
+	protected $data;
29 29
     
30
-    /**
31
-     * Constructor 
32
-     * @param \Fisharebest\Webtrees\Controller\BaseController $ctrl Controller
33
-     * @param ViewBag $data ViewBag holding view data
34
-     */
35
-    public function __construct(\Fisharebest\Webtrees\Controller\BaseController $ctrl, ViewBag $data) {
36
-        $this->ctrl = $ctrl;
37
-        $this->data = $data;
38
-    }
30
+	/**
31
+	 * Constructor 
32
+	 * @param \Fisharebest\Webtrees\Controller\BaseController $ctrl Controller
33
+	 * @param ViewBag $data ViewBag holding view data
34
+	 */
35
+	public function __construct(\Fisharebest\Webtrees\Controller\BaseController $ctrl, ViewBag $data) {
36
+		$this->ctrl = $ctrl;
37
+		$this->data = $data;
38
+	}
39 39
     
40
-    /**
41
-     * Render the view to the page, including header.
42
-     * 
43
-     * @throws \Exception
44
-     */
45
-    public function render() {
46
-        global $controller;        
40
+	/**
41
+	 * Render the view to the page, including header.
42
+	 * 
43
+	 * @throws \Exception
44
+	 */
45
+	public function render() {
46
+		global $controller;        
47 47
         
48
-        if(!$this->ctrl) throw new \Exception('Controller not initialised');
48
+		if(!$this->ctrl) throw new \Exception('Controller not initialised');
49 49
         
50 50
 		$controller = $this->ctrl;
51
-        $this->ctrl->pageHeader();
51
+		$this->ctrl->pageHeader();
52 52
         
53
-        echo $this->renderContent();
54
-    }
53
+		echo $this->renderContent();
54
+	}
55 55
     
56
-    /**
57
-     * Render the view to the page, without any header
58
-     */
59
-    public function renderPartial() {
60
-        echo $this->getHtmlPartial();
61
-    }
56
+	/**
57
+	 * Render the view to the page, without any header
58
+	 */
59
+	public function renderPartial() {
60
+		echo $this->getHtmlPartial();
61
+	}
62 62
     
63
-    /**
64
-     * Return the HTML code generated by the view, without any header
65
-     */
66
-    public function getHtmlPartial() {
67
-        ob_start();
68
-        $html_render = $this->renderContent();
69
-        $html_buffer = ob_get_clean();        
63
+	/**
64
+	 * Return the HTML code generated by the view, without any header
65
+	 */
66
+	public function getHtmlPartial() {
67
+		ob_start();
68
+		$html_render = $this->renderContent();
69
+		$html_buffer = ob_get_clean();        
70 70
         
71
-        return empty($html_render) ? $html_buffer : $html_render;
72
-    }
71
+		return empty($html_render) ? $html_buffer : $html_render;
72
+	}
73 73
     
74
-    /**
75
-     * Abstract method containing the details of the view.
76
-     */
77
-    abstract protected function renderContent();
74
+	/**
75
+	 * Abstract method containing the details of the view.
76
+	 */
77
+	abstract protected function renderContent();
78 78
     
79 79
 }
80 80
  
81 81
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Module/MiscExtensions/AdminConfigController.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -27,52 +27,52 @@
 block discarded – undo
27 27
  */
28 28
 class AdminConfigController extends MvcController
29 29
 {    
30
-    /**
31
-     * Manage updates sent from the AdminConfig@index form.
32
-     */
33
-    protected function update() {    
34
-        if(Auth::isAdmin()){
30
+	/**
31
+	 * Manage updates sent from the AdminConfig@index form.
32
+	 */
33
+	protected function update() {    
34
+		if(Auth::isAdmin()){
35 35
     
36
-            $this->module->setSetting('MAJ_TITLE_PREFIX', Filter::post('MAJ_TITLE_PREFIX'));
36
+			$this->module->setSetting('MAJ_TITLE_PREFIX', Filter::post('MAJ_TITLE_PREFIX'));
37 37
             
38
-            $this->module->setSetting('MAJ_ADD_HTML_HEADER', Filter::postInteger('MAJ_ADD_HTML_HEADER', 0, 1));
39
-            $this->module->setSetting('MAJ_SHOW_HTML_HEADER', Filter::postInteger('MAJ_SHOW_HTML_HEADER', Auth::PRIV_HIDE, Auth::PRIV_PRIVATE, Auth::PRIV_HIDE));
40
-            $this->module->setSetting('MAJ_HTML_HEADER', Filter::post('MAJ_HTML_HEADER'));
38
+			$this->module->setSetting('MAJ_ADD_HTML_HEADER', Filter::postInteger('MAJ_ADD_HTML_HEADER', 0, 1));
39
+			$this->module->setSetting('MAJ_SHOW_HTML_HEADER', Filter::postInteger('MAJ_SHOW_HTML_HEADER', Auth::PRIV_HIDE, Auth::PRIV_PRIVATE, Auth::PRIV_HIDE));
40
+			$this->module->setSetting('MAJ_HTML_HEADER', Filter::post('MAJ_HTML_HEADER'));
41 41
             
42
-            $this->module->setSetting('MAJ_ADD_HTML_FOOTER', Filter::postInteger('MAJ_ADD_HTML_FOOTER', 0, 1));
43
-            $this->module->setSetting('MAJ_SHOW_HTML_FOOTER', Filter::postInteger('MAJ_SHOW_HTML_FOOTER', Auth::PRIV_HIDE, Auth::PRIV_PRIVATE, Auth::PRIV_HIDE));
44
-            $this->module->setSetting('MAJ_HTML_FOOTER', Filter::post('MAJ_HTML_FOOTER'));
42
+			$this->module->setSetting('MAJ_ADD_HTML_FOOTER', Filter::postInteger('MAJ_ADD_HTML_FOOTER', 0, 1));
43
+			$this->module->setSetting('MAJ_SHOW_HTML_FOOTER', Filter::postInteger('MAJ_SHOW_HTML_FOOTER', Auth::PRIV_HIDE, Auth::PRIV_PRIVATE, Auth::PRIV_HIDE));
44
+			$this->module->setSetting('MAJ_HTML_FOOTER', Filter::post('MAJ_HTML_FOOTER'));
45 45
             
46
-            $this->module->setSetting('MAJ_DISPLAY_CNIL', Filter::postInteger('MAJ_DISPLAY_CNIL', 0, 1));
47
-            $this->module->setSetting('MAJ_CNIL_REFERENCE', Filter::post('MAJ_CNIL_REFERENCE'));
46
+			$this->module->setSetting('MAJ_DISPLAY_CNIL', Filter::postInteger('MAJ_DISPLAY_CNIL', 0, 1));
47
+			$this->module->setSetting('MAJ_CNIL_REFERENCE', Filter::post('MAJ_CNIL_REFERENCE'));
48 48
                 
49
-            FlashMessages::addMessage(I18N::translate('The preferences for the module “%s” have been updated.', $this->module->getTitle()), 'success');
49
+			FlashMessages::addMessage(I18N::translate('The preferences for the module “%s” have been updated.', $this->module->getTitle()), 'success');
50 50
     
51
-            return;
52
-        }
53
-    }
51
+			return;
52
+		}
53
+	}
54 54
     
55
-    /**
56
-     * Pages
57
-     */
55
+	/**
56
+	 * Pages
57
+	 */
58 58
         
59
-    /**
60
-     * AdminConfig@index
61
-     */
62
-    public function index() {
63
-        $action = Filter::post('action');        
64
-        if($action == 'update' && Filter::checkCsrf()) $this->update();
59
+	/**
60
+	 * AdminConfig@index
61
+	 */
62
+	public function index() {
63
+		$action = Filter::post('action');        
64
+		if($action == 'update' && Filter::checkCsrf()) $this->update();
65 65
         
66
-        Theme::theme(new AdministrationTheme)->init(Globals::getTree());        
67
-        $ctrl = new PageController();
68
-        $ctrl
69
-            ->restrictAccess(Auth::isAdmin())
70
-            ->setPageTitle($this->module->getTitle());
66
+		Theme::theme(new AdministrationTheme)->init(Globals::getTree());        
67
+		$ctrl = new PageController();
68
+		$ctrl
69
+			->restrictAccess(Auth::isAdmin())
70
+			->setPageTitle($this->module->getTitle());
71 71
             
72
-        $view_bag = new ViewBag();
73
-        $view_bag->set('title', $ctrl->getPageTitle());
74
-        $view_bag->set('module', $this->module);
72
+		$view_bag = new ViewBag();
73
+		$view_bag->set('title', $ctrl->getPageTitle());
74
+		$view_bag->set('module', $this->module);
75 75
         
76
-        ViewFactory::make('AdminConfig', $this, $ctrl, $view_bag)->render();
77
-    }
76
+		ViewFactory::make('AdminConfig', $this, $ctrl, $view_bag)->render();
77
+	}
78 78
 }
79 79
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Module/Hooks/AdminConfigController.php 1 patch
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -30,87 +30,87 @@  discard block
 block discarded – undo
30 30
  */
31 31
 class AdminConfigController extends MvcController
32 32
 {
33
-    /**
34
-     * Manage updates sent from the AdminConfig@index form.
35
-     */
36
-    protected function update() {
37
-        if(Auth::isAdmin()){
38
-            $ihooks = HookProvider::getInstance()->getInstalledHooks();
33
+	/**
34
+	 * Manage updates sent from the AdminConfig@index form.
35
+	 */
36
+	protected function update() {
37
+		if(Auth::isAdmin()){
38
+			$ihooks = HookProvider::getInstance()->getInstalledHooks();
39 39
             	
40
-            $module_names= Database::prepare(
41
-                "SELECT module_name FROM `##module` WHERE status='disabled'"
42
-            )->fetchOneColumn();
40
+			$module_names= Database::prepare(
41
+				"SELECT module_name FROM `##module` WHERE status='disabled'"
42
+			)->fetchOneColumn();
43 43
             	
44
-            if($ihooks !== null){
45
-                foreach ($ihooks as $ihook => $params) {
46
-                    if(Filter::post('hook-' . $params['id']) === 'yes') {                    
47
-                        $array_hook = explode('#', $ihook);
48
-                        //Update status
49
-                        $new_status= Filter::postBool('status-' . $params['id']);
50
-                        if(in_array($array_hook[0], $module_names)) $new_status = false;
51
-                        $previous_status = $params['status'];
52
-                        if ($new_status !== null) {
53
-                            $new_status= $new_status ? 'enabled' : 'disabled';
54
-                            if($new_status != $previous_status){
55
-                                $chook = new Hook($array_hook[1], $array_hook[2]);
56
-                                switch($new_status){
57
-                                    case 'enabled':
58
-                                        $chook->enable($array_hook[0]);
59
-                                        break;
60
-                                    case 'disabled':
61
-                                        $chook->disable($array_hook[0]);
62
-                                        break;
63
-                                    default:
64
-                                        break;
65
-                                }
66
-                            }
67
-                        }
44
+			if($ihooks !== null){
45
+				foreach ($ihooks as $ihook => $params) {
46
+					if(Filter::post('hook-' . $params['id']) === 'yes') {                    
47
+						$array_hook = explode('#', $ihook);
48
+						//Update status
49
+						$new_status= Filter::postBool('status-' . $params['id']);
50
+						if(in_array($array_hook[0], $module_names)) $new_status = false;
51
+						$previous_status = $params['status'];
52
+						if ($new_status !== null) {
53
+							$new_status= $new_status ? 'enabled' : 'disabled';
54
+							if($new_status != $previous_status){
55
+								$chook = new Hook($array_hook[1], $array_hook[2]);
56
+								switch($new_status){
57
+									case 'enabled':
58
+										$chook->enable($array_hook[0]);
59
+										break;
60
+									case 'disabled':
61
+										$chook->disable($array_hook[0]);
62
+										break;
63
+									default:
64
+										break;
65
+								}
66
+							}
67
+						}
68 68
                         
69
-                        //Update priority
70
-                        $new_priority = Filter::postInteger("moduleorder-{$params['id']}");
71
-                        $previous_priority = $params['priority'];
72
-                        if ($new_priority !== null) {
73
-                            if($new_priority != $previous_priority){
74
-                                $chook = new Hook($array_hook[1], $array_hook[2]);
75
-                                $chook->setPriority($array_hook[0], $new_priority);
76
-                            }
77
-                        }
78
-                    }
79
-                }
80
-            }
81
-        }
82
-    }
69
+						//Update priority
70
+						$new_priority = Filter::postInteger("moduleorder-{$params['id']}");
71
+						$previous_priority = $params['priority'];
72
+						if ($new_priority !== null) {
73
+							if($new_priority != $previous_priority){
74
+								$chook = new Hook($array_hook[1], $array_hook[2]);
75
+								$chook->setPriority($array_hook[0], $new_priority);
76
+							}
77
+						}
78
+					}
79
+				}
80
+			}
81
+		}
82
+	}
83 83
     
84
-    /**
85
-     * Pages
86
-     */
84
+	/**
85
+	 * Pages
86
+	 */
87 87
         
88
-    /**
89
-     * AdminConfig@index
90
-     */
91
-    public function index() {            
92
-        HookProvider::getInstance()->updateHooks();
88
+	/**
89
+	 * AdminConfig@index
90
+	 */
91
+	public function index() {            
92
+		HookProvider::getInstance()->updateHooks();
93 93
         
94
-        $action = Filter::post('action');        
95
-        if($action == 'update' && Filter::checkCsrf()) $this->update();
94
+		$action = Filter::post('action');        
95
+		if($action == 'update' && Filter::checkCsrf()) $this->update();
96 96
         
97
-        Theme::theme(new AdministrationTheme)->init(Globals::getTree());        
98
-        $ctrl = new PageController();
99
-        $ctrl
100
-            ->restrictAccess(Auth::isAdmin())
101
-            ->setPageTitle($this->module->getTitle());
97
+		Theme::theme(new AdministrationTheme)->init(Globals::getTree());        
98
+		$ctrl = new PageController();
99
+		$ctrl
100
+			->restrictAccess(Auth::isAdmin())
101
+			->setPageTitle($this->module->getTitle());
102 102
         
103
-        $table_id = 'table-installedhooks-' . Uuid::uuid4();
103
+		$table_id = 'table-installedhooks-' . Uuid::uuid4();
104 104
 
105
-        $view_bag = new ViewBag();
106
-        $view_bag->set('title', $ctrl->getPageTitle());
107
-        $view_bag->set('table_id', $table_id);
108
-        $view_bag->set('hook_list', HookProvider::getInstance()->getRawInstalledHooks());
105
+		$view_bag = new ViewBag();
106
+		$view_bag->set('title', $ctrl->getPageTitle());
107
+		$view_bag->set('table_id', $table_id);
108
+		$view_bag->set('hook_list', HookProvider::getInstance()->getRawInstalledHooks());
109 109
         
110
-        $ctrl
111
-        ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
112
-        ->addExternalJavascript(WT_DATATABLES_BOOTSTRAP_JS_URL)
113
-        ->addInlineJavascript('
110
+		$ctrl
111
+		->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
112
+		->addExternalJavascript(WT_DATATABLES_BOOTSTRAP_JS_URL)
113
+		->addInlineJavascript('
114 114
 		  	jQuery(document).ready(function() {
115 115
 				jQuery("#'.$table_id.'").dataTable( {
116 116
 					'.I18N::datatablesI18N().',		
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 			});
131 131
 		');
132 132
         
133
-        ViewFactory::make('AdminConfig', $this, $ctrl, $view_bag)->render();
134
-    }
133
+		ViewFactory::make('AdminConfig', $this, $ctrl, $view_bag)->render();
134
+	}
135 135
         
136 136
 }
137 137
\ No newline at end of file
Please login to merge, or discard this patch.