Passed
Push — master ( 2744eb...81ba93 )
by Michael
02:46
created
include/submit.inc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
 
15 15
 global $_POST, $xoopsDB;
16 16
 
17
-require_once XOOPS_ROOT_PATH . '/class/xoopstree.php';
18
-require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
19
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
17
+require_once XOOPS_ROOT_PATH.'/class/xoopstree.php';
18
+require_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
19
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
20 20
 
21 21
 //require_once __DIR__ . '/functions.php';
22 22
 
@@ -82,18 +82,18 @@  discard block
 block discarded – undo
82 82
 //    $upload_tray->addElement(new \XoopsFormFile('', 'userfile', ($forum_obj->getVar('attach_maxkb') * 1024)));
83 83
 $upload_tray->addElement(new \XoopsFormFile('', 'userfile', $helper->getConfig('max_image_size') * 1024));
84 84
 $upload_tray->addElement(new \XoopsFormButton('', 'contents_upload', _MD_SF_UPLOAD, 'submit'));
85
-$upload_tray->addElement(new \XoopsFormLabel('<br><br>' . _MD_SF_MAX_FILESIZE . ':', $helper->getConfig('max_image_size') . 'Kb; '));
85
+$upload_tray->addElement(new \XoopsFormLabel('<br><br>'._MD_SF_MAX_FILESIZE.':', $helper->getConfig('max_image_size').'Kb; '));
86 86
 $extensions = trim(str_replace('|', ' ', $helper->getConfig('attach_ext')));
87 87
 $extensions = (empty($extensions) || '*' === $extensions) ? _ALL : $extensions;
88
-$upload_tray->addElement(new \XoopsFormLabel(_MD_SF_ALLOWED_EXTENSIONS . ':', $extensions));
89
-$upload_tray->addElement(new \XoopsFormLabel('<br>' . sprintf(_MD_SF_MAXPIC, $helper->getConfig('max_img_height'), $helper->getConfig('max_img_width'))));
88
+$upload_tray->addElement(new \XoopsFormLabel(_MD_SF_ALLOWED_EXTENSIONS.':', $extensions));
89
+$upload_tray->addElement(new \XoopsFormLabel('<br>'.sprintf(_MD_SF_MAXPIC, $helper->getConfig('max_img_height'), $helper->getConfig('max_img_width'))));
90 90
 $form->addElement($upload_tray);
91 91
 //}
92 92
 
93 93
 if (!empty($attachments) && is_array($attachments) && count($attachments)) {
94 94
     $delete_attach_checkbox = new \XoopsFormCheckBox(_MD_SF_ATTACHED_FILES, 'delete_attach[]');
95 95
     foreach ($attachments as $key => $attachment) {
96
-        $attach = ' ' . _DELETE . ' <a href=' . XOOPS_URL . '/' . $helper->getConfig('dir_attachments') . '/' . $attachment['name_saved'] . ' rel="external">' . $attachment['name_display'] . '</a><br>';
96
+        $attach = ' '._DELETE.' <a href='.XOOPS_URL.'/'.$helper->getConfig('dir_attachments').'/'.$attachment['name_saved'].' rel="external">'.$attachment['name_display'].'</a><br>';
97 97
         $delete_attach_checkbox->addOption($key, $attach);
98 98
     }
99 99
     $form->addElement($delete_attach_checkbox);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     $delete_attach_checkbox = new \XoopsFormCheckBox(_MD_REMOVE, 'delete_tmp[]');
105 105
     $url_prefix             = str_replace(XOOPS_ROOT_PATH, XOOPS_URL, XOOPS_CACHE_PATH);
106 106
     foreach ($attachments_tmp as $key => $attachment) {
107
-        $attach = ' <a href="' . $url_prefix . '/' . $attachment[0] . '" rel="external">' . $attachment[1] . '</a><br>';
107
+        $attach = ' <a href="'.$url_prefix.'/'.$attachment[0].'" rel="external">'.$attachment[1].'</a><br>';
108 108
         $delete_attach_checkbox->addOption($key, $attach);
109 109
     }
110 110
     $form->addElement($delete_attach_checkbox);
Please login to merge, or discard this patch.
include/functions.render.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
17 17
 
18
-defined('NEWBB_FUNCTIONS_INI') || include __DIR__ . '/functions.ini.php';
18
+defined('NEWBB_FUNCTIONS_INI') || include __DIR__.'/functions.ini.php';
19 19
 define('NEWBB_FUNCTIONS_RENDER_LOADED', true);
20 20
 
21 21
 if (!defined('NEWBB_FUNCTIONS_RENDER')):
@@ -60,16 +60,16 @@  discard block
 block discarded – undo
60 60
             // decode xcode
61 61
             if (0 != $image) {
62 62
                 // image allowed
63
-                $text =& $myts->xoopsCodeDecode($text);
63
+                $text = & $myts->xoopsCodeDecode($text);
64 64
             } else {
65 65
                 // image not allowed
66
-                $text =& $myts->xoopsCodeDecode($text, 0);
66
+                $text = & $myts->xoopsCodeDecode($text, 0);
67 67
             }
68 68
         }
