Completed
Pull Request — master (#6)
by Michael
18:22 queued 04:46
created
class/myiframe.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     die('XOOPS root path not defined');
11 11
 }
12 12
 
13
-include_once XOOPS_ROOT_PATH . '/kernel/object.php';
13
+include_once XOOPS_ROOT_PATH.'/kernel/object.php';
14 14
 
15 15
 /**
16 16
  * Class Myiframe
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             if (is_array($id)) {
44 44
                 $this->assignVars($id);
45 45
             } else {
46
-                $this->load((int)$id);
46
+                $this->load((int) $id);
47 47
             }
48 48
         } else {
49 49
             $this->setNew();
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function load($id)
57 57
     {
58
-        $sql   = 'SELECT * FROM ' . $this->db->prefix('myiframe') . ' WHERE frame_frameid=' . (int)$id;
58
+        $sql   = 'SELECT * FROM '.$this->db->prefix('myiframe').' WHERE frame_frameid='.(int) $id;
59 59
         $myrow = $this->db->fetchArray($this->db->query($sql));
60 60
         $this->assignVars($myrow);
61 61
         if (!$myrow) {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     public function &get($id)
91 91
     {
92 92
         $ret = null;
93
-        $sql = 'SELECT * FROM ' . $this->db->prefix('myiframe') . '  WHERE frame_frameid=' . (int)$id;
93
+        $sql = 'SELECT * FROM '.$this->db->prefix('myiframe').'  WHERE frame_frameid='.(int) $id;
94 94
         if (!$result = $this->db->query($sql)) {
95 95
             return $ret;
96 96
         }
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
     {
186 186
         $ret   = array();
187 187
         $limit = $start = 0;
188
-        $sql   = 'SELECT * FROM ' . $this->db->prefix('myiframe');
188
+        $sql   = 'SELECT * FROM '.$this->db->prefix('myiframe');
189 189
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
190
-            $sql .= ' ' . $criteria->renderWhere();
190
+            $sql .= ' '.$criteria->renderWhere();
191 191
             if ($criteria->getSort() !== '') {
192
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
192
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
193 193
             }
194 194
             $limit = $criteria->getLimit();
195 195
             $start = $criteria->getStart();
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
      */
216 216
     public function getCount($criteria = null)
217 217
     {
218
-        $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('myiframe');
218
+        $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('myiframe');
219 219
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
220
-            $sql .= ' ' . $criteria->renderWhere();
220
+            $sql .= ' '.$criteria->renderWhere();
221 221
         }
222 222
         $result = $this->db->query($sql);
