Completed
Push — master ( 0d7d1b...48b96e )
by Michael
02:08
created
admin/about.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@
 block discarded – undo
17 17
  * @author       XOOPS Development Team
18 18
  */
19 19
 
20
-require_once __DIR__ . '/admin_header.php';
20
+require_once __DIR__.'/admin_header.php';
21 21
 xoops_cp_header();
22 22
 
23 23
 $adminObject->displayNavigation(basename(__FILE__));
24 24
 $adminObject->setPaypal('[email protected]');
25 25
 $adminObject->displayAbout(false);
26 26
 
27
-require_once __DIR__ . '/admin_footer.php';
27
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/docbook_export.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@  discard block
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-require_once __DIR__ . '/../../../include/cp_header.php';
9
+require_once __DIR__.'/../../../include/cp_header.php';
10 10
 
11
-$op = 'go';//'start';
11
+$op = 'go'; //'start';
12 12
 
13 13
 if (isset($HTTP_POST_VARS['op']) && ($HTTP_POST_VARS['op'] === 'go')) {
14 14
     $op = $HTTP_POST_VARS['op'];
15 15
 }
16 16
 
17 17
 if ($op === 'start') {
18
-    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
18
+    require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
19 19
 
20 20
     xoops_cp_header();
21 21
 
@@ -44,41 +44,41 @@  discard block
 block discarded – undo
44 44
 
45 45
     echo "  <title>{module title}</title>\r\n";
46 46
 
47
-    $resultC = $xoopsDB->queryF('SELECT * FROM ' . $xoopsDB->prefix('smartfaq_categories'));
47
+    $resultC = $xoopsDB->queryF('SELECT * FROM '.$xoopsDB->prefix('smartfaq_categories'));
48 48
     while ($arrC = $xoopsDB->fetchArray($resultC)) {
49 49
         extract($arrC, EXTR_PREFIX_ALL, 'c');
50 50
 
51 51
         echo "  <qandadiv ID=\"c$c_categoryid\" Revision=\"$c_created\">\r\n";
52
-        echo '    <title>' . encodeText($c_name) . "</title>\r\n";
53
-        echo '    <para>' . encodeText($c_description) . "</para>\r\n";
52
+        echo '    <title>'.encodeText($c_name)."</title>\r\n";
53
+        echo '    <para>'.encodeText($c_description)."</para>\r\n";
54 54
 
55
-        $resultQ = $xoopsDB->queryF('select * from ' . $xoopsDB->prefix('smartfaq_faq') . " where categoryid=$c_categoryid");
55
+        $resultQ = $xoopsDB->queryF('select * from '.$xoopsDB->prefix('smartfaq_faq')." where categoryid=$c_categoryid");
56 56
         while ($arrQ = $xoopsDB->fetchArray($resultQ)) {
57 57
             extract($arrQ, EXTR_PREFIX_ALL, 'q');
58 58
 
59
-            echo "    <qandaentry ID=\"q$q_faqid\" Revision=\"$q_datesub\" Condition=\"$q_html $q_smiley $q_xcodes\" XrefLabel=\"$q_modulelink $q_contextpage\" Vendor=\"" . getUserFullName($q_uid) . "\">\r\n";
59
+            echo "    <qandaentry ID=\"q$q_faqid\" Revision=\"$q_datesub\" Condition=\"$q_html $q_smiley $q_xcodes\" XrefLabel=\"$q_modulelink $q_contextpage\" Vendor=\"".getUserFullName($q_uid)."\">\r\n";
60 60
             echo "      <question>\r\n";
61
-            echo '        <para>' . encodeText($q_question) . "</para>\r\n";
61
+            echo '        <para>'.encodeText($q_question)."</para>\r\n";
62 62
             if (!empty($q_howdoi)) {
63 63
                 echo "        <note Conformance=\"howdoi\">\r\n";
64 64
                 echo "          <title>{'How do I' from language file}</title>\r\n";
65
-                echo '          <para>' . encodeText($q_howdoi) . "</para>\r\n";
65
+                echo '          <para>'.encodeText($q_howdoi)."</para>\r\n";
66 66
                 echo "        </note>\r\n";
67 67
             }
68 68
             if (!empty($q_diduno)) {
69 69
                 echo "        <note Conformance=\"diduno\">\r\n";
70 70
                 echo "          <title>{'Did you know' from language file}</title>\r\n";
71
-                echo '          <para>' . encodeText($q_diduno) . "</para>\r\n";
71
+                echo '          <para>'.encodeText($q_diduno)."</para>\r\n";
72 72
                 echo "        </note>\r\n";
73 73
             }
74 74
             echo "      </question>\r\n";
75 75
 
76
-            $resultA = $xoopsDB->queryF('select * from ' . $xoopsDB->prefix('smartfaq_answers') . " where answerid=$q_answerid");
76
+            $resultA = $xoopsDB->queryF('select * from '.$xoopsDB->prefix('smartfaq_answers')." where answerid=$q_answerid");
77 77
             while ($arrA = $xoopsDB->fetchArray($resultA)) {
78 78
                 extract($arrA, EXTR_PREFIX_ALL, 'a');
79 79
 
80
-                echo "      <answer ID=\"a$a_answerid\" Revision=\"$a_datesub\" Vendor=\"" . getUserFullName($a_uid) . "\">\r\n";
81
-                echo '        <para>' . encodeText($a_answer) . "</para>\r\n";
80
+                echo "      <answer ID=\"a$a_answerid\" Revision=\"$a_datesub\" Vendor=\"".getUserFullName($a_uid)."\">\r\n";
81
+                echo '        <para>'.encodeText($a_answer)."</para>\r\n";
82 82
                 echo "      </answer>\r\n";
83 83
             }
84 84
             $xoopsDB->freeRecordSet($resultA);
Please login to merge, or discard this patch.
admin/index.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team
18 18
  */
19 19
 
20
-require_once __DIR__ . '/../../../include/cp_header.php';
21
-require_once __DIR__ . '/admin_header.php';
20
+require_once __DIR__.'/../../../include/cp_header.php';
21
+require_once __DIR__.'/admin_header.php';
22 22
 
23 23
 xoops_cp_header();
24 24
 
@@ -72,34 +72,34 @@  discard block
 block discarded – undo
72 72
 $adminObject->addInfoBox(_AM_SF_INVENTORY);
73 73
 
74 74
 if ($totalcategories > 0) {
75
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="category.php">' . _AM_SF_TOTALCAT . '</a><b>' . '</infolabel>', $totalcategories), '', 'Green');
75
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="category.php">'._AM_SF_TOTALCAT.'</a><b>'.'</infolabel>', $totalcategories), '', 'Green');
76 76
 } else {
77
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALCAT . '</infolabel>', $totalcategories), '', 'Green');
77
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALCAT.'</infolabel>', $totalcategories), '', 'Green');
78 78
 }