69 69
         if (0 != $br) {
70
-            $text =& $myts->nl2Br($text);
70
+            $text = & $myts->nl2Br($text);
71 71
         }
72
-        $text = $myts->codeConv($text, $xcode, $image);    // Ryuji_edit(2003-11-18)
72
+        $text = $myts->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18)
73 73
 
74 74
         return $text;
75 75
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         $button = "<input type='button' name='{$button}' {$extra} value='{$alt}' onclick='window.location.href={$link}'>";
101 101
         if (empty($asImage)) {
102
-            $button = "<a href='{$link}' title='{$alt}' {$extra}>" . sf_displayImage($button, $alt, true) . '</a>';
102
+            $button = "<a href='{$link}' title='{$alt}' {$extra}>".sf_displayImage($button, $alt, true).'</a>';
103 103
         }
104 104
 
105 105
         return $button;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
                 $display = false;
129 129
             }
130 130
             // if set for each link => overwrite $display
131
-            if  (null !== ($helper->getConfig('display_text_each_link')[$image])) {
131
+            if (null !== ($helper->getConfig('display_text_each_link')[$image])) {
132 132
                 $display = empty($helper->getConfig('display_text_each_link')[$image]);
133 133
             }
134 134
         }
Please login to merge, or discard this patch.
include/functions.image.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -33,24 +33,24 @@  discard block
 block discarded – undo
33 33
         /** @var Smartfaq\Helper $helper */
34 34
         $helper = Smartfaq\Helper::getInstance();
35 35
 
36
-        $img_path   = XOOPS_ROOT_PATH . '/' . $helper->getConfig('dir_attachments');
37
-        $img_url    = XOOPS_URL . '/' . $helper->getConfig('dir_attachments');
38
-        $thumb_path = $img_path . '/thumbs';
39
-        $thumb_url  = $img_url . '/thumbs';
36
+        $img_path   = XOOPS_ROOT_PATH.'/'.$helper->getConfig('dir_attachments');
37
+        $img_url    = XOOPS_URL.'/'.$helper->getConfig('dir_attachments');
38
+        $thumb_path = $img_path.'/thumbs';
39
+        $thumb_url  = $img_url.'/thumbs';
40 40
 
41
-        $thumb     = $thumb_path . '/' . $source;
42
-        $image     = $img_path . '/' . $source;
43
-        $thumb_url = $thumb_url . '/' . $source;
44
-        $image_url = $img_url . '/' . $source;
41
+        $thumb     = $thumb_path.'/'.$source;
42
+        $image     = $img_path.'/'.$source;
43
+        $thumb_url = $thumb_url.'/'.$source;
44
+        $image_url = $img_url.'/'.$source;
45 45
 
