@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @author The SmartFactory <www.smartfactory.ca> |
26 | 26 | * @version $Id$ |
27 | 27 | */ |
28 | -require_once __DIR__ . '/header.php'; |
|
28 | +require_once __DIR__.'/header.php'; |
|
29 | 29 | $xoops = Xoops::getInstance(); |
30 | 30 | $helper = Helper::getInstance(); |
31 | 31 | $helper->loadLanguage('admin'); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | 'author_alias', |
118 | 118 | ]; |
119 | 119 | foreach ($elements as $element) { |
120 | - if (isset($_REQUEST[$element]) && !in_array(constant('_PUBLISHER_' . mb_strtoupper($element)), $form_view)) { |
|
120 | + if (isset($_REQUEST[$element]) && !in_array(constant('_PUBLISHER_'.mb_strtoupper($element)), $form_view)) { |
|
121 | 121 | $xoops->redirect('index.php', 1, _MD_PUBLISHER_SUBMIT_ERROR); |
122 | 122 | } |
123 | 123 | } |
@@ -131,12 +131,12 @@ discard block |
||
131 | 131 | |
132 | 132 | if ($confirm) { |
133 | 133 | if (!$helper->getItemHandler()->delete($itemObj)) { |
134 | - $xoops->redirect('index.php', 2, _AM_PUBLISHER_ITEM_DELETE_ERROR . Publisher\Utils::formatErrors($itemObj->getErrors())); |
|
134 | + $xoops->redirect('index.php', 2, _AM_PUBLISHER_ITEM_DELETE_ERROR.Publisher\Utils::formatErrors($itemObj->getErrors())); |
|
135 | 135 | } |
136 | 136 | $xoops->redirect('index.php', 2, sprintf(_AM_PUBLISHER_ITEMISDELETED, $itemObj->title())); |
137 | 137 | } else { |
138 | 138 | $xoops->header(); |
139 | - echo $xoops->confirm(['op' => 'del', 'itemid' => $itemObj->getVar('itemid'), 'confirm' => 1, 'name' => $itemObj->title()], 'submit.php', _AM_PUBLISHER_DELETETHISITEM . " <br>'" . $itemObj->title() . "'. <br> <br>", _AM_PUBLISHER_DELETE); |
|
139 | + echo $xoops->confirm(['op' => 'del', 'itemid' => $itemObj->getVar('itemid'), 'confirm' => 1, 'name' => $itemObj->title()], 'submit.php', _AM_PUBLISHER_DELETETHISITEM." <br>'".$itemObj->title()."'. <br> <br>", _AM_PUBLISHER_DELETE); |
|
140 | 140 | $xoops->footer(); |
141 | 141 | } |
142 | 142 | break; |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | $xoops->header('module:publisher/publisher_submit.tpl'); |
230 | 230 | $xoopsTpl = $xoops->tpl(); |
231 | 231 | $xoTheme = $xoops->theme(); |
232 | - $xoTheme->addScript(PUBLISHER_URL . '/js/publisher.js'); |
|
232 | + $xoTheme->addScript(PUBLISHER_URL.'/js/publisher.js'); |
|
233 | 233 | XoopsLoad::loadFile($helper->path('footer.php')); |
234 | 234 | |
235 | 235 | $itemObj->setVarsFromRequest(); |
@@ -145,9 +145,9 @@ |
||
145 | 145 | $comEle = new RadioYesNo(_MB_PUBLISHER_DISPLAY_COMMENTS, 'options[5]', $options[5]); |
146 | 146 | $typeEle = new Select(_MB_PUBLISHER_DISPLAY_TYPE, 'options[6]', $options[6]); |
147 | 147 | $typeEle->addOptionArray([ |
148 | - 'block' => _MB_PUBLISHER_DISPLAY_TYPE_BLOCK, |
|
149 | - 'bullet' => _MB_PUBLISHER_DISPLAY_TYPE_BULLET, |
|
150 | - ]); |
|
148 | + 'block' => _MB_PUBLISHER_DISPLAY_TYPE_BLOCK, |
|
149 | + 'bullet' => _MB_PUBLISHER_DISPLAY_TYPE_BULLET, |
|
150 | + ]); |
|
151 | 151 | $truncateEle = new Text(_MB_PUBLISHER_TRUNCATE, 'options[7]', 4, 255, $options[7]); |
152 | 152 | $imageEle = new RadioYesNo(_MB_PUBLISHER_DISPLAY_CATIMAGE, 'options[8]', $options[8]); |
153 | 153 | $form->addElement($autoEle); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | use XoopsModules\Publisher; |
28 | 28 | use XoopsModules\Publisher\Helper; |
29 | 29 | |
30 | -require_once dirname(__DIR__) . '/include/common.php'; |
|
30 | +require_once dirname(__DIR__).'/include/common.php'; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * @param $options |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $category['name'] = $cat->getVar('name'); |
60 | 60 | $category['categoryurl'] = $cat->getCategoryUrl(); |
61 | 61 | if ('blank.png' !== $cat->image()) { |
62 | - $category['image_path'] = Publisher\Utils::getImageDir('category', false) . $cat->image(); |
|
62 | + $category['image_path'] = Publisher\Utils::getImageDir('category', false).$cat->image(); |
|
63 | 63 | } else { |
64 | 64 | $category['image_path'] = ''; |
65 | 65 | } |
@@ -164,9 +164,9 @@ |
||
164 | 164 | |
165 | 165 | $tempEle = new Select(_MB_PUBLISHER_TEMPLATE, 'options[4]', $options[4]); |
166 | 166 | $tempEle->addOptionArray([ |
167 | - 'normal' => _MB_PUBLISHER_TEMPLATE_NORMAL, |
|
168 | - 'extended' => _MB_PUBLISHER_TEMPLATE_EXTENDED, |
|
169 | - ]); |
|
167 | + 'normal' => _MB_PUBLISHER_TEMPLATE_NORMAL, |
|
168 | + 'extended' => _MB_PUBLISHER_TEMPLATE_EXTENDED, |
|
169 | + ]); |
|
170 | 170 | |
171 | 171 | $form->addElement($colEle); |
172 | 172 | $form->addElement($catEle); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | use XoopsModules\Publisher; |
27 | 27 | use XoopsModules\Publisher\Helper; |
28 | 28 | |
29 | -require_once dirname(__DIR__) . '/include/common.php'; |
|
29 | +require_once dirname(__DIR__).'/include/common.php'; |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * Function To Show Publisher Items From Categories In Their Own Columns |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $block['columns'] = $columns; |
137 | 137 | $block['columnwidth'] = (int)(100 / $opt_num_columns); |
138 | 138 | |
139 | - $xoTheme->addStylesheet(XoopsBaseConfig::get('url') . '/modules/' . PUBLISHER_DIRNAME . '/css/publisher.css'); |
|
139 | + $xoTheme->addStylesheet(XoopsBaseConfig::get('url').'/modules/'.PUBLISHER_DIRNAME.'/css/publisher.css'); |
|
140 | 140 | |
141 | 141 | return $block; |
142 | 142 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | use Xoops\Form\DateSelect; |
26 | 26 | use XoopsModules\Publisher\Helper; |
27 | 27 | |
28 | -require_once dirname(__DIR__) . '/include/common.php'; |
|
28 | +require_once dirname(__DIR__).'/include/common.php'; |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * @param $options |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $block['lang_poster'] = _MB_PUBLISHER_POSTEDBY; |
68 | 68 | $block['lang_date'] = _MB_PUBLISHER_DATE; |
69 | 69 | $modulename = $myts->displayTarea($helper->getModule()->getVar('name')); |
70 | - $block['lang_visitItem'] = _MB_PUBLISHER_VISITITEM . ' ' . $modulename; |
|
70 | + $block['lang_visitItem'] = _MB_PUBLISHER_VISITITEM.' '.$modulename; |
|
71 | 71 | $block['lang_articles_from_to'] = sprintf(_MB_PUBLISHER_ARTICLES_FROM_TO, $options[0], $options[1]); |
72 | 72 | } |
73 | 73 |
@@ -80,10 +80,10 @@ |
||
80 | 80 | $catEle = new Label(_MB_PUBLISHER_SELECTCAT, Publisher\Utils::createCategorySelect($options[0], 0, true, 'options[0]')); |
81 | 81 | $orderEle = new Select(_MB_PUBLISHER_ORDER, 'options[1]', $options[1]); |
82 | 82 | $orderEle->addOptionArray([ |
83 | - 'datesub' => _MB_PUBLISHER_DATE, |
|
84 | - 'counter' => _MB_PUBLISHER_HITS, |
|
85 | - 'weight' => _MB_PUBLISHER_WEIGHT, |
|
86 | - ]); |
|
83 | + 'datesub' => _MB_PUBLISHER_DATE, |
|
84 | + 'counter' => _MB_PUBLISHER_HITS, |
|
85 | + 'weight' => _MB_PUBLISHER_WEIGHT, |
|
86 | + ]); |
|
87 | 87 | $dispEle = new Text(_MB_PUBLISHER_DISP, 'options[2]', 10, 255, $options[2]); |
88 | 88 | $directEle = new RadioYesNo(_MB_PUBLISHER_DIRECTDOWNLOAD, 'options[3]', $options[3]); |
89 | 89 |
@@ -27,7 +27,7 @@ |
||
27 | 27 | use XoopsModules\Publisher; |
28 | 28 | use XoopsModules\Publisher\Helper; |
29 | 29 | |
30 | -require_once dirname(__DIR__) . '/include/common.php'; |
|
30 | +require_once dirname(__DIR__).'/include/common.php'; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * @param $options |
@@ -128,10 +128,10 @@ discard block |
||
128 | 128 | $catEle = new Label(_MB_PUBLISHER_SELECTCAT, Publisher\Utils::createCategorySelect($options[0], 0, true, 'options[0]')); |
129 | 129 | $orderEle = new Select(_MB_PUBLISHER_ORDER, 'options[1]', $options[1]); |
130 | 130 | $orderEle->addOptionArray([ |
131 | - 'datesub' => _MB_PUBLISHER_DATE, |
|
132 | - 'counter' => _MB_PUBLISHER_HITS, |
|
133 | - 'weight' => _MB_PUBLISHER_WEIGHT, |
|
134 | - ]); |
|
131 | + 'datesub' => _MB_PUBLISHER_DATE, |
|
132 | + 'counter' => _MB_PUBLISHER_HITS, |
|
133 | + 'weight' => _MB_PUBLISHER_WEIGHT, |
|
134 | + ]); |
|
135 | 135 | |
136 | 136 | $showEle = new RadioYesNo(_MB_PUBLISHER_ORDER_SHOW, 'options[2]', $options[2]); |
137 | 137 | $dispEle = new Text(_MB_PUBLISHER_DISP, 'options[3]', 2, 255, $options[3]); |
@@ -139,11 +139,11 @@ discard block |
||
139 | 139 | |
140 | 140 | $imageEle = new Select(_MB_PUBLISHER_IMAGE_TO_DISPLAY, 'options[5]', $options[5]); |
141 | 141 | $imageEle->addOptionArray([ |
142 | - 'none' => XoopsLocale::NONE, |
|
143 | - 'article' => _MB_PUBLISHER_IMAGE_ARTICLE, |
|
144 | - 'category' => _MB_PUBLISHER_IMAGE_CATEGORY, |
|
145 | - 'avatar' => _MB_PUBLISHER_IMAGE_AVATAR, |
|
146 | - ]); |
|
142 | + 'none' => XoopsLocale::NONE, |
|
143 | + 'article' => _MB_PUBLISHER_IMAGE_ARTICLE, |
|
144 | + 'category' => _MB_PUBLISHER_IMAGE_CATEGORY, |
|
145 | + 'avatar' => _MB_PUBLISHER_IMAGE_AVATAR, |
|
146 | + ]); |
|
147 | 147 | |
148 | 148 | $form->addElement($catEle); |
149 | 149 | $form->addElement($orderEle); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); |
31 | 31 | |
32 | -require_once dirname(__DIR__) . '/include/common.php'; |
|
32 | +require_once dirname(__DIR__).'/include/common.php'; |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * @param $options |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $criteria = null; |
60 | 60 | } else { |
61 | 61 | $criteria = new CriteriaCompo(); |
62 | - $criteria->add(new Criteria('categoryid', '(' . $options[0] . ')', 'IN')); |
|
62 | + $criteria->add(new Criteria('categoryid', '('.$options[0].')', 'IN')); |
|
63 | 63 | } |
64 | 64 | $xoops = Xoops::getInstance(); |
65 | 65 | $thumbService = $xoops->service('thumbnail'); |
@@ -73,11 +73,11 @@ discard block |
||
73 | 73 | $item['poster'] = $iValue->posterName(); // for make poster name linked, use linkedPosterName() instead of posterName() |
74 | 74 | |
75 | 75 | if ('article' === $image) { |
76 | - $item['image'] = XoopsBaseConfig::get('url') . '/uploads/blank.gif'; |
|
76 | + $item['image'] = XoopsBaseConfig::get('url').'/uploads/blank.gif'; |
|
77 | 77 | $item['image_name'] = ''; |
78 | 78 | $images = $iValue->getImages(); |
79 | 79 | if (is_object($images['main'])) { |
80 | - $item['image'] = $thumbService->getImgUrl('uploads/' . $images['main']->getVar('image_name'), 50, 0)->getValue(); |
|
80 | + $item['image'] = $thumbService->getImgUrl('uploads/'.$images['main']->getVar('image_name'), 50, 0)->getValue(); |
|
81 | 81 | |
82 | 82 | $item['image_name'] = $images['main']->getVar('image_nicename'); |
83 | 83 | } |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | } elseif ('avatar' === $image) { |
88 | 88 | $auid = $iValue->getVar('uid'); |
89 | 89 | if ('0' == $auid) { |
90 | - $item['image'] = XoopsBaseConfig::get('url') . '/uploads/blank.gif'; |
|
90 | + $item['image'] = XoopsBaseConfig::get('url').'/uploads/blank.gif'; |
|
91 | 91 | $images = $iValue->getImages(); |
92 | 92 | if (is_object($images['main'])) { |
93 | - $item['image'] = $thumbService->getImgUrl('uploads/' . $images['main']->getVar('image_name'), 50, 0)->getValue(); |
|
93 | + $item['image'] = $thumbService->getImgUrl('uploads/'.$images['main']->getVar('image_name'), 50, 0)->getValue(); |
|
94 | 94 | } |
95 | 95 | } else { |
96 | 96 | $item['image'] = $xoops->service('avatar')->getAvatarUrl($auid)->getValue(); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | use XoopsModules\Publisher\Helper; |
24 | 24 | |
25 | -require_once dirname(__DIR__) . '/include/common.php'; |
|
25 | +require_once dirname(__DIR__).'/include/common.php'; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * @param $options |
@@ -84,10 +84,10 @@ |
||
84 | 84 | $catEle = new Label(_MB_PUBLISHER_SELECTCAT, Publisher\Utils::createCategorySelect($options[0], 0, true, 'options[0]')); |
85 | 85 | $orderEle = new Select(_MB_PUBLISHER_ORDER, 'options[1]', $options[1]); |
86 | 86 | $orderEle->addOptionArray([ |
87 | - 'datesub' => _MB_PUBLISHER_DATE, |
|
88 | - 'counter' => _MB_PUBLISHER_HITS, |
|
89 | - 'weight' => _MB_PUBLISHER_WEIGHT, |
|
90 | - ]); |
|
87 | + 'datesub' => _MB_PUBLISHER_DATE, |
|
88 | + 'counter' => _MB_PUBLISHER_HITS, |
|
89 | + 'weight' => _MB_PUBLISHER_WEIGHT, |
|
90 | + ]); |
|
91 | 91 | $dispEle = new Text(_MB_PUBLISHER_DISP, 'options[2]', 10, 255, $options[2]); |
92 | 92 | |
93 | 93 | $form->addElement($catEle); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | use XoopsModules\Publisher; |
28 | 28 | use XoopsModules\Publisher\Helper; |
29 | 29 | |
30 | -require_once dirname(__DIR__) . '/include/common.php'; |
|
30 | +require_once dirname(__DIR__).'/include/common.php'; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * @param $options |
@@ -94,10 +94,10 @@ |
||
94 | 94 | $catEle = new Label(_MB_PUBLISHER_SELECTCAT, Publisher\Utils::createCategorySelect($options[0]), 'options[0]'); |
95 | 95 | $orderEle = new Select(_MB_PUBLISHER_ORDER, 'options[1]', $options[1]); |
96 | 96 | $orderEle->addOptionArray([ |
97 | - 'datesub' => _MB_PUBLISHER_DATE, |
|
98 | - 'counter' => _MB_PUBLISHER_HITS, |
|
99 | - 'weight' => _MB_PUBLISHER_WEIGHT, |
|
100 | - ]); |
|
97 | + 'datesub' => _MB_PUBLISHER_DATE, |
|
98 | + 'counter' => _MB_PUBLISHER_HITS, |
|
99 | + 'weight' => _MB_PUBLISHER_WEIGHT, |
|
100 | + ]); |
|
101 | 101 | $dispEle = new Text(_MB_PUBLISHER_DISP, 'options[2]', 2, 255, $options[2]); |
102 | 102 | $charsEle = new Text(_MB_PUBLISHER_CHARS, 'options[3]', 2, 255, $options[3]); |
103 | 103 |
@@ -27,7 +27,7 @@ |
||
27 | 27 | use XoopsModules\Publisher; |
28 | 28 | use XoopsModules\Publisher\Helper; |
29 | 29 | |
30 | -require_once dirname(__DIR__) . '/include/common.php'; |
|
30 | +require_once dirname(__DIR__).'/include/common.php'; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * @param $options |