Completed
Pull Request — master (#2)
by Michael
07:48
created
admin/getMysql.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 }
25 25
 
26 26
 /**
27
- * @return AdminerCustomization
27
+ * @return AdminerKfr
28 28
  */
29 29
 function adminer_object()
30 30
 {
Please login to merge, or discard this patch.
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 include_once __DIR__ . '/admin_header.php';
21 21
 
22 22
 if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
23
-    exit(_NOPERM);
23
+	exit(_NOPERM);
24 24
 }
25 25
 
26 26
 /**
@@ -28,38 +28,38 @@  discard block
 block discarded – undo
28 28
  */
29 29
 function adminer_object()
30 30
 {
31
-    // required to run any plugin
32
-    include_once dirname(__DIR__) . '/include/plugins/plugin.php';
33
-    //    include_once dirname(__DIR__) . "/include/plugins/plugin.php";
34
-    include_once dirname(__DIR__) . '/include/plugins/frames.php';
31
+	// required to run any plugin
32
+	include_once dirname(__DIR__) . '/include/plugins/plugin.php';
33
+	//    include_once dirname(__DIR__) . "/include/plugins/plugin.php";
34
+	include_once dirname(__DIR__) . '/include/plugins/frames.php';
35 35
 
36
-    // autoloader
37
-    //    foreach (glob("plugins/*.php") as $filename) {
38
-    //        include_once "./$filename";
39
-    //    }
36
+	// autoloader
37
+	//    foreach (glob("plugins/*.php") as $filename) {
38
+	//        include_once "./$filename";
39
+	//    }
40 40
 
41
-    $plugins = array(
42
-        // specify enabled plugins here
43
-        //        new AdminerDumpXml,
44
-        //        new AdminerTinymce,
45
-        //        new AdminerFileUpload("data/"),
46
-        //        new AdminerSlugify,
47
-        //        new AdminerTranslation,
48
-        //        new AdminerForeignSystem,
49
-        new AdminerFrames
50
-    );
41
+	$plugins = array(
42
+		// specify enabled plugins here
43
+		//        new AdminerDumpXml,
44
+		//        new AdminerTinymce,
45
+		//        new AdminerFileUpload("data/"),
46
+		//        new AdminerSlugify,
47
+		//        new AdminerTranslation,
48
+		//        new AdminerForeignSystem,
49
+		new AdminerFrames
50
+	);
51 51
 
52
-    //    It is possible to combine customization and plugins:
53
-    /**
54
-     * Class AdminerCustomization
55
-     */
56
-    class AdminerCustomization extends AdminerPlugin
57
-    {
58
-    }
52
+	//    It is possible to combine customization and plugins:
53
+	/**
54
+	 * Class AdminerCustomization
55
+	 */
56
+	class AdminerCustomization extends AdminerPlugin
57
+	{
58
+	}
59 59
 
60
-    return new AdminerCustomization($plugins);
60
+	return new AdminerCustomization($plugins);
61 61
 
62
-    //    return new AdminerPlugin($plugins);
62
+	//    return new AdminerPlugin($plugins);
63 63
 }
64 64
 
65 65
 // include original Adminer or Adminer Editor
Please login to merge, or discard this patch.
include/plugins/plugin.php 2 patches
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -10,6 +10,9 @@  discard block
 block discarded – undo
10 10
 	/** @access protected */
11 11
 	var $plugins;
12 12
 	
13
+	/**
14
+	 * @return string
15
+	 */
13 16
 	function _findRootClass($class) { // is_subclass_of(string, string) is available since PHP 5.0.3
14 17
 		do {
15 18
 			$return = $class;
@@ -19,6 +22,7 @@  discard block
 block discarded – undo
19 22
 	
20 23
 	/** Register plugins
21 24
 	* @param array object instances or null to register all classes starting by 'Adminer'
25
+	* @param AdminerFrames[] $plugins
22 26
 	*/
23 27
 	function __construct($plugins) {
24 28
 		if ($plugins === null) {
@@ -37,6 +41,9 @@  discard block
 block discarded – undo
37 41
 		return call_user_func_array(array('parent', $function), $args);
38 42
 	}
39 43
 	
44
+	/**
45
+	 * @param string $function
46
+	 */
40 47
 	function _applyPlugin($function, $args) {
41 48
 		foreach ($this->plugins as $plugin) {
42 49
 			if (method_exists($plugin, $function)) {
@@ -58,6 +65,9 @@  discard block
 block discarded – undo
58 65
 		return $this->_callParent($function, $args);
59 66
 	}
60 67
 	
68
+	/**
69
+	 * @param string $function
70
+	 */
61 71
 	function _appendPlugin($function, $args) {
62 72
 		$return = $this->_callParent($function, $args);
63 73
 		foreach ($this->plugins as $plugin) {
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
 	}
19 19
 	
20 20
 	/** Register plugins
21
-	* @param array object instances or null to register all classes starting by 'Adminer'
22
-	*/
21
+	 * @param array object instances or null to register all classes starting by 'Adminer'
22
+	 */
23 23
 	function __construct($plugins) {
24 24
 		if ($plugins === null) {
25 25
 			$plugins = array();
Please login to merge, or discard this patch.
index.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
 $moduleDirName = basename(__DIR__);
23 23
 if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
24
-    exit(_NOPERM);
24
+	exit(_NOPERM);
25 25
 }
26 26
 $xoopsOption['template_main'] = $moduleDirName . '_index.tpl';
27 27
 
Please login to merge, or discard this patch.
xoops_version.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
 $modversion['min_xoops']           = '2.5.8';
42 42
 $modversion['min_admin']           = '1.2';
43 43
 $modversion['min_db']              = array(
44
-    'mysql'  => '5.0.7',
45
-    'mysqli' => '5.0.7'
44
+	'mysql'  => '5.0.7',
45
+	'mysqli' => '5.0.7'
46 46
 );
47 47
 
48 48
 // Menu
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
  * @author              Kris <http://www.xoofoo.org>
17 17
  * @version             $Id $
18 18
  **/
19
-$moduleDirName               = basename(__DIR__);
19
+$moduleDirName = basename(__DIR__);
20 20
 $modversion['name']           = _MI_ADMINER_NAME;
21 21
 $modversion['version']        = 3.1;
22 22
 $modversion['description']    = _MI_ADMINER_DESC;
Please login to merge, or discard this patch.
dump.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 defined('XOOPS_ROOT_PATH') || include dirname(dirname(__DIR__)) . '/mainfile.php';
21 21
 
22 22
 if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
23
-    exit(_NOPERM);
23
+	exit(_NOPERM);
24 24
 }
25 25
 include(XOOPS_ROOT_PATH . '/header.php');
26 26
 include __DIR__ . '/include/bigdump.php';
Please login to merge, or discard this patch.
admin/getBigdump.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 //global $xoopsUser, $xoopsModule;
24 24
 
25 25
 if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
26
-    exit(_NOPERM);
26
+	exit(_NOPERM);
27 27
 }
28 28
 //include(XOOPS_ROOT_PATH."/header.php");
29 29
 include dirname(__DIR__) . '/include/bigdump.php';
Please login to merge, or discard this patch.
admin/dump.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 xoops_cp_header();
23 23
 
24 24
 if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
25
-    exit(_NOPERM);
25
+	exit(_NOPERM);
26 26
 }
27 27
 
28 28
 $aboutAdmin = new ModuleAdmin();
Please login to merge, or discard this patch.
admin/mysql.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 xoops_cp_header();
22 22
 
23 23
 if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
24
-    exit(_NOPERM);
24
+	exit(_NOPERM);
25 25
 }
26 26
 
27 27
 $aboutAdmin = new ModuleAdmin();
Please login to merge, or discard this patch.
admin/editor.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 xoops_cp_header();
22 22
 
23 23
 if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
24
-    exit(_NOPERM);
24
+	exit(_NOPERM);
25 25
 }
26 26
 
27 27
 $aboutAdmin = new ModuleAdmin();
Please login to merge, or discard this patch.