46 46
         $imginfo  = @getimagesize($image);
47
-        $img_info = (count($imginfo) > 0) ? $imginfo[0] . 'X' . $imginfo[1] . ' px' : '';
47
+        $img_info = (count($imginfo) > 0) ? $imginfo[0].'X'.$imginfo[1].' px' : '';
48 48
 
49 49
         if ($helper->getConfig('max_image_width') > 0 && $helper->getConfig('max_image_height') > 0) {
50 50
             if ($imginfo[0] > $helper->getConfig('max_image_width')
51 51
                 || $imginfo[1] > $helper->getConfig('max_image_height')) {
52 52
                 //if (!file_exists($thumb_path.'/'.$source) && $imginfo[0] > $helper->getConfig('max_img_width')) {
53
-                if (!file_exists($thumb_path . '/' . $source)) {
53
+                if (!file_exists($thumb_path.'/'.$source)) {
54 54
                     sf_createThumbnail($source, $helper->getConfig('max_image_width'));
55 55
                 }
56 56
             }
@@ -59,27 +59,27 @@  discard block
 block discarded – undo
59 59
                 || $imginfo[1] > $helper->getConfig('max_image_height')) {
60 60
                 $pseudo_width  = $helper->getConfig('max_image_width');
61 61
                 $pseudo_height = $helper->getConfig('max_image_width') * ($imginfo[1] / $imginfo[0]);
62
-                $pseudo_size   = "width='" . $pseudo_width . "px' height='" . $pseudo_height . "px'";
62
+                $pseudo_size   = "width='".$pseudo_width."px' height='".$pseudo_height."px'";
63 63
             }
64 64
             // irmtfan to fix Undefined variable: pseudo_height
65 65
             if (!empty($pseudo_height) && $helper->getConfig('max_image_height') > 0
66 66
                 && $pseudo_height > $helper->getConfig('max_image_height')) {
67 67
                 $pseudo_height = $helper->getConfig('max_image_height');
68 68
                 $pseudo_width  = $helper->getConfig('max_image_height') * ($imginfo[0] / $imginfo[1]);
69
-                $pseudo_size   = "width='" . $pseudo_width . "px' height='" . $pseudo_height . "px'";
69
+                $pseudo_size   = "width='".$pseudo_width."px' height='".$pseudo_height."px'";
70 70
             }
71 71
         }
72 72
 
73 73
         if (file_exists($thumb)) {
74
-            $attachmentImage = '<a href="' . $image_url . '" title="' . $source . ' ' . $img_info . '" target="_blank">';
75
-            $attachmentImage .= '<img src="' . $thumb_url . '" alt="' . $source . ' ' . $img_info . '">';
74
+            $attachmentImage = '<a href="'.$image_url.'" title="'.$source.' '.$img_info.'" target="_blank">';
75
+            $attachmentImage .= '<img src="'.$thumb_url.'" alt="'.$source.' '.$img_info.'">';
76 76
             $attachmentImage .= '</a>';
77 77
         } elseif (!empty($pseudo_size)) {
78
-            $attachmentImage = '<a href="' . $image_url . '" title="' . $source . ' ' . $img_info . '" target="_blank">';
79
-            $attachmentImage .= '<img src="' . $image_url . '" ' . $pseudo_size . ' alt="' . $source . ' ' . $img_info . '">';
78
+            $attachmentImage = '<a href="'.$image_url.'" title="'.$source.' '.$img_info.'" target="_blank">';
79
+            $attachmentImage .= '<img src="'.$image_url.'" '.$pseudo_size.' alt="'.$source.' '.$img_info.'">';
80 80
             $attachmentImage .= '</a>';
81 81
         } elseif (file_exists($image)) {
82
-            $attachmentImage = '<img src="' . $image_url . '" alt="' . $source . ' ' . $img_info . '">';
82
+            $attachmentImage = '<img src="'.$image_url.'" alt="'.$source.' '.$img_info.'">';
83 83
         } else {
84 84
             $attachmentImage = '';
85 85
         }
