@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) { |
29 | 29 | exit('Access Denied'); |
30 | 30 | } |
31 | -require_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; |
|
32 | -include XOOPS_ROOT_PATH . '/modules/system/admin/blocksadmin/blocksadmin.php'; |
|
31 | +require_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
32 | +include XOOPS_ROOT_PATH.'/modules/system/admin/blocksadmin/blocksadmin.php'; |
|
33 | 33 | |
34 | 34 | $op = 'list'; |
35 | 35 | if (isset($HTTP_POST_VARS)) { |
@@ -49,9 +49,9 @@ discard block |
||
49 | 49 | |
50 | 50 | if (isset($previewblock)) { |
51 | 51 | xoops_cp_header(); |
52 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
52 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
53 | 53 | $xoopsTpl = new \XoopsTpl(); |
54 | - $xoopsTpl->caching= 0; |
|
54 | + $xoopsTpl->caching = 0; |
|
55 | 55 | if (isset($bid)) { |
56 | 56 | $block['bid'] = $bid; |
57 | 57 | $block['form_title'] = _AM_EDITBLOCK; |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | . $myblock->getContent('S', $bctype) |
84 | 84 | . '</td></tr></table></body></html>'; |
85 | 85 | |
86 | - $dummyfile = '_dummyfile_' . time() . '.html'; |
|
87 | - $fp = fopen(XOOPS_CACHE_PATH . '/' . $dummyfile, 'w'); |
|
86 | + $dummyfile = '_dummyfile_'.time().'.html'; |
|
87 | + $fp = fopen(XOOPS_CACHE_PATH.'/'.$dummyfile, 'w'); |
|
88 | 88 | fwrite($fp, $dummyhtml); |
89 | 89 | fclose($fp); |
90 | 90 | $block['edit_form'] = false; |
@@ -95,24 +95,24 @@ discard block |
||
95 | 95 | $block['visible'] = $bvisible; |
96 | 96 | $block['title'] = $myblock->getVar('title', 'E'); |
97 | 97 | $block['content'] = $myblock->getVar('content', 'E'); |
98 | - $block['modules'] =& $bmodule; |
|
98 | + $block['modules'] = & $bmodule; |
|
99 | 99 | $block['ctype'] = isset($bctype) ? $bctype : $myblock->getVar('c_type'); |
100 | 100 | $block['is_custom'] = true; |
101 | 101 | $block['cachetime'] = (int)$bcachetime; |
102 | - echo '<a href="admin.php?fct=blocksadmin">' . _AM_BADMIN . '</a> <span style="font-weight:bold;">»»</span> ' . $block['form_title'] . '<br><br>'; |
|
103 | - include XOOPS_ROOT_PATH . '/modules/system/admin/blocksadmin/blockform.php'; |
|
102 | + echo '<a href="admin.php?fct=blocksadmin">'._AM_BADMIN.'</a> <span style="font-weight:bold;">»»</span> '.$block['form_title'].'<br><br>'; |
|
103 | + include XOOPS_ROOT_PATH.'/modules/system/admin/blocksadmin/blockform.php'; |
|
104 | 104 | $form->display(); |
105 | 105 | xoops_cp_footer(); |
106 | 106 | echo '<script type="text/javascript"> |
107 | 107 | <!--// |
108 | - preview_window = openWithSelfMain("' . XOOPS_URL . '/modules/system/admin.php?fct=blocksadmin&op=previewpopup&file=' . $dummyfile . '", "popup", 250, 200); |
|
108 | + preview_window = openWithSelfMain("' . XOOPS_URL.'/modules/system/admin.php?fct=blocksadmin&op=previewpopup&file='.$dummyfile.'", "popup", 250, 200); |
|
109 | 109 | //--> |
110 | 110 | </script>'; |
111 | 111 | exit(); |
112 | 112 | } |
113 | 113 | |
114 | 114 | if ('previewpopup' === $op) { |
115 | - $file = str_replace('..', '', XOOPS_CACHE_PATH . '/' . trim($HTTP_GET_VARS['file'])); |
|
115 | + $file = str_replace('..', '', XOOPS_CACHE_PATH.'/'.trim($HTTP_GET_VARS['file'])); |
|
116 | 116 | if (file_exists($file)) { |
117 | 117 | include $file; |
118 | 118 | @unlink($file); |
@@ -254,24 +254,24 @@ discard block |
||
254 | 254 | $sql = sprintf('INSERT INTO %s (block_id, module_id) VALUES (%u, %d)', $db->prefix('block_module_link'), $bid, (int)$bmid); |
255 | 255 | $db->query($sql); |
256 | 256 | } |
257 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
257 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
258 | 258 | $xoopsTpl = new \XoopsTpl(); |
259 | - $xoopsTpl->caching= 2; |
|
259 | + $xoopsTpl->caching = 2; |
|
260 | 260 | if ('' != $myblock->getVar('template')) { |
261 | - if ($xoopsTpl->is_cached('db:' . $myblock->getVar('template'))) { |
|
262 | - if (!$xoopsTpl->clear_cache('db:' . $myblock->getVar('template'))) { |
|
263 | - $msg = 'Unable to clear cache for block ID' . $bid; |
|
261 | + if ($xoopsTpl->is_cached('db:'.$myblock->getVar('template'))) { |
|
262 | + if (!$xoopsTpl->clear_cache('db:'.$myblock->getVar('template'))) { |
|
263 | + $msg = 'Unable to clear cache for block ID'.$bid; |
|
264 | 264 | } |
265 | 265 | } |
266 | 266 | } else { |
267 | - if ($xoopsTpl->is_cached('db:system_dummy.tpl', 'block' . $bid)) { |
|
268 | - if (!$xoopsTpl->clear_cache('db:system_dummy.tpl', 'block' . $bid)) { |
|
269 | - $msg = 'Unable to clear cache for block ID' . $bid; |
|
267 | + if ($xoopsTpl->is_cached('db:system_dummy.tpl', 'block'.$bid)) { |
|
268 | + if (!$xoopsTpl->clear_cache('db:system_dummy.tpl', 'block'.$bid)) { |
|
269 | + $msg = 'Unable to clear cache for block ID'.$bid; |
|
270 | 270 | } |
271 | 271 | } |
272 | 272 | } |
273 | 273 | } else { |
274 | - $msg = 'Failed update of block. ID:' . $bid; |
|
274 | + $msg = 'Failed update of block. ID:'.$bid; |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | return $msg; // GIJ + |
@@ -28,24 +28,24 @@ discard block |
||
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 |
||
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 |
||
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)) { |
@@ -120,14 +120,14 @@ discard block |
||
120 | 120 | if (1 == $xoopsModuleConfig['image_lib'] or 0 == $xoopsModuleConfig['image_lib']) { |
121 | 121 | if (preg_match("#[A-Z]:|\\\\#Ai", __FILE__)) { |
122 | 122 | $cur_dir = __DIR__; |
123 | - $src_file_im = '"' . $cur_dir . '\\' . str_replace('/', '\\', $src_file) . '"'; |
|
124 | - $new_file_im = '"' . $cur_dir . '\\' . str_replace('/', '\\', $new_file) . '"'; |
|
123 | + $src_file_im = '"'.$cur_dir.'\\'.str_replace('/', '\\', $src_file).'"'; |
|
124 | + $new_file_im = '"'.$cur_dir.'\\'.str_replace('/', '\\', $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 |
||
136 | 136 | } |
137 | 137 | |
138 | 138 | if (2 == $xoopsModuleConfig['image_lib'] or 0 == $xoopsModuleConfig['image_lib']) { |
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); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $searchcat = new \XoopsFormSelect(_MD_WB_CATEGORY, 'categoryID', $categoryID); |
22 | 22 | $searchcat->addOption('0', _MD_WB_ALLOFTHEM); |
23 | 23 | |
24 | - $resultcat = $xoopsDB->queryF('SELECT categoryID, name FROM ' . $xoopsDB->prefix('wbcategories') . ' ORDER BY categoryID'); |
|
24 | + $resultcat = $xoopsDB->queryF('SELECT categoryID, name FROM '.$xoopsDB->prefix('wbcategories').' ORDER BY categoryID'); |
|
25 | 25 | |
26 | 26 | while (list($categoryID, $name) = $xoopsDB->fetchRow($resultcat)) { |
27 | 27 | $searchcat->addOption('categoryID', "$categoryID : $name"); |
@@ -22,25 +22,25 @@ discard block |
||
22 | 22 | $moduleDirName = basename(dirname(__DIR__)); |
23 | 23 | $moduleDirNameUpper = strtoupper($moduleDirName); |
24 | 24 | return (object)[ |
25 | - 'name' => strtoupper($moduleDirName) . ' Module Configurator', |
|
25 | + 'name' => strtoupper($moduleDirName).' Module Configurator', |
|
26 | 26 | 'paths' => [ |
27 | 27 | 'dirname' => $moduleDirName, |
28 | - 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', |
|
29 | - 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, |
|
30 | - 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, |
|
31 | - 'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName, |
|
32 | - 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, |
|
28 | + 'admin' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin', |
|
29 | + 'modPath' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName, |
|
30 | + 'modUrl' => XOOPS_URL.'/modules/'.$moduleDirName, |
|
31 | + 'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName, |
|
32 | + 'uploadUrl' => XOOPS_UPLOAD_URL.'/'.$moduleDirName, |
|
33 | 33 | ], |
34 | 34 | 'uploadFolders' => [ |
35 | - constant($moduleDirNameUpper . '_UPLOAD_PATH'), |
|
36 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/category', |
|
37 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/screenshots', |
|
35 | + constant($moduleDirNameUpper.'_UPLOAD_PATH'), |
|
36 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/category', |
|
37 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/screenshots', |
|
38 | 38 | //XOOPS_UPLOAD_PATH . '/flags' |
39 | 39 | ], |
40 | 40 | 'copyBlankFiles' => [ |
41 | - constant($moduleDirNameUpper . '_UPLOAD_PATH'), |
|
42 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/category', |
|
43 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/screenshots', |
|
41 | + constant($moduleDirNameUpper.'_UPLOAD_PATH'), |
|
42 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/category', |
|
43 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/screenshots', |
|
44 | 44 | //XOOPS_UPLOAD_PATH . '/flags' |
45 | 45 | ], |
46 | 46 | |
@@ -75,6 +75,6 @@ discard block |
||
75 | 75 | '/images', |
76 | 76 | ], |
77 | 77 | 'modCopyright' => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'> |
78 | - <img src='" . constant($moduleDirNameUpper . '_AUTHOR_LOGOIMG') . '\' alt=\'XOOPS Project\' /></a>', |
|
78 | + <img src='" . constant($moduleDirNameUpper.'_AUTHOR_LOGOIMG').'\' alt=\'XOOPS Project\' /></a>', |
|
79 | 79 | ]; |
80 | 80 | } |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | use XoopsModules\Smartfaq; |
10 | 10 | |
11 | -require_once __DIR__ . '/header.php'; |
|
11 | +require_once __DIR__.'/header.php'; |
|
12 | 12 | |
13 | 13 | $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
14 | 14 | |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | } |
36 | 36 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_category.tpl'; |
37 | 37 | |
38 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
39 | -require_once __DIR__ . '/footer.php'; |
|
38 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
39 | +require_once __DIR__.'/footer.php'; |
|
40 | 40 | |
41 | 41 | // At which record shall we start |
42 | 42 | $start = isset($_GET['start']) ? (int)$_GET['start'] : 0; |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | } |
77 | 77 | $lastfaqsize = (int)$xoopsModuleConfig['lastfaqsize']; |
78 | 78 | // Creating the sub-categories objects that belong to the selected category |
79 | -$subcatsObj =& $categoryHandler->getCategories(0, 0, $categoryid); |
|
79 | +$subcatsObj = & $categoryHandler->getCategories(0, 0, $categoryid); |
|
80 | 80 | $total_subcats = count($subcatsObj); |
81 | 81 | $total_faqs = 0; |
82 | 82 | if (0 != $total_subcats) { |
@@ -86,12 +86,12 @@ discard block |
||
86 | 86 | if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) { |
87 | 87 | if (isset($last_qnaObj[$subcat_id])) { |
88 | 88 | $subcatsObj[$i]->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid')); |
89 | - $subcatsObj[$i]->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question($lastfaqsize) . '</a>'); |
|
89 | + $subcatsObj[$i]->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question($lastfaqsize).'</a>'); |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | $subcatsObj[$i]->setVar('faqcount', $totalQnas[$subcat_id]); |
93 | 93 | $subcats[$subcat_id] = $subcatsObj[$i]->toArray(); |
94 | - $total_faqs += $totalQnas[$subcat_id]; |
|
94 | + $total_faqs += $totalQnas[$subcat_id]; |
|
95 | 95 | //}replacé ligne 92 |
96 | 96 | } |
97 | 97 | $xoopsTpl->assign('subcats', $subcats); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | } |
115 | 115 | |
116 | 116 | $memberHandler = xoops_getHandler('member'); |
117 | - $users = $memberHandler->getUsers(new \Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
117 | + $users = $memberHandler->getUsers(new \Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
118 | 118 | // Adding the Q&As of the selected category |
119 | 119 | foreach ($faqsObj as $iValue) { |
120 | 120 | $faq = $iValue->toArray(null, $categoryObj); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | if (isset($last_qnaObj) && $last_qnaObj) { |
142 | 142 | $category['last_faqid'] = $last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid'); |
143 | - $category['last_question_link'] = "<a href='faq.php?faqid=" . $last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid') . "'>" . $last_qnaObj[$categoryObj->getVar('categoryid')]->question($lastfaqsize) . '</a>'; |
|
143 | + $category['last_question_link'] = "<a href='faq.php?faqid=".$last_qnaObj[$categoryObj->getVar('categoryid')]->getVar('faqid')."'>".$last_qnaObj[$categoryObj->getVar('categoryid')]->question($lastfaqsize).'</a>'; |
|
144 | 144 | } |
145 | 145 | } |
146 | 146 | |
@@ -165,26 +165,26 @@ discard block |
||
165 | 165 | $xoopsTpl->assign('lang_comments', _MD_SF_COMMENTS); |
166 | 166 | |
167 | 167 | // The Navigation Bar |
168 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
169 | -$pagenav = new \XoopsPageNav($thiscategory_faqcount, $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid=' . $categoryObj->getVar('categoryid')); |
|
168 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
169 | +$pagenav = new \XoopsPageNav($thiscategory_faqcount, $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid='.$categoryObj->getVar('categoryid')); |
|
170 | 170 | if (1 == $xoopsModuleConfig['useimagenavpage']) { |
171 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
171 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
172 | 172 | } else { |
173 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
173 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | $xoopsTpl->assign('category', $category); |
177 | 177 | |
178 | 178 | // Page Title Hack by marcan |
179 | 179 | $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
180 | -$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $category['name']); |
|
180 | +$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$category['name']); |
|
181 | 181 | // End Page Title Hack by marcan |
182 | 182 | |
183 | 183 | //code to include smartie |
184 | -if (file_exists(XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php')) { |
|
185 | - require_once XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php'; |
|
184 | +if (file_exists(XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php')) { |
|
185 | + require_once XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php'; |
|
186 | 186 | $xoopsTpl->assign('smarttie', 1); |
187 | 187 | } |
188 | 188 | //end code for smarttie |
189 | 189 | |
190 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
190 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |