Completed
Branch master (623467)
by Michael
01:32
created
admin/about.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 require_once 'admin_header.php';
13 13
 xoops_cp_header();
14
-$adminObject  = \Xmf\Module\Admin::getInstance();
14
+$adminObject = \Xmf\Module\Admin::getInstance();
15 15
 $adminObject->displayNavigation(basename(__FILE__));
16 16
 \Xmf\Module\Admin::setPaypal('[email protected]');
17 17
 $adminObject->displayAbout(false);
Please login to merge, or discard this patch.
index.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@  discard block
 block discarded – undo
13 13
 
14 14
 $suplparam = '';
15 15
 if ( isset( $_GET ) ) {
16
-    foreach ( $_GET as $k => $v ) {
17
-        if(trim(strtoupper($k))!='IFRAMEID') {
16
+	foreach ( $_GET as $k => $v ) {
17
+		if(trim(strtoupper($k))!='IFRAMEID') {
18 18
 			$suplparam.= $k . '=' . $v . '&';
19 19
 		}
20
-    }
20
+	}
21 21
 }
22 22
 
23 23
 if(strlen(xoops_trim($suplparam))>0) {
@@ -56,27 +56,27 @@  discard block
 block discarded – undo
56 56
 		$xoopsTpl->assign('frame_error',_MYIFRAME_FRAME_ERROR);
57 57
 	}
58 58
 } else {
59
-    if(myiframe_getmoduleoption('showlist')) {
59
+	if(myiframe_getmoduleoption('showlist')) {
60 60
 	   $baseurl = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/index.php';
61 61
 	   $frarray = array();
62 62
 	   $critere = new Criteria('1', '1','=');
63 63
 	   $critere->setSort('frame_description');
64 64
 	   $frarray = $iframe_handler->getObjects($critere);
65 65
 	   if (count($frarray ) > 0) {
66
-           	foreach( $frarray as $frame ) {
67
-    			if(xoops_trim($frame->getVar('frame_description') =='')) {
68
-    				$liendesc = $frame->getVar('frame_url');
69
-    			} else {
70
-    				$liendesc = "<a href='".$baseurl.'?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . "</a>";
71
-    			}
72
-    			$iframe['list'] = $liendesc;
73
-    			$xoopsTpl->append('iframes', $iframe);
74
-    		}
75
-    	}
76
-    } else {
66
+		   	foreach( $frarray as $frame ) {
67
+				if(xoops_trim($frame->getVar('frame_description') =='')) {
68
+					$liendesc = $frame->getVar('frame_url');
69
+				} else {
70
+					$liendesc = "<a href='".$baseurl.'?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . "</a>";
71
+				}
72
+				$iframe['list'] = $liendesc;
73
+				$xoopsTpl->append('iframes', $iframe);
74
+			}
75
+		}
76
+	} else {
77 77
 		$xoopsTpl->assign('frameok',false);
78 78
 		$xoopsTpl->assign('frame_error',_MYIFRAME_FRAME_ERROR);
79
-    }
79
+	}
80 80
 }
81 81
 include(XOOPS_ROOT_PATH.'/footer.php');
82 82
 ?>
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -12,28 +12,28 @@  discard block
 block discarded – undo
12 12
 require_once(XOOPS_ROOT_PATH.'/header.php');
13 13
 
14 14
 $suplparam = '';