@@ -97,10 +97,10 @@  discard block
 block discarded – undo
97 97
         /** @var Smartfaq\Helper $helper */
98 98
         $helper = Smartfaq\Helper::getInstance();
99 99
 
100
-        $img_path   = XOOPS_ROOT_PATH . '/' . $helper->getConfig('dir_attachments');
101
-        $thumb_path = $img_path . '/thumbs';
102
-        $src_file   = $img_path . '/' . $source;
103
-        $new_file   = $thumb_path . '/' . $source;
100
+        $img_path   = XOOPS_ROOT_PATH.'/'.$helper->getConfig('dir_attachments');
101
+        $thumb_path = $img_path.'/thumbs';
102
+        $src_file   = $img_path.'/'.$source;
103
+        $new_file   = $thumb_path.'/'.$source;
104 104
         //$imageLibs = sf_getImageLibs();
105 105
 
106 106
         if (!filesize($src_file) || !is_readable($src_file)) {
@@ -126,14 +126,14 @@  discard block
 block discarded – undo
126 126
         if (1 == $helper->getConfig('image_lib') or 0 == $helper->getConfig('image_lib')) {
127 127
             if (preg_match("#[A-Z]:|\\\\#Ai", __FILE__)) {
128 128
                 $cur_dir     = __DIR__;
129
-                $src_file_im = '"' . $cur_dir . '\\' . str_replace('/', '\\', $src_file) . '"';
130
-                $new_file_im = '"' . $cur_dir . '\\' . str_replace('/', '\\', $new_file) . '"';
129
+                $src_file_im = '"'.$cur_dir.'\\'.str_replace('/', '\\', $src_file).'"';
130
+                $new_file_im = '"'.$cur_dir.'\\'.str_replace('/', '\\', $new_file).'"';
131 131
             } else {
132 132
                 $src_file_im = @escapeshellarg($src_file);
133 133
                 $new_file_im = @escapeshellarg($new_file);
134 134
             }
135
-            $path           = empty($helper->getConfig('path_magick')) ? '' : $helper->getConfig('path_magick') . '/';
136
-            $magick_command = $path . 'convert -quality 85 -antialias -sample ' . $newWidth . 'x' . $newHeight . ' ' . $src_file_im . ' +profile "*" ' . str_replace('\\', '/', $new_file_im) . '';
135
+            $path           = empty($helper->getConfig('path_magick')) ? '' : $helper->getConfig('path_magick').'/';
136
+            $magick_command = $path.'convert -quality 85 -antialias -sample '.$newWidth.'x'.$newHeight.' '.$src_file_im.' +profile "*" '.str_replace('\\', '/', $new_file_im).'';
137 137
 
138 138
             @passthru($magick_command);
139 139
             if (file_exists($new_file)) {
@@ -142,13 +142,13 @@  discard block
 block discarded – undo
142 142
         }
143 143
 
144 144
         if (2 == $helper->getConfig('image_lib') or 0 == $helper->getConfig('image_lib')) {
145
-            $path = empty($helper->getConfig('path_netpbm')) ? '' : $helper->getConfig('path_netpbm') . '/';
145
+            $path = empty($helper->getConfig('path_netpbm')) ? '' : $helper->getConfig('path_netpbm').'/';
146 146
             if (preg_match("/\.png/i", $source)) {
147
-                $cmd = $path . "pngtopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | " . $path . "pnmtopng > $new_file";
147
+                $cmd = $path."pngtopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ".$path."pnmtopng > $new_file";
148 148
             } elseif (preg_match("/\.(jpg|jpeg)/i", $source)) {
149
-                $cmd = $path . "jpegtopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | " . $path . "ppmtojpeg -quality=90 > $new_file";
149
+                $cmd = $path."jpegtopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ".$path."ppmtojpeg -quality=90 > $new_file";
150 150
             } elseif (preg_match("/\.gif/i", $source)) {
151
-                $cmd = $path . "giftopnm $src_file | " . $path . "pnmscale -xysize $newWidth $newHeight | ppmquant 256 | " . $path . "ppmtogif > $new_file";
151
+                $cmd = $path."giftopnm $src_file | ".$path."pnmscale -xysize $newWidth $newHeight | ppmquant 256 | ".$path."ppmtogif > $new_file";
152 152
             }
153 153
 
154 154
             @exec($cmd, $output, $retval);
Please login to merge, or discard this patch.
include/displayfaqs.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 /** @var Smartfaq\Helper $helper */
12 12
 $helper = Smartfaq\Helper::getInstance();
13 13
 
14
-global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB,  $xoopsModule;
14
+global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule;
15 15
 
16 16
 echo "<br>\n";
17 17
 if (!isset($categoryid) || ($categoryid < 1)) {
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 
29 29
 Smartfaq\Utility::collapsableBar('toptable', 'toptableicon');
30 30
 
31
-echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a>&nbsp;" . $faqs_title . '</h3>';
31
+echo "<img id='toptableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a>&nbsp;".$faqs_title.'</h3>';
32 32
 echo "<div id='toptable'>";
33
-echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . $faqs_info . '</span>';
33
+echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.$faqs_info.'</span>';
34 34
 
35 35
 // Get the total number of published FAQs
36 36
 $totalfaqs = $faqHandler->getFaqsCount($sel_cat, [Constants::SF_STATUS_PUBLISHED, Constants::SF_STATUS_NEW_ANSWER]);
@@ -41,22 +41,22 @@  discard block
 block discarded – undo
41 41
 $allCats         = $categoryHandler->getObjects(null, true);
42 42
 echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
43 43
 echo '<tr>';
44
-echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_ARTID . '</b></td>';
45
-echo "<th width='20%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>';
46
-echo "<th class='bg3' align='left'><b>" . _AM_SF_QUESTION . '</b></td>';
44
+echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_ARTID.'</b></td>';
45
+echo "<th width='20%' class='bg3' align='left'><b>"._AM_SF_ARTCOLNAME.'</b></td>';
46
+echo "<th class='bg3' align='left'><b>"._AM_SF_QUESTION.'</b></td>';
47 47
 
48
-echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ASKED . '</b></td>';
49
-echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ANSWERED . '</b></td>';
48
+echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ASKED.'</b></td>';
49
+echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ANSWERED.'</b></td>';
50 50
 
51
-echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_CREATED . '</b></td>';
52
-echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>';
51
+echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_CREATED.'</b></td>';
52
+echo "<th width='60' class='bg3' align='center'><b>"._AM_SF_ACTION.'</b></td>';
53 53
 echo '</tr>';
54 54
 if ($totalfaqs > 0) {
55 55
     global $pathIcon16, $smartModuleConfig;
56 56
     foreach ($faqsObj as $iValue) {
57 57
         $categoryObj = $allCats[$iValue->categoryid()];
58
-        $modify      = "<a href='faq.php?op=mod&amp;faqid=" . $iValue->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_EDITART . "' alt='" . _AM_SF_EDITART . "'></a>";
59
-        $delete      = "<a href='faq.php?op=del&amp;faqid=" . $iValue->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_EDITART . "' alt='" . _AM_SF_DELETEART . "'></a>";
58
+        $modify      = "<a href='faq.php?op=mod&amp;faqid=".$iValue->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_EDITART."' alt='"._AM_SF_EDITART."'></a>";
59
+        $delete      = "<a href='faq.php?op=del&amp;faqid=".$iValue->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_EDITART."' alt='"._AM_SF_DELETEART."'></a>";
60 60
 
61 61
         //adding name of the Question Submitter
62 62
         $requester = Smartfaq\Utility::getLinkedUnameFromId($iValue->uid(), $smartModuleConfig['userealname']);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $criteria->add(new \Criteria('faqid', $iValue->faqid()));
70 70
         $criteria->add(new \Criteria('status', true));
71 71
 
72
-        $answerObjects =& $answerHandler->getObjects($criteria, true);
72
+        $answerObjects = & $answerHandler->getObjects($criteria, true);
73 73
 
74 74
         foreach (array_keys($answerObjects) as $j) {
75 75
             $answerObj = $answerObjects[$j];
@@ -84,26 +84,26 @@  discard block
 block discarded – undo
84 84
         }
85 85
 
86 86
         echo '<tr>';
87
-        echo "<td class='head' align='center'>" . $iValue->faqid() . '</td>';
88
-        echo "<td class='even' align='left'>" . $categoryObj->name() . '</td>';
89
-        echo "<td class='even' align='left'><a href='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/faq.php?faqid=' . $iValue->faqid() . "'>" . $iValue->question(100) . '</a></td>';
87
+        echo "<td class='head' align='center'>".$iValue->faqid().'</td>';
88
+        echo "<td class='even' align='left'>".$categoryObj->name().'</td>';
89
+        echo "<td class='even' align='left'><a href='".XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/faq.php?faqid='.$iValue->faqid()."'>".$iValue->question(100).'</a></td>';
90 90
 
91
-        echo "<td class='even' align='center'>" . $requester . '</td>';
92
-        echo "<td class='even' align='center'>" . $answerSubmitter . '</td>';
91
+        echo "<td class='even' align='center'>".$requester.'</td>';
92
+        echo "<td class='even' align='center'>".$answerSubmitter.'</td>';
93 93
 
94
-        echo "<td class='even' align='center'>" . $iValue->datesub('s') . '</td>';
94
+        echo "<td class='even' align='center'>".$iValue->datesub('s').'</td>';
95 95
         echo "<td class='even' align='center'> $modify $delete </td>";
96 96
         echo '</tr>';
97 97
     }
98 98
 } else {
99 99
     $faqid = -1;
100 100
     echo '<tr>';
101
-    echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOFAQS . '</td>';
101
+    echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOFAQS.'</td>';
102 102
     echo '</tr>';
103 103
 }
104 104
 echo "</table>\n";
105 105
 echo "<br>\n";
106 106
 
107 107
 $pagenav = new \XoopsPageNav($totalfaqs, $helper->getConfig('perpage'), $startfaq, 'startfaq', $pagenav_extra_args);
108
-echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
108
+echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>';
109 109
 echo '</div>';
Please login to merge, or discard this patch.
open_category.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@  discard block
 block discarded – undo
11 11
 /** @var Smartfaq\Helper $helper */
12 12
 $helper = Smartfaq\Helper::getInstance();
13 13
 
14
-require_once __DIR__ . '/header.php';
14
+require_once __DIR__.'/header.php';
15 15
 
16 16
 global $xoopsConfig, $xoopsModule;
17 17
 
18 18
 $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_category.tpl';
19 19
 
20
-require_once XOOPS_ROOT_PATH . '/header.php';
21
-require_once __DIR__ . '/footer.php';
20
+require_once XOOPS_ROOT_PATH.'/header.php';
21
+require_once __DIR__.'/footer.php';
22 22
 
23 23
 $categoryid = \Xmf\Request::getInt('categoryid', 0, 'GET');
24 24
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 $last_qnaObj = $faqHandler->getLastPublishedByCat([Constants::SF_STATUS_OPENED]);
66 66
 if (isset($last_qnaObj[$categoryid])) {
67 67
     $categoryObj->setVar('last_faqid', $last_qnaObj[$categoryid]->getVar('faqid'));
68
-    $categoryObj->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$categoryid]->getVar('faqid') . "'>" . $last_qnaObj[$categoryid]->question(50) . '</a>');
68
+    $categoryObj->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$categoryid]->getVar('faqid')."'>".$last_qnaObj[$categoryid]->question(50).'</a>');
69 69
 }