223 223
         if (!$result) {
@@ -234,9 +234,9 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public function deleteAll($criteria = null)
236 236
     {
237
-        $sql = 'DELETE FROM ' . $this->db->prefix('myiframe');
237
+        $sql = 'DELETE FROM '.$this->db->prefix('myiframe');
238 238
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
239
-            $sql .= ' ' . $criteria->renderWhere();
239
+            $sql .= ' '.$criteria->renderWhere();
240 240
         }
241 241
         if (!$result = $this->db->query($sql)) {
242 242
             return false;
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
      */
251 251
     public function updatehits($frame_id)
252 252
     {
253
-        $sql = sprintf('UPDATE %s SET frame_hits = frame_hits+1 WHERE frame_frameid=%u', $this->db->prefix('myiframe'), (int)$frame_id);
253
+        $sql = sprintf('UPDATE %s SET frame_hits = frame_hits+1 WHERE frame_frameid=%u', $this->db->prefix('myiframe'), (int) $frame_id);
254 254
         $this->db->queryF($sql);
255 255
     }
256 256
 }
Please login to merge, or discard this patch.
xoops_version.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,15 +69,15 @@
 block discarded – undo
69 69
 
70 70
 if (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname'] && $xoopsModule->getVar('isactive')) {
71 71
     $i = 0;
72
-    include_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php';
72
+    include_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php';
73 73
     $myts = MyTextSanitizer::getInstance();
74 74
     if (myiframe_getmoduleoption('showinmenu')) {
75
-        $sql    = 'SELECT * FROM ' . $xoopsDB->prefix('myiframe') . ' ORDER BY frame_description';
75
+        $sql    = 'SELECT * FROM '.$xoopsDB->prefix('myiframe').' ORDER BY frame_description';
76 76
         $result = $xoopsDB->query($sql);
77 77
         while ($myrow = $xoopsDB->fetchArray($result)) {
78 78
             if (xoops_trim($myrow['frame_description']) !== '') {
79 79
                 $modversion['sub'][$i]['name'] = $myts->htmlSpecialChars($myrow['frame_description']);
80
-                $modversion['sub'][$i]['url']  = 'index.php?iframeid=' . (int)$myrow['frame_frameid'];
80
+                $modversion['sub'][$i]['url']  = 'index.php?iframeid='.(int) $myrow['frame_frameid'];
81 81
                 $i++;
82 82
             }
83 83
         }
Please login to merge, or discard this patch.
blocks/myiframe_iframe.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * ****************************************************************************
7 7
  */
8 8
 
9
-include_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php';
9
+include_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php';
10 10
 
11 11
 /**
12 12
  * @param $options
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         'left',
23 23
         'rigth'
24 24
     );
25
-    $tblscrolling  = array(
25
+    $tblscrolling = array(
26 26
         'yes',
27 27
         'no',
28 28
         'auto'
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
         $block['longdesc']     = $frame->getVar('frame_description');
36 36
         $block['width']        = $frame->getVar('frame_width');
37 37
         $block['height']       = $frame->getVar('frame_height');
38
-        $block['align']        = $tblalign[$frame->getVar('frame_align') - 1];
38
+        $block['align']        = $tblalign[$frame->getVar('frame_align')-1];
39 39
         $block['frameborder']  = $frame->getVar('frame_frameborder');
40 40
         $block['marginwidth']  = $frame->getVar('frame_marginwidth');
41 41
         $block['marginheight'] = $frame->getVar('frame_marginheight');
42
-        $block['scrolling']    = $tblscrolling[$frame->getVar('frame_scrolling') - 1];
42
+        $block['scrolling']    = $tblscrolling[$frame->getVar('frame_scrolling')-1];
43 43
         $block['url']          = $frame->getVar('frame_url');
44 44
     }
45 45
     return $block;
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
     $critere->setSort('frame_description');
58 58
     $frarray = $iframeHandler->getObjects($critere);
59 59
 
60
-    $form = '' . _MB_MYIFRAME_IFRAME . "&nbsp;<select name='options[0]'>";
60
+    $form = ''._MB_MYIFRAME_IFRAME."&nbsp;<select name='options[0]'>";
61 61
     foreach ($frarray as $oneframe) {
62
-        $form .= "<option value='" . $oneframe->getVar('frame_frameid') . "'";
62
+        $form .= "<option value='".$oneframe->getVar('frame_frameid')."'";
63 63
         if ($options[0] == $oneframe->getVar('frame_frameid')) {
64 64
             $form .= " selected='selected'";
65 65
         }
66
-        $form .= '>' . $oneframe->getVar('frame_description') . '</option>';
66
+        $form .= '>'.$oneframe->getVar('frame_description').'</option>';
67 67
     }
68 68
     $form .= "</select>\n";
69 69
     return $form;
Please login to merge, or discard this patch.
admin/admin_footer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@
 block discarded – undo
17 17
  * @author     XOOPS Development Team
18 18
  */
19 19
 
20
-$pathIcon32      = Xmf\Module\Admin::iconUrl('', 32);
20
+$pathIcon32 = Xmf\Module\Admin::iconUrl('', 32);
21 21
 
22 22
 echo "<div class='adminfooter'>\n"
23 23
      ."  <div style='text-align: center;'>\n"
24 24
      ."    <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
25 25
      ."  </div>\n"
26
-     .'  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
26
+     .'  '._AM_MODULEADMIN_ADMIN_FOOTER."\n"
27 27
      .'</div>';
28 28
 
29 29
 xoops_cp_footer();
Please login to merge, or discard this patch.
admin/menu.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,19 +23,19 @@
 block discarded – undo
23 23
     array(
24 24
         'title' => _MI_MYIFRAME_NAME,
25 25
         'link'  => 'admin/index.php',
26
-        'icon'  => $pathIcon32 . '/home.png'
26
+        'icon'  => $pathIcon32.'/home.png'
27 27
     ),
28 28
 
29 29
     array(
30 30
         'title' => _MI_MYIFRAME_ADMENU1,
31 31
         'link'  => 'admin/manage.php',
32
-        'icon'  => $pathIcon32 . '/manage.png'
32
+        'icon'  => $pathIcon32.'/manage.png'
33 33
     ),
34 34
 
35 35
     // Category
36 36
     array(
37 37
         'title' => _MI_MYIFRAME_ADMENU2,
38 38
         'link'  => 'admin/about.php',
39
-        'icon'  => $pathIcon32 . '/about.png'
39
+        'icon'  => $pathIcon32.'/about.png'
40 40
     ),
41 41
 );
Please login to merge, or discard this patch.
admin/about.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@
 block discarded – undo
9 9
 #  Licence : GPL 							#
10 10
 #######################################################
11 11
 
12
-require_once __DIR__ . '/admin_header.php';
12
+require_once __DIR__.'/admin_header.php';
13 13
 xoops_cp_header();
14 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);
18 18
 
19
-require_once __DIR__ . '/admin_footer.php';
19
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -6,28 +6,28 @@  discard block
 block discarded – undo
6 6
  * ****************************************************************************
7 7
  */
8 8
 
9
-require_once __DIR__ . '/../../mainfile.php';
10
-require_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php';
9
+require_once __DIR__.'/../../mainfile.php';
10
+require_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php';
11 11
 $GLOBALS['xoopsOption']['template_main'] = 'myiframe.tpl';
12
-require_once XOOPS_ROOT_PATH . '/header.php';
12
+require_once XOOPS_ROOT_PATH.'/header.php';
13 13
 
14 14
 $suplparam = '';
15 15
 if (isset($_GET)) {
16 16
     foreach ($_GET as $k => $v) {
17 17
         if (trim(strtoupper($k)) !== 'IFRAMEID') {
18
-            $suplparam .= $k . '=' . $v . '&';
18
+            $suplparam .= $k.'='.$v.'&';
19 19
         }
20 20
     }
21 21
 }
22 22
 
23 23
 if (strlen(xoops_trim($suplparam)) > 0) {
24
-    $suplparam = substr($suplparam, 0, strlen($suplparam) - 1);
24
+    $suplparam = substr($suplparam, 0, strlen($suplparam)-1);
25 25
 }
26 26
 
27 27
 $iframeHandler = xoops_getModuleHandler('myiframe', 'myiframe');
28 28
 
29 29
 if (isset($_GET['iframeid'])) {
30
-    $tblalign     = array(
30
+    $tblalign = array(
31 31
         'top',
32 32
         'middle',
33 33
         'bottom',
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         'no',
40 40
         'auto'
41 41
     );
42
-    $frameid      = (int)$_GET['iframeid'];
42
+    $frameid = (int) $_GET['iframeid'];
43 43
 
44 44
     $frame = $iframeHandler->get($frameid);
45 45
 
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
         $xoopsTpl->assign('longdesc', $frame->getVar('frame_description'));
50 50
         $xoopsTpl->assign('width', $frame->getVar('frame_width'));
51 51
         $xoopsTpl->assign('height', $frame->getVar('frame_height'));
52
-        $xoopsTpl->assign('align', $tblalign[$frame->getVar('frame_align') - 1]);
52
+        $xoopsTpl->assign('align', $tblalign[$frame->getVar('frame_align')-1]);
53 53
         $xoopsTpl->assign('frameborder', $frame->getVar('frame_frameborder'));
54 54
         $xoopsTpl->assign('marginwidth', $frame->getVar('frame_marginwidth'));
55 55
         $xoopsTpl->assign('marginheight', $frame->getVar('frame_marginheight'));
56
-        $xoopsTpl->assign('scrolling', $tblscrolling[$frame->getVar('frame_scrolling') - 1]);
56
+        $xoopsTpl->assign('scrolling', $tblscrolling[$frame->getVar('frame_scrolling')-1]);
57 57
         if (xoops_trim($suplparam) !== '') {
58
-            $xoopsTpl->assign('url', $frame->getVar('frame_url') . '?' . $suplparam);
58
+            $xoopsTpl->assign('url', $frame->getVar('frame_url').'?'.$suplparam);
59 59
         } else {
60 60
             $xoopsTpl->assign('url', $frame->getVar('frame_url'));
61 61
         }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     }
68 68
 } else {
69 69
     if (myiframe_getmoduleoption('showlist')) {
70
-        $baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php';
70
+        $baseurl = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/index.php';
71 71
         $frarray = array();
72 72
         $critere = new Criteria('1', '1', '=');
73 73
         $critere->setSort('frame_description');
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                 if (xoops_trim($frame->getVar('frame_description') === '')) {
78 78
                     $liendesc = $frame->getVar('frame_url');
79 79
                 } else {
80
-                    $liendesc = "<a href='" . $baseurl . '?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
80
+                    $liendesc = "<a href='".$baseurl.'?iframeid='.$frame->getVar('frame_frameid')."'>".$frame->getVar('frame_description').'</a>';
81 81
                 }
82 82
                 $iframe['list'] = $liendesc;
83 83
                 $xoopsTpl->append('iframes', $iframe);
@@ -88,4 +88,4 @@  discard block
 block discarded – undo
88 88
         $xoopsTpl->assign('frame_error', _MYIFRAME_FRAME_ERROR);
89 89
     }
90 90
 }
91
-include XOOPS_ROOT_PATH . '/footer.php';
91
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
language/german/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
  * ****************************************************************************
7 7
  */
8 8
 
9
-define("_MYIFRAME_FRAME_ERROR",	"Fehler, das ausgewдhlte iFrame existiert nicht");
9
+define("_MYIFRAME_FRAME_ERROR", "Fehler, das ausgewдhlte iFrame existiert nicht");
10 10
 ?>
11 11
\ No newline at end of file
Please login to merge, or discard this patch.
language/german/admin.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -6,36 +6,36 @@
 block discarded – undo
6 6
  * ****************************************************************************
7 7
  */
8 8
 
9
-define("_AM_MYIFRAME_CONFIG","iFrames Konfiguration");
10
-define("_AM_MYIFRAME_ID","Frame ID");
11
-define("_AM_MYIFRAME_EDIT","Bearbeiten");
12
-define("_AM_MYIFRAME_DELETE","Lцschen");
13
-define("_AM_MYIFRAME_CREATED","Erstellungsdatum");
14
-define("_AM_MYIFRAME_DESC","Beschreibung");
15
-define("_AM_MYIFRAME_LONGDESC","Ausfьhrliche Beschreibung");
16
-define("_AM_MYIFRAME_WIDTH","Breite");
17
-define("_AM_MYIFRAME_HEIGHT","Hцhe");
18
-define("_AM_MYIFRAME_ALIGN","Ausrichtung");
19
-define("_AM_MYIFRAME_FRAMEBORDER","Frame Rahmen");
20
-define("_AM_MYIFRAME_MARGINWIDTH","Randbreite");
21
-define("_AM_MYIFRAME_MARGINHEIGHT","Randhцhe");
22
-define("_AM_MYIFRAME_SCROLLING","Scrollen");
23
-define("_AM_MYIFRAME_URL","Adresse");
24
-define("_AM_MYIFRAME_ACTION","Aktion");
25
-define("_AM_MYIFRAME_ADD","iFrame hinzufьgen");
26
-define("_AM_MYIFRAME_RESETBUTTON","Zurьcksetzen");
27
-define("_AM_MYIFRAME_ADDBUTTON","Hinzufьgen");
28
-define("_AM_MYIFRAME_ERROR_ADD_INDEX","Fehler, einige Felder fehlen");
29
-define("_AM_MYIFRAME_ADDED_OK","iFrame erfolgreich hinzugefьgt");
30
-define("_AM_MYIFRAME_RUSUREDEL","Sicher, dass dieses iFrame gelцscht werden soll?");
31
-define("_AM_MYIFRAME_DBUPDATED","Update der Datenbank erfolgreich");
32
-define("_AM_MYIFRAME_UPDATE","Дndern");
9
+define("_AM_MYIFRAME_CONFIG", "iFrames Konfiguration");
10
+define("_AM_MYIFRAME_ID", "Frame ID");
11
+define("_AM_MYIFRAME_EDIT", "Bearbeiten");
12
+define("_AM_MYIFRAME_DELETE", "Lцschen");
13
+define("_AM_MYIFRAME_CREATED", "Erstellungsdatum");
14
+define("_AM_MYIFRAME_DESC", "Beschreibung");
15
+define("_AM_MYIFRAME_LONGDESC", "Ausfьhrliche Beschreibung");
16
+define("_AM_MYIFRAME_WIDTH", "Breite");
17
+define("_AM_MYIFRAME_HEIGHT", "Hцhe");
18
+define("_AM_MYIFRAME_ALIGN", "Ausrichtung");
19
+define("_AM_MYIFRAME_FRAMEBORDER", "Frame Rahmen");
20
+define("_AM_MYIFRAME_MARGINWIDTH", "Randbreite");
21
+define("_AM_MYIFRAME_MARGINHEIGHT", "Randhцhe");
22
+define("_AM_MYIFRAME_SCROLLING", "Scrollen");
23
+define("_AM_MYIFRAME_URL", "Adresse");
24
+define("_AM_MYIFRAME_ACTION", "Aktion");
25
+define("_AM_MYIFRAME_ADD", "iFrame hinzufьgen");
26
+define("_AM_MYIFRAME_RESETBUTTON", "Zurьcksetzen");
27
+define("_AM_MYIFRAME_ADDBUTTON", "Hinzufьgen");
28
+define("_AM_MYIFRAME_ERROR_ADD_INDEX", "Fehler, einige Felder fehlen");
29
+define("_AM_MYIFRAME_ADDED_OK", "iFrame erfolgreich hinzugefьgt");
30
+define("_AM_MYIFRAME_RUSUREDEL", "Sicher, dass dieses iFrame gelцscht werden soll?");
31
+define("_AM_MYIFRAME_DBUPDATED", "Update der Datenbank erfolgreich");
32
+define("_AM_MYIFRAME_UPDATE", "Дndern");
33 33
 
34
-define("_AM_MYIFRAME_ALIGN_TOP","Top");
35
-define("_AM_MYIFRAME_ALIGN_MIDDLE","Middle");
36
-define("_AM_MYIFRAME_ALIGN_BOTTOM","Bottom");
37
-define("_AM_MYIFRAME_ALIGN_LEFT","Left");
38
-define("_AM_MYIFRAME_ALIGN_RIGHT","Right");
39
-define("_AM_MYIFRAME_AUTO","Auto");
40
-define("_AM_MYIFRAME_HITS","Aufrufe");
34
+define("_AM_MYIFRAME_ALIGN_TOP", "Top");
35
+define("_AM_MYIFRAME_ALIGN_MIDDLE", "Middle");
36
+define("_AM_MYIFRAME_ALIGN_BOTTOM", "Bottom");
37
+define("_AM_MYIFRAME_ALIGN_LEFT", "Left");
38
+define("_AM_MYIFRAME_ALIGN_RIGHT", "Right");
39
+define("_AM_MYIFRAME_AUTO", "Auto");
40
+define("_AM_MYIFRAME_HITS", "Aufrufe");
41 41
 ?>
42 42
\ No newline at end of file
Please login to merge, or discard this patch.