Completed
Branch master (623467)
by Michael
01:32
created
include/functions.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@
 block discarded – undo
38 38
 		$module =& $module_handler->getByDirname($repmodule);
39 39
 		$config_handler =& xoops_gethandler('config');
40 40
 		if ($module) {
41
-		    $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
42
-	    	if(isset($moduleConfig[$option])) {
43
-	    		$retval= $moduleConfig[$option];
44
-	    	}
41
+			$moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
42
+			if(isset($moduleConfig[$option])) {
43
+				$retval= $moduleConfig[$option];
44
+			}
45 45
 		}
46 46
 	}
47 47
 	$tbloptions[$option]=$retval;
Please login to merge, or discard this patch.
blocks/myiframe_iframe.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -10,9 +10,9 @@  discard block
 block discarded – undo
10 10
 
11 11
 function b_myiframe_iframe_show($options)
12 12
 {
13
-    $block = array();
14
-    $tblalign = array('top','middle','bottom','left','rigth');
15
-    $tblscrolling = array('yes','no','auto');
13
+	$block = array();
14
+	$tblalign = array('top','middle','bottom','left','rigth');
15
+	$tblscrolling = array('yes','no','auto');
16 16
 	$iframe_handler =& xoops_getmodulehandler('myiframe', 'myiframe');
17 17
 	$frame = null;
18 18
 	$frame = $iframe_handler->get($options[0]);
@@ -39,16 +39,16 @@  discard block
 block discarded – undo
39 39
 	$critere->setSort('frame_description');
40 40
 	$frarray = $iframe_handler->getObjects($critere);
41 41
 
42
-    $form = ""._MB_MYIFRAME_IFRAME."&nbsp;<select name='options[0]'>";
43
-    foreach($frarray as $oneframe) {
44
-    	$form .= "<option value='".$oneframe->getVar('frame_frameid')."'";
45
-    	if ($options[0] == $oneframe->getVar('frame_frameid')) {
46
-	        $form .= " selected='selected'";
47
-	    }
48
-	    $form .= '>'.$oneframe->getVar('frame_description').'</option>';
42
+	$form = ""._MB_MYIFRAME_IFRAME."&nbsp;<select name='options[0]'>";
43
+	foreach($frarray as $oneframe) {
44
+		$form .= "<option value='".$oneframe->getVar('frame_frameid')."'";
45
+		if ($options[0] == $oneframe->getVar('frame_frameid')) {
46
+			$form .= " selected='selected'";
47
+		}
48
+		$form .= '>'.$oneframe->getVar('frame_description').'</option>';
49 49
 	}
50
-    $form .= "</select>\n";
51
-    return $form;
50
+	$form .= "</select>\n";
51
+	return $form;
52 52
 }
53 53
 
54 54
 
Please login to merge, or discard this patch.
index.php 1 patch
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.
xoops_version.php 1 patch
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.