70 70
 // Populating the smarty variables with informations related to the selected category
71 71
 $category                 = $categoryObj->toArray(null, true);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 $category['categoryPath'] = $categoryObj->getCategoryPath(false, true);
74 74
 
75 75
 // Creating the sub-categories objects that belong to the selected category
76
-$subcatsObj     =& $categoryHandler->getCategories(0, 0, $categoryid);
76
+$subcatsObj     = & $categoryHandler->getCategories(0, 0, $categoryid);
77 77
 $total_subcats  = count($subcatsObj);
78 78
 $catQnasWithSub = 0;
79 79
 if (0 != $total_subcats) {
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
         if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) {
85 85
             if (isset($last_qnaObj[$subcat_id])) {
86 86
                 $subcat->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid'));
87
-                $subcat->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question(50) . '</a>');
87
+                $subcat->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question(50).'</a>');
88 88
             }
89 89
             $subcat->setVar('faqcount', $totalQnas[$subcat_id]);
90 90
             $subcats[$subcat_id] = $subcat->toArray(null, true);
91
-            $catQnasWithSub      += $subcats[$subcat_id]['total'];
91
+            $catQnasWithSub += $subcats[$subcat_id]['total'];
92 92
         }
93 93
     }
94 94
     $xoopsTpl->assign('subcats', $subcats);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     }