79 79
 if ($totalasked > 0) {
80
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="main.php">' . _AM_SF_TOTALASKED . '</a><b>' . '</infolabel>', $totalasked), '', 'Green');
80
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="main.php">'._AM_SF_TOTALASKED.'</a><b>'.'</infolabel>', $totalasked), '', 'Green');
81 81
 } else {
82
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALASKED . '</infolabel>', $totalasked), '', 'Green');
82
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALASKED.'</infolabel>', $totalasked), '', 'Green');
83 83
 }
84 84
 if ($totalopened > 0) {
85
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="question.php">' . _AM_SF_TOTALOPENED . '</a><b>' . '</infolabel>', $totalopened), '', 'Red');
85
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="question.php">'._AM_SF_TOTALOPENED.'</a><b>'.'</infolabel>', $totalopened), '', 'Red');
86 86
 } else {
87
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALOPENED . '</infolabel>', $totalopened), '', 'Green');
87
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALOPENED.'</infolabel>', $totalopened), '', 'Green');
88 88
 }
89 89
 if ($totalsubmitted > 0) {
90
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="category.php">' . _AM_SF_TOTALSUBMITTED . '</a><b>' . '</infolabel>', $totalsubmitted), '', 'Green');
90
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="category.php">'._AM_SF_TOTALSUBMITTED.'</a><b>'.'</infolabel>', $totalsubmitted), '', 'Green');
91 91
 } else {
92
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALSUBMITTED . '</infolabel>', $totalsubmitted), '', 'Green');
92
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALSUBMITTED.'</infolabel>', $totalsubmitted), '', 'Green');
93 93
 }
94 94
 if ($totalpublished > 0) {
95
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="faq.php">' . _AM_SF_TOTALPUBLISHED . '</a><b>' . '</infolabel>', $totalpublished), '', 'Green');
95
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="faq.php">'._AM_SF_TOTALPUBLISHED.'</a><b>'.'</infolabel>', $totalpublished), '', 'Green');
96 96
 } else {
97
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALPUBLISHED . '</infolabel>', $totalpublished), '', 'Green');
97
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALPUBLISHED.'</infolabel>', $totalpublished), '', 'Green');
98 98
 }
