@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | use XoopsModules\Publisher\Helper; |
22 | 22 | |
23 | -require_once dirname(__DIR__) . '/include/common.php'; |
|
23 | +require_once dirname(__DIR__).'/include/common.php'; |
|
24 | 24 | |
25 | 25 | $helper = Helper::getInstance(); |
26 | 26 | |
@@ -53,21 +53,21 @@ discard block |
||
53 | 53 | // per their requirements. |
54 | 54 | |
55 | 55 | $url_arr = explode('/modules/', $_SERVER['PHP_SELF']); |
56 | - $newUrl = $url_arr[0] . '/modules/' . PUBLISHER_DIRNAME . '/' . $seoMap[$seoOp]; |
|
56 | + $newUrl = $url_arr[0].'/modules/'.PUBLISHER_DIRNAME.'/'.$seoMap[$seoOp]; |
|
57 | 57 | |
58 | 58 | $_ENV['PHP_SELF'] = $newUrl; |
59 | 59 | $_SERVER['SCRIPT_NAME'] = $newUrl; |
60 | 60 | $_SERVER['PHP_SELF'] = $newUrl; |
61 | 61 | switch ($seoOp) { |
62 | 62 | case 'category': |
63 | - $_SERVER['REQUEST_URI'] = $newUrl . '?categoryid=' . $seoArg; |
|
63 | + $_SERVER['REQUEST_URI'] = $newUrl.'?categoryid='.$seoArg; |
|
64 | 64 | $_GET['categoryid'] = $seoArg; |
65 | 65 | $_REQUEST['categoryid'] = $seoArg; |
66 | 66 | break; |
67 | 67 | case 'item': |
68 | 68 | case 'print': |
69 | 69 | default: |
70 | - $_SERVER['REQUEST_URI'] = $newUrl . '?itemid=' . $seoArg; |
|
70 | + $_SERVER['REQUEST_URI'] = $newUrl.'?itemid='.$seoArg; |
|
71 | 71 | $_GET['itemid'] = $seoArg; |
72 | 72 | $_REQUEST['itemid'] = $seoArg; |
73 | 73 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | } |
40 | 40 | } |
41 | 41 | $itemHandler = $helper->getItemHandler(); |
42 | - $criteria = new Criteria('itemid', '(' . implode(', ', $items_id) . ')', 'IN'); |
|
42 | + $criteria = new Criteria('itemid', '('.implode(', ', $items_id).')', 'IN'); |
|
43 | 43 | $items_obj = $itemHandler->getItemObjects($criteria, 'itemid'); |
44 | 44 | |
45 | 45 | /* @var Publisher\Item $item_obj */ |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $hightlight_key = ''; |
41 | 41 | } else { |
42 | 42 | $keywords = implode('+', $queryarray); |
43 | - $hightlight_key = '&keywords=' . $keywords; |
|
43 | + $hightlight_key = '&keywords='.$keywords; |
|
44 | 44 | } |
45 | 45 | $itemsObjs = $helper->getItemHandler()->getItemsFromSearch($queryarray, $andor, $limit, $offset, $userid, $categories, $sortby, $searchin, $extra); |
46 | 46 | $withCategoryPath = $helper->getConfig('search_cat_path'); |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | foreach ($itemsObjs as $obj) { |
51 | 51 | $item['image'] = 'images/item_icon.gif'; |
52 | 52 | $item['link'] = $obj->getItemUrl(); |
53 | - $item['link'] .= (!empty($hightlight_key) && (false === mb_strpos($item['link'], '.php?'))) ? '?' . ltrim($hightlight_key, '&') : $hightlight_key; |
|
53 | + $item['link'] .= (!empty($hightlight_key) && (false === mb_strpos($item['link'], '.php?'))) ? '?'.ltrim($hightlight_key, '&') : $hightlight_key; |
|
54 | 54 | if ($withCategoryPath) { |
55 | - $item['title'] = $obj->getCategoryPath(false) . ' > ' . $obj->title(); |
|
55 | + $item['title'] = $obj->getCategoryPath(false).' > '.$obj->title(); |
|
56 | 56 | } else { |
57 | 57 | $item['title'] = $obj->title(); |
58 | 58 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $start = max($pos - 100, 0); |
71 | 71 | $length = mb_strlen($query) + 200; //xoops_local("strlen", $query) + 200; |
72 | 72 | $context = $obj->highlight(XoopsLocale::substr($text, $start, $length, ' [...]'), $query); |
73 | - $sanitized_text .= '<p>[...] ' . $context . '</p>'; |
|
73 | + $sanitized_text .= '<p>[...] '.$context.'</p>'; |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | //End of highlight |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | use Xoops\Core\XoopsTpl; |
23 | 23 | use XoopsModules\Publisher; |
24 | 24 | |
25 | -require_once __DIR__ . '/header.php'; |
|
25 | +require_once __DIR__.'/header.php'; |
|
26 | 26 | $xoops = Xoops::getInstance(); |
27 | 27 | $xoops->disableErrorReporting(); |
28 | 28 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $categoryObj = $helper->getCategoryHandler()->get($categoryid); |
38 | 38 | } |
39 | 39 | |
40 | -header('Content-Type:text/xml; charset=' . XoopsLocale::getCharset()); |
|
40 | +header('Content-Type:text/xml; charset='.XoopsLocale::getCharset()); |
|
41 | 41 | $tpl = new XoopsTpl(); |
42 | 42 | $tpl->caching = 2; |
43 | 43 | $tpl->cache_lifetime = 0; |
@@ -54,14 +54,14 @@ discard block |
||
54 | 54 | $tpl->assign('channel_editor', $xoops->getConfig('adminmail')); |
55 | 55 | |
56 | 56 | if (-1 != $categoryid) { |
57 | - $channel_category .= ' > ' . $categoryObj->getVar('name'); |
|
57 | + $channel_category .= ' > '.$categoryObj->getVar('name'); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | $tpl->assign('channel_category', htmlspecialchars($channel_category)); |
61 | 61 | $tpl->assign('channel_generator', $helper->getModule()->getVar('name')); |
62 | 62 | $tpl->assign('channel_language', XoopsLocale::getLangCode()); |
63 | - $tpl->assign('image_url', XoopsBaseConfig::get('url') . '/images/logo.gif'); |
|
64 | - $dimention = getimagesize(XoopsBaseConfig::get('root-path') . '/images/logo.gif'); |
|
63 | + $tpl->assign('image_url', XoopsBaseConfig::get('url').'/images/logo.gif'); |
|
64 | + $dimention = getimagesize(XoopsBaseConfig::get('root-path').'/images/logo.gif'); |
|
65 | 65 | if (empty($dimention[0])) { |
66 | 66 | $width = 140; |
67 | 67 | $height = 140; |
@@ -23,4 +23,4 @@ |
||
23 | 23 | $doNotStartPrint = true; |
24 | 24 | $noTitle = true; |
25 | 25 | $smartPopup = true; |
26 | -require_once __DIR__ . '/print.php'; |
|
26 | +require_once __DIR__.'/print.php'; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | // # [11-may-2001] Kenneth Lee - http://www.nexgear.com/ |
34 | 34 | // ###################################################################### |
35 | 35 | |
36 | -require_once __DIR__ . '/header.php'; |
|
36 | +require_once __DIR__.'/header.php'; |
|
37 | 37 | |
38 | 38 | $xoops = Xoops::getInstance(); |
39 | 39 | $helper = Helper::getInstance(); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | $myts = Sanitizer::getInstance(); |
64 | -$xoopsTpl->assign('xoops_pagetitle', $myts->htmlSpecialChars(_MD_PUBLISHER_ARCHIVES) . $pgtitle . ' - ' . $myts->htmlSpecialChars($xoopsModule->getVar('name'))); |
|
64 | +$xoopsTpl->assign('xoops_pagetitle', $myts->htmlSpecialChars(_MD_PUBLISHER_ARCHIVES).$pgtitle.' - '.$myts->htmlSpecialChars($xoopsModule->getVar('name'))); |
|
65 | 65 | |
66 | 66 | $useroffset = ''; |
67 | 67 | if ($xoops->isUser()) { |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $itemhandler->field_object = 'categoryid'; |
147 | 147 | // Categories for which user has access |
148 | 148 | $categoriesGranted = $helper->getPermissionHandler()->getGrantedItems('category_read'); |
149 | - $grantedCategories = new Criteria('l.categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'); |
|
149 | + $grantedCategories = new Criteria('l.categoryid', '('.implode(',', $categoriesGranted).')', 'IN'); |
|
150 | 150 | $criteria = new CriteriaCompo(); |
151 | 151 | $criteria->add($grantedCategories, 'AND'); |
152 | 152 | $criteria->add(new Criteria('o.status', 2), 'AND'); |
@@ -165,18 +165,18 @@ discard block |
||
165 | 165 | foreach ($storyarray as $item) { |
166 | 166 | $story = []; |
167 | 167 | $htmltitle = ''; |
168 | - $story['title'] = "<a href='" . XoopsBaseConfig::get('url') . '/modules/publisher/category.php?categoryid=' . $item->getVar('categoryid') . "'>" . $item->getCategoryName() . "</a>: <a href='" . $item->getItemUrl() . "'" . $htmltitle . '>' . $item->title() . '</a>'; |
|
168 | + $story['title'] = "<a href='".XoopsBaseConfig::get('url').'/modules/publisher/category.php?categoryid='.$item->getVar('categoryid')."'>".$item->getCategoryName()."</a>: <a href='".$item->getItemUrl()."'".$htmltitle.'>'.$item->title().'</a>'; |
|
169 | 169 | $story['counter'] = $item->getVar('counter'); |
170 | 170 | $story['date'] = $item->datesub(); |
171 | - $story['print_link'] = XoopsBaseConfig::get('url') . '/modules/publisher/print.php?itemid=' . $item->getVar('itemid'); |
|
172 | - $story['mail_link'] = 'mailto:?subject=' . sprintf(_CO_PUBLISHER_INTITEM, $xoops->getConfig('sitename')) . '&body=' . sprintf(_CO_PUBLISHER_INTITEMFOUND, $xoops->getConfig('sitename')) . ': ' . $item->getItemUrl(); |
|
171 | + $story['print_link'] = XoopsBaseConfig::get('url').'/modules/publisher/print.php?itemid='.$item->getVar('itemid'); |
|
172 | + $story['mail_link'] = 'mailto:?subject='.sprintf(_CO_PUBLISHER_INTITEM, $xoops->getConfig('sitename')).'&body='.sprintf(_CO_PUBLISHER_INTITEMFOUND, $xoops->getConfig('sitename')).': '.$item->getItemUrl(); |
|
173 | 173 | |
174 | 174 | $xoopsTpl->append('stories', $story); |
175 | 175 | } |
176 | 176 | } |
177 | 177 | $xoopsTpl->assign('lang_printer', _MD_PUBLISHER_PRINTERFRIENDLY); |
178 | 178 | $xoopsTpl->assign('lang_sendstory', _MD_PUBLISHER_SENDSTORY); |
179 | - $xoopsTpl->assign('lang_storytotal', _MD_PUBLISHER_TOTAL_ITEMS . ' ' . $count); |
|
179 | + $xoopsTpl->assign('lang_storytotal', _MD_PUBLISHER_TOTAL_ITEMS.' '.$count); |
|
180 | 180 | } else { |
181 | 181 | $xoopsTpl->assign('show_articles', false); |
182 | 182 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @version $Id$ |
20 | 20 | */ |
21 | 21 | $xoops = Xoops::getInstance(); |
22 | -XoopsLoad::loadFile($xoops->path(__DIR__ . '/include/constants.php')); |
|
22 | +XoopsLoad::loadFile($xoops->path(__DIR__.'/include/constants.php')); |
|
23 | 23 | |
24 | 24 | $modversion['name'] = _MI_PUBLISHER_MD_NAME; |
25 | 25 | $modversion['description'] = _MI_PUBLISHER_MD_DESC; |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | $modversion['namespace'] = 'XoopsModules\Publisher'; |
36 | 36 | //$modversion['namespace'] = basename(__DIR__); |
37 | 37 | |
38 | -$logo_filename = $modversion['dirname'] . '_logo.png'; |
|
38 | +$logo_filename = $modversion['dirname'].'_logo.png'; |
|
39 | 39 | |
40 | -if (XoopsLoad::fileExists(__DIR__ . '/images/' . $logo_filename)) { |
|
40 | +if (XoopsLoad::fileExists(__DIR__.'/images/'.$logo_filename)) { |
|
41 | 41 | $modversion['image'] = "images/{$logo_filename}"; |
42 | 42 | } else { |
43 | 43 | $modversion['image'] = 'images/module_logo.png'; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | 'description' => _MI_PUBLISHER_DATE_TO_DATE_DSC, |
159 | 159 | 'show_func' => 'publisher_date_to_date_show', |
160 | 160 | 'edit_func' => 'publisher_date_to_date_edit', |
161 | - 'options' => XoopsLocale::formatTimestamp(time(), 'm/j/Y') . '|' . XoopsLocale::formatTimestamp(time(), 'm/j/Y'), |
|
161 | + 'options' => XoopsLocale::formatTimestamp(time(), 'm/j/Y').'|'.XoopsLocale::formatTimestamp(time(), 'm/j/Y'), |
|
162 | 162 | 'template' => 'publisher_date_to_date.tpl', |
163 | 163 | ]; |
164 | 164 | |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | 'description' => '_MI_PUBLISHER_PRINTLOGOURLDSC', |
655 | 655 | 'formtype' => 'textbox', |
656 | 656 | 'valuetype' => 'text', |
657 | - 'default' => XoopsBaseConfig::get('url') . '/images/logo.gif', |
|
657 | + 'default' => XoopsBaseConfig::get('url').'/images/logo.gif', |
|
658 | 658 | 'category' => 'print', |
659 | 659 | ]; |
660 | 660 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * @author trabis <[email protected]> |
25 | 25 | * @version $Id$ |
26 | 26 | */ |
27 | -require_once \dirname(__DIR__) . '/include/common.php'; |
|
27 | +require_once \dirname(__DIR__).'/include/common.php'; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Class GroupPermHandler |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * @author trabis <[email protected]> |
26 | 26 | * @version $Id$ |
27 | 27 | */ |
28 | -require_once \dirname(__DIR__) . '/include/common.php'; |
|
28 | +require_once \dirname(__DIR__).'/include/common.php'; |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Class RatingHandler |