103 103
 
104 104
     $memberHandler = xoops_getHandler('member');
105
-    $users         = $memberHandler->getUsers(new \Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true);
105
+    $users         = $memberHandler->getUsers(new \Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true);
106 106
     foreach ($faqsObj as $iValue) {
107 107
         $faq = $iValue->toArray(null, $allcategories);
108 108
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     }
115 115
 }
116 116
 // Language constants
117
-$xoopsTpl->assign('whereInSection', $myts->htmlSpecialChars($xoopsModule->getVar('name')) . " > <a href='open_index.php'>" . _MD_SF_OPEN_SECTION . '</a>');
117
+$xoopsTpl->assign('whereInSection', $myts->htmlSpecialChars($xoopsModule->getVar('name'))." > <a href='open_index.php'>"._MD_SF_OPEN_SECTION.'</a>');
118 118
 $xoopsTpl->assign('modulename', $xoopsModule->dirname());
119 119
 
120 120
 $xoopsTpl->assign('displaylastfaqs', true);
@@ -131,19 +131,19 @@  discard block
 block discarded – undo
131 131
 $xoopsTpl->assign('lang_category', _MD_SF_CATEGORY);
132 132
 
133 133
 // The Navigation Bar
134
-require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
135
-$pagenav = new \XoopsPageNav($totalQnas[$categoryid], $helper->getConfig('indexperpage'), $start, 'start', 'categoryid=' . $categoryObj->getVar('categoryid'));
134
+require_once XOOPS_ROOT_PATH.'/class/pagenav.php';
135
+$pagenav = new \XoopsPageNav($totalQnas[$categoryid], $helper->getConfig('indexperpage'), $start, 'start', 'categoryid='.$categoryObj->getVar('categoryid'));
136 136
 if (1 == $helper->getConfig('useimagenavpage')) {
137
-    $category['navbar'] = '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>';
137
+    $category['navbar'] = '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>';
138 138
 } else {
139
-    $category['navbar'] = '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
139
+    $category['navbar'] = '<div style="text-align:right;">'.$pagenav->renderNav().'</div>';
140 140
 }
141 141
 
142 142
 $xoopsTpl->assign('category', $category);
143 143
 
144 144
 // Page Title Hack by marcan
145 145
 $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name'));
146
-$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $category['name']);
146
+$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$category['name']);
147 147
 // End Page Title Hack by marcan
148 148
 
149
-require_once XOOPS_ROOT_PATH . '/footer.php';
149
+require_once XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.