99 99
 if ($totalnewanswers > 0) {
100
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="main.php">' . _AM_SF_TOTALNEWANSWERS . '</a><b>' . '</infolabel>', $totalnewanswers), '', 'Red');
100
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="main.php">'._AM_SF_TOTALNEWANSWERS.'</a><b>'.'</infolabel>', $totalnewanswers), '', 'Red');
101 101
 } else {
102
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALNEWANSWERS . '</infolabel>', $totalnewanswers), '', 'Green');
102
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALNEWANSWERS.'</infolabel>', $totalnewanswers), '', 'Green');
103 103
 }
104 104
 
105 105
 //----------------------
@@ -107,4 +107,4 @@  discard block
 block discarded – undo
107 107
 $adminObject->displayNavigation(basename(__FILE__));
108 108
 $adminObject->displayIndex();
109 109
 
110
-require_once __DIR__ . '/admin_footer.php';
110
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/mygroupperm.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@  discard block
 block discarded – undo
15 15
 
16 16
 function myDeleteByModule(XoopsDatabase $db, $gperm_modid, $gperm_name = null, $gperm_itemid = null)
17 17
 {
18
-    $criteria = new CriteriaCompo(new Criteria('gperm_modid', (int)$gperm_modid));
18
+    $criteria = new CriteriaCompo(new Criteria('gperm_modid', (int) $gperm_modid));
19 19
     if (null !== $gperm_name) {
20 20
         $criteria->add(new Criteria('gperm_name', $gperm_name));
21 21
         if (null !== $gperm_itemid) {
22
-            $criteria->add(new Criteria('gperm_itemid', (int)$gperm_itemid));
22
+            $criteria->add(new Criteria('gperm_itemid', (int) $gperm_itemid));
23 23
         }
24 24
     }
25
-    $sql = 'DELETE FROM ' . $db->prefix('group_permission') . ' ' . $criteria->renderWhere();
25
+    $sql = 'DELETE FROM '.$db->prefix('group_permission').' '.$criteria->renderWhere();
26 26
     if (!$result = $db->query($sql)) {
27 27
         return false;
28 28
     }
@@ -31,19 +31,19 @@  discard block
 block discarded – undo
31 31
 }
32 32
 
33 33
 // require_once __DIR__ . '/../../../include/cp_header.php'; GIJ
34
-$modid = isset($HTTP_POST_VARS['modid']) ? (int)$HTTP_POST_VARS['modid'] : 1;
34
+$modid = isset($HTTP_POST_VARS['modid']) ? (int) $HTTP_POST_VARS['modid'] : 1;
35 35
 // we dont want system module permissions to be changed here ( 1 -> 0 GIJ)
36 36
 if ($modid <= 0 || !is_object($xoopsUser) || !$xoopsUser->isAdmin($modid)) {
37
-    redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM);
37
+    redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM);
38 38
 }
39 39
 /** @var XoopsModuleHandler $moduleHandler */
40 40
 $moduleHandler = xoops_getHandler('module');
41 41
 $module        = $moduleHandler->get($modid);
42 42
 if (!is_object($module) || !$module->getVar('isactive')) {
43
-    redirect_header(XOOPS_URL . '/admin.php', 1, _MODULENOEXIST);
43
+    redirect_header(XOOPS_URL.'/admin.php', 1, _MODULENOEXIST);
44 44
 }
45 45
 $memberHandler = xoops_getHandler('member');