15
-if ( isset( $_GET ) ) {
16
-    foreach ( $_GET as $k => $v ) {
17
-        if(trim(strtoupper($k))!='IFRAMEID') {
18
-			$suplparam.= $k . '=' . $v . '&';
15
+if (isset($_GET)) {
16
+    foreach ($_GET as $k => $v) {
17
+        if (trim(strtoupper($k)) != 'IFRAMEID') {
18
+			$suplparam .= $k.'='.$v.'&';
19 19
 		}
20 20
     }
21 21
 }
22 22
 
23
-if(strlen(xoops_trim($suplparam))>0) {
24
-	$suplparam = substr($suplparam,0,strlen($suplparam)-1);
23
+if (strlen(xoops_trim($suplparam)) > 0) {
24
+	$suplparam = substr($suplparam, 0, strlen($suplparam)-1);
25 25
 }
26 26
 
27
-$iframe_handler =& xoops_getmodulehandler('myiframe', 'myiframe');
27
+$iframe_handler = & xoops_getmodulehandler('myiframe', 'myiframe');
28 28
 
29
-if(isset($_GET['iframeid'])) {
30
-	$tblalign = array('top','middle','bottom','left','rigth');
31
-	$tblscrolling = array('yes','no','auto');
29
+if (isset($_GET['iframeid'])) {
30
+	$tblalign = array('top', 'middle', 'bottom', 'left', 'rigth');
31
+	$tblscrolling = array('yes', 'no', 'auto');
32 32
 	$frameid = intval($_GET['iframeid']);
33 33
 
34 34
 	$frame = $iframe_handler->get($frameid);
35 35
 
36
-	if(is_object($frame)) {
36
+	if (is_object($frame)) {
37 37
 		$iframe_handler->updatehits($frameid);
38 38
 		$xoopsTpl->assign('frameok', true);
39 39
 		$xoopsTpl->assign('longdesc', $frame->getVar('frame_description'));
@@ -44,38 +44,38 @@  discard block
 block discarded – undo
44 44
 		$xoopsTpl->assign('marginwidth', $frame->getVar('frame_marginwidth'));
45 45
 		$xoopsTpl->assign('marginheight', $frame->getVar('frame_marginheight'));
46 46
 		$xoopsTpl->assign('scrolling', $tblscrolling[$frame->getVar('frame_scrolling')-1]);
47
-		if(xoops_trim($suplparam) != '') {
48
-			$xoopsTpl->assign('url', $frame->getVar('frame_url') . '?' . $suplparam);
47
+		if (xoops_trim($suplparam) != '') {
48
+			$xoopsTpl->assign('url', $frame->getVar('frame_url').'?'.$suplparam);
49 49
 		} else {
50 50
 			$xoopsTpl->assign('url', $frame->getVar('frame_url'));
51 51
 		}
52 52
 		$title = $frame->getVar('frame_description');
53 53
 		myiframe_set_metas($title, $title);
54 54
 	} else {
55
-		$xoopsTpl->assign('frameok',false);
56
-		$xoopsTpl->assign('frame_error',_MYIFRAME_FRAME_ERROR);
55
+		$xoopsTpl->assign('frameok', false);
56
+		$xoopsTpl->assign('frame_error', _MYIFRAME_FRAME_ERROR);
57 57
 	}
58 58
 } else {
59
-    if(myiframe_getmoduleoption('showlist')) {
59
+    if (myiframe_getmoduleoption('showlist')) {
60 60
 	   $baseurl = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/index.php';
61 61
 	   $frarray = array();
62
-	   $critere = new Criteria('1', '1','=');
62
+	   $critere = new Criteria('1', '1', '=');
63 63
 	   $critere->setSort('frame_description');
64 64
 	   $frarray = $iframe_handler->getObjects($critere);
65
-	   if (count($frarray ) > 0) {
66
-           	foreach( $frarray as $frame ) {
67
-    			if(xoops_trim($frame->getVar('frame_description') =='')) {
65
+	   if (count($frarray) > 0) {
66
+           	foreach ($frarray as $frame) {
67
+    			if (xoops_trim($frame->getVar('frame_description') == '')) {
68 68
     				$liendesc = $frame->getVar('frame_url');
69 69
     			} else {
70
-    				$liendesc = "<a href='".$baseurl.'?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . "</a>";
70
+    				$liendesc = "<a href='".$baseurl.'?iframeid='.$frame->getVar('frame_frameid')."'>".$frame->getVar('frame_description')."</a>";
71 71
     			}
72 72
     			$iframe['list'] = $liendesc;
73 73
     			$xoopsTpl->append('iframes', $iframe);
74 74
     		}
75 75
     	}
76 76
     } else {
77
-		$xoopsTpl->assign('frameok',false);
78
-		$xoopsTpl->assign('frame_error',_MYIFRAME_FRAME_ERROR);
77
+		$xoopsTpl->assign('frameok', false);
78
+		$xoopsTpl->assign('frame_error', _MYIFRAME_FRAME_ERROR);
79 79
     }
80 80
 }
81 81
 include(XOOPS_ROOT_PATH.'/footer.php');
Please login to merge, or discard this patch.
xoops_version.php 2 patches
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -11,75 +11,75 @@
 block discarded – undo
11 11
 }
12 12
 
13 13
 $modversion = array(
14
-              'name'              =>  _MI_MYIFRAME_NAME,
15
-              'version'           =>  1.65,
16
-              'description'       =>  _MI_MYIFRAME_DESC,
17
-              'credits'           =>  '',
18
-              'author'            =>  'Instant Zero - http://xoops.instant-zero.com',
19
-              'help'              =>  '',
20
-              'license'           =>  'GPL see LICENSE',
21
-              'official'          =>  0,
22
-              'image'             =>  'assets/images/myiframe.png',
23
-              'dirname'           =>  'myiframe',
24
-              'min_php'           =>  '5.5',
25
-              'min_db'            =>  array('mysql' => '5.5'),
26
-              'min_xoops'         =>  '2.5.8+',
27
-              'min_admin'         =>  '1.2',
28
-              'module_website_url'    =>  'www.xoops.org',
29
-              'module_website_name'   =>  'XOOPS',
30
-              'module_release'    =>  '05/07/2017',
31
-              'release_date'      =>  '2017/07/05',
32
-              'module_status'     =>  'Test',              
33
-              'system_menu'       =>  1,
34
-              //sql tables
35
-              'sqlfile'           =>  array('mysql' => 'sql/mysql.sql'),
36
-              'tables'            =>  array(
37
-                            'myiframe'
38
-              ),              
39
-              // Admin
40
-              'hasAdmin'          =>  1,
41
-              'adminindex'        =>  'admin/index.php',
42
-              'adminmenu'         =>  'admin/menu.php',
43
-              // Menu
44
-              'hasMain'           =>  1
14
+			  'name'              =>  _MI_MYIFRAME_NAME,
15
+			  'version'           =>  1.65,
16
+			  'description'       =>  _MI_MYIFRAME_DESC,
17
+			  'credits'           =>  '',
18
+			  'author'            =>  'Instant Zero - http://xoops.instant-zero.com',
19
+			  'help'              =>  '',
20
+			  'license'           =>  'GPL see LICENSE',
21
+			  'official'          =>  0,
22
+			  'image'             =>  'assets/images/myiframe.png',
23
+			  'dirname'           =>  'myiframe',
24
+			  'min_php'           =>  '5.5',
25
+			  'min_db'            =>  array('mysql' => '5.5'),
26
+			  'min_xoops'         =>  '2.5.8+',
27
+			  'min_admin'         =>  '1.2',
28
+			  'module_website_url'    =>  'www.xoops.org',
29
+			  'module_website_name'   =>  'XOOPS',
30
+			  'module_release'    =>  '05/07/2017',
31
+			  'release_date'      =>  '2017/07/05',
32
+			  'module_status'     =>  'Test',              
33
+			  'system_menu'       =>  1,
34
+			  //sql tables
35
+			  'sqlfile'           =>  array('mysql' => 'sql/mysql.sql'),
36
+			  'tables'            =>  array(
37
+							'myiframe'
38
+			  ),              
39
+			  // Admin
40
+			  'hasAdmin'          =>  1,
41
+			  'adminindex'        =>  'admin/index.php',
42
+			  'adminmenu'         =>  'admin/menu.php',
43
+			  // Menu
44
+			  'hasMain'           =>  1
45 45
 );
46 46
 
47 47
 // Templates
48 48
 $modversion['templates'] = array(
49
-    array(
50
-          'file'          =>  'myiframe.tpl',
51
-          'description'   =>  'Default template'
52
-    ),
49
+	array(
50
+		  'file'          =>  'myiframe.tpl',
51
+		  'description'   =>  'Default template'
52
+	),
53 53
 );
54 54
 
55 55
 //Blocks    
56 56
 $modversion['blocks'][] = array(
57
-          'file'          =>  'myiframe_iframe.php',
58
-          'name'          =>  _MI_MYIFAME_BNAME1,
59
-          'description'   =>  'Shows an iframe in a block',
60
-          'show_func'     =>  'b_myiframe_iframe_show',
61
-          'edit_func'     =>  'b_myiframe_iframe_edit',
62
-          'options'       =>  '0',
63
-          'template'      =>  'myiframe_block_show.tpl'
57
+		  'file'          =>  'myiframe_iframe.php',
58
+		  'name'          =>  _MI_MYIFAME_BNAME1,
59
+		  'description'   =>  'Shows an iframe in a block',
60
+		  'show_func'     =>  'b_myiframe_iframe_show',
61
+		  'edit_func'     =>  'b_myiframe_iframe_edit',
62
+		  'options'       =>  '0',
63
+		  'template'      =>  'myiframe_block_show.tpl'
64 64
 );
65 65
 
66 66
 global $xoopsDB, $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig;
67 67
 
68 68
 if(is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname'] && $xoopsModule->getVar('isactive')) {
69
-    $i = 0;
70
-    include_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php';
71
-    $myts = MyTextSanitizer::getInstance();
72
-    if(myiframe_getmoduleoption('showinmenu')) {
73
-        $sql = "SELECT * FROM ".$xoopsDB->prefix('myiframe')." ORDER BY frame_description";
74
-        $result = $xoopsDB->query($sql);
75
-        while($myrow = $xoopsDB->fetchArray($result)) {
76
-            if(xoops_trim($myrow['frame_description'])!='') {
77
-                $modversion['sub'][$i]['name'] = $myts->htmlSpecialChars($myrow['frame_description']);
78
-                $modversion['sub'][$i]['url'] = 'index.php?iframeid='.intval($myrow['frame_frameid']);
79
-                $i++;
80
-            }
81
-        }
82
-    }
69
+	$i = 0;
70
+	include_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php';
71
+	$myts = MyTextSanitizer::getInstance();
72
+	if(myiframe_getmoduleoption('showinmenu')) {
73
+		$sql = "SELECT * FROM ".$xoopsDB->prefix('myiframe')." ORDER BY frame_description";
74
+		$result = $xoopsDB->query($sql);
75
+		while($myrow = $xoopsDB->fetchArray($result)) {
76
+			if(xoops_trim($myrow['frame_description'])!='') {
77
+				$modversion['sub'][$i]['name'] = $myts->htmlSpecialChars($myrow['frame_description']);
78
+				$modversion['sub'][$i]['url'] = 'index.php?iframeid='.intval($myrow['frame_frameid']);
79
+				$i++;
80
+			}
81
+		}
82
+	}
83 83
 }
84 84
 
85 85
 // Options
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,15 +65,15 @@
 block discarded – undo
65 65
 
66 66
 global $xoopsDB, $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig;
67 67
 
68
-if(is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname'] && $xoopsModule->getVar('isactive')) {
68
+if (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname'] && $xoopsModule->getVar('isactive')) {
69 69
     $i = 0;
70 70
     include_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php';
71 71
     $myts = MyTextSanitizer::getInstance();
72
-    if(myiframe_getmoduleoption('showinmenu')) {
72
+    if (myiframe_getmoduleoption('showinmenu')) {
73 73
         $sql = "SELECT * FROM ".$xoopsDB->prefix('myiframe')." ORDER BY frame_description";
74 74
         $result = $xoopsDB->query($sql);
75
-        while($myrow = $xoopsDB->fetchArray($result)) {
76
-            if(xoops_trim($myrow['frame_description'])!='') {
75
+        while ($myrow = $xoopsDB->fetchArray($result)) {
76
+            if (xoops_trim($myrow['frame_description']) != '') {
77 77
                 $modversion['sub'][$i]['name'] = $myts->htmlSpecialChars($myrow['frame_description']);
78 78
                 $modversion['sub'][$i]['url'] = 'index.php?iframeid='.intval($myrow['frame_frameid']);
79 79
                 $i++;
Please login to merge, or discard this patch.