46
-$group_list    =& $memberHandler->getGroupList();
46
+$group_list    = & $memberHandler->getGroupList();
47 47
 if (is_array($HTTP_POST_VARS['perms']) && !empty($HTTP_POST_VARS['perms'])) {
48 48
     $gpermHandler = xoops_getHandler('groupperm');
49 49
     foreach ($HTTP_POST_VARS['perms'] as $perm_name => $perm_data) {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                             foreach ($parent_ids as $pid) {
67 67
                                 if ($pid != 0 && !in_array($pid, array_keys($item_ids))) {
68 68
                                     // one of the parent items were not selected, so skip this item
69
-                                    $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>') . ' (' . _MD_AM_PERMADDNGP . ')';
69
+                                    $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>').' ('._MD_AM_PERMADDNGP.')';
70 70
                                     continue 2;
71 71
                                 }
72 72
                             }
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
                         $gperm->setVar('gperm_modid', $modid);
78 78
                         $gperm->setVar('gperm_itemid', $item_id);
79 79
                         if (!$gpermHandler->insert($gperm)) {
80
-                            $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>');
80
+                            $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>');
81 81
                         } else {
82
-                            $msg[] = sprintf(_MD_AM_PERMADDOK, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>');
82
+                            $msg[] = sprintf(_MD_AM_PERMADDOK, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>');
83 83
                         }
84 84
                         unset($gperm);
85 85
                     }
Please login to merge, or discard this patch.
admin/permissions.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -59,14 +59,14 @@
 block discarded – undo
59 59
             echo $form_view->render();
60 60
         } else {
61 61
             echo "<img id='toptableicon' src="
62
-                 . XOOPS_URL
63
-                 . '/modules/'
64
-                 . $xoopsModule->dirname()
65
-                 . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
66
-                 . _AM_SF_PERMISSIONSVIEWMAN
67
-                 . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
68
-                 . _AM_SF_NOPERMSSET
69
-                 . '</span>';
62
+                    . XOOPS_URL
63
+                    . '/modules/'
64
+                    . $xoopsModule->dirname()
65
+                    . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
66
+                    . _AM_SF_PERMISSIONSVIEWMAN
67
+                    . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
68
+                    . _AM_SF_NOPERMSSET
69
+                    . '</span>';
70 70
         }
71 71
         echo '</div>';
72 72
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-require_once __DIR__ . '/admin_header.php';
10
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php';
9
+require_once __DIR__.'/admin_header.php';
10
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php';
11 11
 
12 12
 if (!sf_userIsAdmin()) {
13 13
     redirect_header('javascript:history.go(-1)', 1, _NOPERM);
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ;
38 38
         sf_collapsableBar('toptable', 'toptableicon');
39 39
 
40
-        $result_view = $xoopsDB->query('SELECT categoryid, name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' ');
40
+        $result_view = $xoopsDB->query('SELECT categoryid, name FROM '.$xoopsDB->prefix('smartfaq_categories').' ');
41 41
         if ($xoopsDB->getRowsNum($result_view)) {
42 42
             while ($myrow_view = $xoopsDB->fetcharray($result_view)) {
43 43
                 $item_list_view['cid']   = $myrow_view['categoryid'];
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                                                                                                                     . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
52 52
                                                                                                                     . _AM_SF_VIEW_CATS
53 53
                                                                                                                     . '</span>', 'admin/permissions.php');
54
-                $block_view[]            = $item_list_view;
54
+                $block_view[] = $item_list_view;
55 55
                 foreach ($block_view as $itemlists) {
56 56
                     $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title']));
57 57
                 }
@@ -73,4 +73,4 @@  discard block
 block discarded – undo
73 73
         echo "<br>\n";
74 74
 }
75 75
 
76
-require_once __DIR__ . '/admin_footer.php';
76
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
Switch Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -24,53 +24,53 @@
 block discarded – undo
24 24
 }
25 25
 
26 26
 switch ($op) {
27
-    case 'default':
28
-    default:
29
-        global $xoopsDB, $xoopsModule;
27
+        case 'default':
28
+        default:
29
+            global $xoopsDB, $xoopsModule;
30 30
 
31
-        $adminObject = \Xmf\Module\Admin::getInstance();
32
-        xoops_cp_header();
33
-        $adminObject->displayNavigation(basename(__FILE__));
34
-        // View Categories permissions
35
-        $item_list_view = [];
36
-        $block_view     = [];
37
-        // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ;
38
-        sf_collapsableBar('toptable', 'toptableicon');
31
+            $adminObject = \Xmf\Module\Admin::getInstance();
32
+            xoops_cp_header();
33
+            $adminObject->displayNavigation(basename(__FILE__));
34
+            // View Categories permissions
35
+            $item_list_view = [];
36
+            $block_view     = [];
37
+            // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ;
38
+            sf_collapsableBar('toptable', 'toptableicon');
39 39
 
40
-        $result_view = $xoopsDB->query('SELECT categoryid, name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' ');
41
-        if ($xoopsDB->getRowsNum($result_view)) {
42
-            while ($myrow_view = $xoopsDB->fetcharray($result_view)) {
43
-                $item_list_view['cid']   = $myrow_view['categoryid'];
44
-                $item_list_view['title'] = $myrow_view['name'];
45
-                $form_view               = new XoopsGroupPermForm('', $xoopsModule->getVar('mid'), 'category_read', "<img id='toptableicon' src="
46
-                                                                                                                    . XOOPS_URL
47
-                                                                                                                    . '/modules/'
48
-                                                                                                                    . $xoopsModule->dirname()
49
-                                                                                                                    . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
50
-                                                                                                                    . _AM_SF_PERMISSIONSVIEWMAN
51
-                                                                                                                    . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
52
-                                                                                                                    . _AM_SF_VIEW_CATS
53
-                                                                                                                    . '</span>', 'admin/permissions.php');
54
-                $block_view[]            = $item_list_view;
55
-                foreach ($block_view as $itemlists) {
56
-                    $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title']));
40
+            $result_view = $xoopsDB->query('SELECT categoryid, name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' ');
41
+            if ($xoopsDB->getRowsNum($result_view)) {
42
+                while ($myrow_view = $xoopsDB->fetcharray($result_view)) {
43
+                    $item_list_view['cid']   = $myrow_view['categoryid'];
44
+                    $item_list_view['title'] = $myrow_view['name'];
45
+                    $form_view               = new XoopsGroupPermForm('', $xoopsModule->getVar('mid'), 'category_read', "<img id='toptableicon' src="
46
+                                                                                                                        . XOOPS_URL
47
+                                                                                                                        . '/modules/'
48
+                                                                                                                        . $xoopsModule->dirname()
49
+                                                                                                                        . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
50
+                                                                                                                        . _AM_SF_PERMISSIONSVIEWMAN
51
+                                                                                                                        . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
52
+                                                                                                                        . _AM_SF_VIEW_CATS
53
+                                                                                                                        . '</span>', 'admin/permissions.php');
54
+                    $block_view[]            = $item_list_view;
55
+                    foreach ($block_view as $itemlists) {
56
+                        $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title']));
57
+                    }
57 58
                 }
59
+                echo $form_view->render();
60
+            } else {
61
+                echo "<img id='toptableicon' src="
62
+                     . XOOPS_URL
63
+                     . '/modules/'
64
+                     . $xoopsModule->dirname()
65
+                     . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
66
+                     . _AM_SF_PERMISSIONSVIEWMAN
67
+                     . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
68
+                     . _AM_SF_NOPERMSSET
69
+                     . '</span>';
58 70
             }
59
-            echo $form_view->render();
60
-        } else {
61
-            echo "<img id='toptableicon' src="
62
-                 . XOOPS_URL
63
-                 . '/modules/'
64
-                 . $xoopsModule->dirname()
65
-                 . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
66
-                 . _AM_SF_PERMISSIONSVIEWMAN
67
-                 . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
68
-                 . _AM_SF_NOPERMSSET
69
-                 . '</span>';
70
-        }
71
-        echo '</div>';
71
+            echo '</div>';
72 72
 
73
-        echo "<br>\n";
73
+            echo "<br>\n";
74 74
 }
75 75
 
76 76
 require_once __DIR__ . '/admin_footer.php';
Please login to merge, or discard this patch.
comment_post.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-include __DIR__ . '/../../mainfile.php';
10
-require_once XOOPS_ROOT_PATH . '/include/comment_post.php';
9
+include __DIR__.'/../../mainfile.php';
10
+require_once XOOPS_ROOT_PATH.'/include/comment_post.php';
Please login to merge, or discard this patch.
include/functions.image.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -28,24 +28,24 @@  discard block
 block discarded – undo
28 28
     {
29 29
         global $xoopsModuleConfig;
30 30
 
31
-        $img_path   = XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'];
32
-        $img_url    = XOOPS_URL . '/' . $xoopsModuleConfig['dir_attachments'];
33
-        $thumb_path = $img_path . '/thumbs';
34
-        $thumb_url  = $img_url . '/thumbs';
31
+        $img_path   = XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments'];
32
+        $img_url    = XOOPS_URL.'/'.$xoopsModuleConfig['dir_attachments'];
33
+        $thumb_path = $img_path.'/thumbs';
34
+        $thumb_url  = $img_url.'/thumbs';
35 35
 
36
-        $thumb     = $thumb_path . '/' . $source;
37
-        $image     = $img_path . '/' . $source;
38
-        $thumb_url = $thumb_url . '/' . $source;
39
-        $image_url = $img_url . '/' . $source;
36
+        $thumb     = $thumb_path.'/'.$source;
37
+        $image     = $img_path.'/'.$source;
38
+        $thumb_url = $thumb_url.'/'.$source;
39
+        $image_url = $img_url.'/'.$source;
40 40
 
41 41
         $imginfo  = @getimagesize($image);
42
-        $img_info = (count($imginfo) > 0) ? $imginfo[0] . 'X' . $imginfo[1] . ' px' : '';
42
+        $img_info = (count($imginfo) > 0) ? $imginfo[0].'X'.$imginfo[1].' px' : '';
43 43
 
44 44
         if ($xoopsModuleConfig['max_image_width'] > 0 && $xoopsModuleConfig['max_image_height'] > 0) {
45 45
             if ($imginfo[0] > $xoopsModuleConfig['max_image_width']
46 46
                 || $imginfo[1] > $xoopsModuleConfig['max_image_height']) {
47 47
                 //if (!file_exists($thumb_path.'/'.$source) && $imginfo[0] > $xoopsModuleConfig['max_img_width']) {
48
-                if (!file_exists($thumb_path . '/' . $source)) {
48
+                if (!file_exists($thumb_path.'/'.$source)) {
49 49
                     sf_createThumbnail($source, $xoopsModuleConfig['max_image_width']);
50 50
                 }
51 51
             }
@@ -54,27 +54,27 @@  discard block
 block discarded – undo
54 54
                 || $imginfo[1] > $xoopsModuleConfig['max_image_height']) {
55 55
                 $pseudo_width  = $xoopsModuleConfig['max_image_width'];
56 56
                 $pseudo_height = $xoopsModuleConfig['max_image_width'] * ($imginfo[1] / $imginfo[0]);
57
-                $pseudo_size   = "width='" . $pseudo_width . "px' height='" . $pseudo_height . "px'";
57
+                $pseudo_size   = "width='".$pseudo_width."px' height='".$pseudo_height."px'";
58 58
             }
59 59
             // irmtfan to fix Undefined variable: pseudo_height
60 60
             if (!empty($pseudo_height) && $xoopsModuleConfig['max_image_height'] > 0
61 61
                 && $pseudo_height > $xoopsModuleConfig['max_image_height']) {
62 62
                 $pseudo_height = $xoopsModuleConfig['max_image_height'];
63 63
                 $pseudo_width  = $xoopsModuleConfig['max_image_height'] * ($imginfo[0] / $imginfo[1]);
64
-                $pseudo_size   = "width='" . $pseudo_width . "px' height='" . $pseudo_height . "px'";
64
+                $pseudo_size   = "width='".$pseudo_width."px' height='".$pseudo_height."px'";
65 65
             }
66 66
         }
67 67
 
68 68
         if (file_exists($thumb)) {
69
-            $attachmentImage = '<a href="' . $image_url . '" title="' . $source . ' ' . $img_info . '" target="_blank">';
70
-            $attachmentImage .= '<img src="' . $thumb_url . '" alt="' . $source . ' ' . $img_info . '">';
69
+            $attachmentImage = '<a href="'.$image_url.'" title="'.$source.' '.$img_info.'" target="_blank">';
70
+            $attachmentImage .= '<img src="'.$thumb_url.'" alt="'.$source.' '.$img_info.'">';
71 71
             $attachmentImage .= '</a>';
72 72
         } elseif (!empty($pseudo_size)) {
73
-            $attachmentImage = '<a href="' . $image_url . '" title="' . $source . ' ' . $img_info . '" target="_blank">';
74
-            $attachmentImage .= '<img src="' . $image_url . '" ' . $pseudo_size . ' alt="' . $source . ' ' . $img_info . '">';
73
+            $attachmentImage = '<a href="'.$image_url.'" title="'.$source.' '.$img_info.'" target="_blank">';
74
+            $attachmentImage .= '<img src="'.$image_url.'" '.$pseudo_size.' alt="'.$source.' '.$img_info.'">';
75 75
             $attachmentImage .= '</a>';
76 76
         } elseif (file_exists($image)) {
77
-            $attachmentImage = '<img src="' . $image_url . '" alt="' . $source . ' ' . $img_info . '">';
77
+            $attachmentImage = '<img src="'.$image_url.'" alt="'.$source.' '.$img_info.'">';
78 78
         } else {
79 79
             $attachmentImage = '';
80 80
         }
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
     {
92 92
         global $xoopsModuleConfig;
93 93
 
94
-        $img_path   = XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'];
95
-        $thumb_path = $img_path . '/thumbs';
96
-        $src_file   = $img_path . '/' . $source;
97
-        $new_file   = $thumb_path . '/' . $source;
94
+        $img_path   = XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments'];
95
+        $thumb_path = $img_path.'/thumbs';
96
+        $src_file   = $img_path.'/'.$source;
97
+        $new_file   = $thumb_path.'/'.$source;
98 98
         //$imageLibs = sf_getImageLibs();
99 99
 
100 100
         if (!filesize($src_file) || !is_readable($src_file)) {
@@ -114,20 +114,20 @@  discard block
 block discarded – undo
114 114
             return false;
115 115
         }
116 116
 
117
-        $newWidth  = (int)min($imginfo[0], $thumb_width);
118
-        $newHeight = (int)($imginfo[1] * $newWidth / $imginfo[0]);
117
+        $newWidth  = (int) min($imginfo[0], $thumb_width);
118
+        $newHeight = (int) ($imginfo[1] * $newWidth / $imginfo[0]);
119 119
 
120 120
         if ($xoopsModuleConfig['image_lib'] == 1 or $xoopsModuleConfig['image_lib'] == 0) {
121 121
             if (preg_match("#[A-Z]:|\\\\#Ai", __FILE__)) {
122 122
                 $cur_dir     = __DIR__;
123
-                $src_file_im = '"' . $cur_dir . '\\' . strtr($src_file, '/', '\\') . '"';
124
-                $new_file_im = '"' . $cur_dir . '\\' . strtr($new_file, '/', '\\') . '"';
123
+                $src_file_im = '"'.$cur_dir.'\\'.strtr($src_file, '/', '\\').'"';
124
+                $new_file_im = '"'.$cur_dir.'\\'.strtr($new_file, '/', '\\').'"';
125 125
             } else {
126 126
                 $src_file_im = @escapeshellarg($src_file);
127 127
                 $new_file_im = @escapeshellarg($new_file);
128 128
             }
129
-            $path           = empty($xoopsModuleConfig['path_magick']) ? '' : $xoopsModuleConfig['path_magick'] . '/';
130
-            $magick_command = $path . 'convert -quality 85 -antialias -sample ' . $newWidth . 'x' . $newHeight . ' ' . $src_file_im . ' +profile "*" ' . str_replace('\\', '/', $new_file_im) . '';
129
+            $path           = empty($xoopsModuleConfig['path_magick']) ? '' : $xoopsModuleConfig['path_magick'].'/';
130
+            $magick_command = $path.'convert -quality 85 -antialias -sample '.$newWidth.'x'.$newHeight.' '.$src_file_im.' +profile "*" '.str_replace('\\', '/', $new_file_im).'';
131 131
 
132 132
             @passthru($magick_command);
133 133
             if (file_exists($new_file)) {
@@ -136,13 +136,13 @@  discard block
 block discarded – undo
136 136
         }
137 137
 
138 138
         if ($xoopsModuleConfig['image_lib'] == 2 or $xoopsModuleConfig['image_lib'] == 0) {
139
-            $path = empty($xoopsModuleConfig['path_netpbm']) ? '' : $xoopsModuleConfig['path_netpbm'] . '/';
139
+            $path = empty($xoopsModuleConfig['path_netpbm']) ? '' : $xoopsModuleConfig['path_netpbm'].'/';
140 140
             if (preg_match("/\.png/i", $source)) {
141
-                $cmd = $path . "pngtopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | " . $path . "pnmtopng > $new_file";
141
+                $cmd = $path."pngtopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ".$path."pnmtopng > $new_file";
142 142
             } elseif (preg_match("/\.(jpg|jpeg)/i", $source)) {
143
-                $cmd = $path . "jpegtopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | " . $path . "ppmtojpeg -quality=90 > $new_file";
143
+                $cmd = $path."jpegtopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ".$path."ppmtojpeg -quality=90 > $new_file";
144 144
             } elseif (preg_match("/\.gif/i", $source)) {
145
-                $cmd = $path . "giftopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | ppmquant 256 | " . $path . "ppmtogif > $new_file";
145
+                $cmd = $path."giftopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ppmquant 256 | ".$path."ppmtogif > $new_file";
146 146
             }
147 147
 
148 148
             @exec($cmd, $output, $retval);
Please login to merge, or discard this patch.
include/submit.inc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
 
10 10
 global $_POST, $xoopsDB;
11 11
 
12
-require_once XOOPS_ROOT_PATH . '/class/xoopstree.php';
13
-require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
14
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
12
+require_once XOOPS_ROOT_PATH.'/class/xoopstree.php';
13
+require_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
14
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
15 15
 
16
-require_once __DIR__ . '/functions.php';
16
+require_once __DIR__.'/functions.php';
17 17
 
18 18
 $mytree = new XoopsTree($xoopsDB->prefix('smartfaq_categories'), 'categoryid', 'parentid');
19 19
 $form   = new XoopsThemeForm(_MD_SF_SUB_SMNAME, 'form', xoops_getenv('PHP_SELF'), 'post', true);
@@ -70,18 +70,18 @@  discard block
 block discarded – undo
70 70
 //    $upload_tray->addElement(new XoopsFormFile('', 'userfile', ($forum_obj->getVar('attach_maxkb') * 1024)));
71 71
 $upload_tray->addElement(new XoopsFormFile('', 'userfile', $xoopsModuleConfig['max_image_size'] * 1024));
72 72
 $upload_tray->addElement(new XoopsFormButton('', 'contents_upload', _MD_SF_UPLOAD, 'submit'));
73
-$upload_tray->addElement(new XoopsFormLabel('<br><br>' . _MD_SF_MAX_FILESIZE . ':', $xoopsModuleConfig['max_image_size'] . 'Kb; '));
73
+$upload_tray->addElement(new XoopsFormLabel('<br><br>'._MD_SF_MAX_FILESIZE.':', $xoopsModuleConfig['max_image_size'].'Kb; '));
74 74
 $extensions = trim(str_replace('|', ' ', $xoopsModuleConfig['attach_ext']));
75 75
 $extensions = (empty($extensions) || $extensions === '*') ? _ALL : $extensions;
76
-$upload_tray->addElement(new XoopsFormLabel(_MD_SF_ALLOWED_EXTENSIONS . ':', $extensions));
77
-$upload_tray->addElement(new XoopsFormLabel('<br>' . sprintf(_MD_SF_MAXPIC, $xoopsModuleConfig['max_img_height'], $xoopsModuleConfig['max_img_width'])));
76
+$upload_tray->addElement(new XoopsFormLabel(_MD_SF_ALLOWED_EXTENSIONS.':', $extensions));
77
+$upload_tray->addElement(new XoopsFormLabel('<br>'.sprintf(_MD_SF_MAXPIC, $xoopsModuleConfig['max_img_height'], $xoopsModuleConfig['max_img_width'])));
78 78
 $form->addElement($upload_tray);
79 79
 //}
80 80
 
81 81
 if (!empty($attachments) && is_array($attachments) && count($attachments)) {
82 82
     $delete_attach_checkbox = new XoopsFormCheckBox(_MD_SF_ATTACHED_FILES, 'delete_attach[]');
83 83
     foreach ($attachments as $key => $attachment) {
84
-        $attach = ' ' . _DELETE . ' <a href=' . XOOPS_URL . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $attachment['name_saved'] . ' rel="external">' . $attachment['name_display'] . '</a><br>';
84
+        $attach = ' '._DELETE.' <a href='.XOOPS_URL.'/'.$xoopsModuleConfig['dir_attachments'].'/'.$attachment['name_saved'].' rel="external">'.$attachment['name_display'].'</a><br>';
85 85
         $delete_attach_checkbox->addOption($key, $attach);
86 86
     }
87 87
     $form->addElement($delete_attach_checkbox);
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     $delete_attach_checkbox = new XoopsFormCheckBox(_MD_REMOVE, 'delete_tmp[]');
93 93
     $url_prefix             = str_replace(XOOPS_ROOT_PATH, XOOPS_URL, XOOPS_CACHE_PATH);
94 94
     foreach ($attachments_tmp as $key => $attachment) {
95
-        $attach = ' <a href="' . $url_prefix . '/' . $attachment[0] . '" rel="external">' . $attachment[1] . '</a><br>';
95
+        $attach = ' <a href="'.$url_prefix.'/'.$attachment[0].'" rel="external">'.$attachment[1].'</a><br>';
96 96
         $delete_attach_checkbox->addOption($key, $attach);
97 97
     }
98 98
     $form->addElement($delete_attach_checkbox);
Please login to merge, or discard this patch.
include/notification.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,22 +35,22 @@
 block discarded – undo
35 35
 
36 36
     if ($category === 'category') {
37 37
         // Assume we have a valid category id
38
-        $sql          = 'SELECT name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' WHERE categoryid  = ' . $item_id;
38
+        $sql          = 'SELECT name FROM '.$xoopsDB->prefix('smartfaq_categories').' WHERE categoryid  = '.$item_id;
39 39
         $result       = $xoopsDB->queryF($sql); // TODO: error check
40 40
         $result_array = $xoopsDB->fetchArray($result);
41 41
         $item['name'] = $result_array['name'];
42
-        $item['url']  = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/category.php?categoryid=' . $item_id;
42
+        $item['url']  = XOOPS_URL.'/modules/'.$module->getVar('dirname').'/category.php?categoryid='.$item_id;
43 43
 
44 44
         return $item;
45 45
     }
46 46
 
47 47
     if ($category === 'faq') {
48 48
         // Assume we have a valid story id
49
-        $sql          = 'SELECT question FROM ' . $xoopsDB->prefix('smartfaq_faq') . ' WHERE faqid = ' . $item_id;
49
+        $sql          = 'SELECT question FROM '.$xoopsDB->prefix('smartfaq_faq').' WHERE faqid = '.$item_id;
50 50
         $result       = $xoopsDB->queryF($sql); // TODO: error check
51 51
         $result_array = $xoopsDB->fetchArray($result);
52 52
         $item['name'] = $result_array['question'];
53
-        $item['url']  = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/faq.php?faqid=' . $item_id;
53
+        $item['url']  = XOOPS_URL.'/modules/'.$module->getVar('dirname').'/faq.php?faqid='.$item_id;
54 54
 
55 55
         return $item;
56 56
     }
Please login to merge, or discard this patch.