@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @version $Id$ |
22 | 22 | */ |
23 | 23 | |
24 | -include_once dirname(dirname(__DIR__)) . '/include/common.php'; |
|
24 | +include_once dirname(dirname(__DIR__)).'/include/common.php'; |
|
25 | 25 | |
26 | 26 | class PublisherNotificationsPlugin extends Xoops\Module\Plugin\PluginAbstract implements NotificationsPluginInterface |
27 | 27 | { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | { |
36 | 36 | $xoops = Xoops::getInstance(); |
37 | 37 | $item = array(); |
38 | - $item_id = (int) $item_id; |
|
38 | + $item_id = (int)$item_id; |
|
39 | 39 | |
40 | 40 | if ($category === 'global') { |
41 | 41 | $item['name'] = ''; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | if ($category === 'category') { |
47 | 47 | // Assume we have a valid category id |
48 | - $sql = 'SELECT name, short_url FROM ' . $xoopsDB->prefix('publisher_categories') . ' WHERE categoryid = ' . $item_id; |
|
48 | + $sql = 'SELECT name, short_url FROM '.$xoopsDB->prefix('publisher_categories').' WHERE categoryid = '.$item_id; |
|
49 | 49 | $result = $xoopsDB->query($sql); // TODO: error check |
50 | 50 | $result_array = $xoopsDB->fetchArray($result); |
51 | 51 | $item['name'] = $result_array['name']; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | if ($category === 'item') { |
57 | 57 | // Assume we have a valid story id |
58 | - $sql = 'SELECT title, short_url FROM ' . $xoopsDB->prefix('publisher_items') . ' WHERE itemid = ' . $item_id; |
|
58 | + $sql = 'SELECT title, short_url FROM '.$xoopsDB->prefix('publisher_items').' WHERE itemid = '.$item_id; |
|
59 | 59 | $result = $xoopsDB->query($sql); // TODO: error check |
60 | 60 | $result_array = $xoopsDB->fetchArray($result); |
61 | 61 | $item['name'] = $result_array['title']; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $hightlight_key = ''; |
44 | 44 | } else { |
45 | 45 | $keywords = implode('+', $queryarray); |
46 | - $hightlight_key = "&keywords=" . $keywords; |
|
46 | + $hightlight_key = "&keywords=".$keywords; |
|
47 | 47 | } |
48 | 48 | $itemsObjs = $publisher->getItemHandler() |
49 | 49 | ->getItemsFromSearch($queryarray, $andor, $limit, $offset, $userid, $categories, $sortby, $searchin, $extra); |
@@ -54,9 +54,9 @@ discard block |
||
54 | 54 | foreach ($itemsObjs as $obj) { |
55 | 55 | $item['image'] = "images/item_icon.gif"; |
56 | 56 | $item['link'] = $obj->getItemUrl(); |
57 | - $item['link'] .= (!empty($hightlight_key) && (strpos($item['link'], '.php?') === false)) ? "?" . ltrim($hightlight_key, '&') : $hightlight_key; |
|
57 | + $item['link'] .= (!empty($hightlight_key) && (strpos($item['link'], '.php?') === false)) ? "?".ltrim($hightlight_key, '&') : $hightlight_key; |
|
58 | 58 | if ($withCategoryPath) { |
59 | - $item['title'] = $obj->getCategoryPath(false) . " > " . $obj->title(); |
|
59 | + $item['title'] = $obj->getCategoryPath(false)." > ".$obj->title(); |
|
60 | 60 | } else { |
61 | 61 | $item['title'] = $obj->title(); |
62 | 62 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | public function update($item_id, $total_num) |
74 | 74 | { |
75 | 75 | $db = Xoops::getInstance()->db(); |
76 | - $sql = 'UPDATE ' . $db->prefix('publisher_items') . ' SET comments = ' . (int)($total_num) . ' WHERE itemid = ' . (int)($item_id); |
|
76 | + $sql = 'UPDATE '.$db->prefix('publisher_items').' SET comments = '.(int)($total_num).' WHERE itemid = '.(int)($item_id); |
|
77 | 77 | $db->query($sql); |
78 | 78 | } |
79 | 79 | |
@@ -93,14 +93,14 @@ discard block |
||
93 | 93 | public function itemInfo($item_id) |
94 | 94 | { |
95 | 95 | $ret = array(); |
96 | - include_once dirname(dirname(__DIR__)) . '/include/common.php'; |
|
96 | + include_once dirname(dirname(__DIR__)).'/include/common.php'; |
|
97 | 97 | |
98 | 98 | /* @var $itemObj PublisherItem */ |
99 | 99 | $itemObj = Publisher::getInstance()->getItemHandler()->get((int)($item_id)); |
100 | 100 | $ret['text'] = ''; |
101 | 101 | $summary = $itemObj->summary(); |
102 | 102 | if ($summary != '') { |
103 | - $ret['text'] .= $summary . '<br /><br />'; |
|
103 | + $ret['text'] .= $summary.'<br /><br />'; |
|
104 | 104 | } |
105 | 105 | $ret['text'] .= $itemObj->body(); |
106 | 106 | $ret['title'] = $itemObj->title(); |
@@ -37,13 +37,13 @@ |
||
37 | 37 | */ |
38 | 38 | public function render() |
39 | 39 | { |
40 | - $ret = '<table border="0" width="100%">' . NWLINE; |
|
40 | + $ret = '<table border="0" width="100%">'.NWLINE; |
|
41 | 41 | /* @var $ele Xoops\Form\Element */ |
42 | 42 | foreach ($this->getElements() as $ele) { |
43 | 43 | if (!$ele->isHidden()) { |
44 | 44 | $ret .= '<tr><td colspan="2">'; |
45 | - $ret .= '<span style="font-weight: bold;">' . $ele->getCaption() . '</span>'; |
|
46 | - $ret .= '</td></tr><tr><td>' . $ele->render() . '</td></tr>'; |
|
45 | + $ret .= '<span style="font-weight: bold;">'.$ele->getCaption().'</span>'; |
|
46 | + $ret .= '</td></tr><tr><td>'.$ele->render().'</td></tr>'; |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | $ret .= '</table>'; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * @version $Id$ |
27 | 27 | */ |
28 | 28 | |
29 | -include_once dirname(__DIR__) . '/include/common.php'; |
|
29 | +include_once dirname(__DIR__).'/include/common.php'; |
|
30 | 30 | |
31 | 31 | class PublisherItem extends XoopsObject |
32 | 32 | { |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | public function wrappage($file_name) |
188 | 188 | { |
189 | 189 | $content = ''; |
190 | - $page = PublisherUtils::getUploadDir(true, 'content') . $file_name; |
|
190 | + $page = PublisherUtils::getUploadDir(true, 'content').$file_name; |
|
191 | 191 | if (XoopsLoad::fileExists($page)) { |
192 | 192 | // this page uses smarty template |
193 | 193 | ob_start(); |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | if ($this->publisher->getConfig('item_disp_blocks_summary')) { |
242 | 242 | $summary = $this->summary($maxLength, $format, $stripTags); |
243 | 243 | if ($summary) { |
244 | - $ret = $this->summary() . '<br /><br />' . $ret; |
|
244 | + $ret = $this->summary().'<br /><br />'.$ret; |
|
245 | 245 | } |
246 | 246 | } |
247 | 247 | if (!empty($stripTags)) { |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | */ |
392 | 392 | public function getCategoryImagePath() |
393 | 393 | { |
394 | - return PublisherUtils::getImageDir('category', false) . $this->category()->image(); |
|
394 | + return PublisherUtils::getImageDir('category', false).$this->category()->image(); |
|
395 | 395 | } |
396 | 396 | |
397 | 397 | /** |
@@ -413,35 +413,35 @@ discard block |
||
413 | 413 | if (PublisherUtils::IsUserAdmin() || PublisherUtils::IsUserAuthor($this) || PublisherUtils::IsUserModerator($this)) { |
414 | 414 | if ($this->publisher->getConfig('perm_edit') || PublisherUtils::IsUserModerator($this) || PublisherUtils::IsUserAdmin()) { |
415 | 415 | // Edit button |
416 | - $adminLinks .= "<a href='" . PUBLISHER_URL . "/submit.php?itemid=" . $this->getVar('itemid') . "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif'" . " title='" . _CO_PUBLISHER_EDIT . "' alt='" . _CO_PUBLISHER_EDIT . "'/></a>"; |
|
416 | + $adminLinks .= "<a href='".PUBLISHER_URL."/submit.php?itemid=".$this->getVar('itemid')."'><img src='".PUBLISHER_URL."/images/links/edit.gif'"." title='"._CO_PUBLISHER_EDIT."' alt='"._CO_PUBLISHER_EDIT."'/></a>"; |
|
417 | 417 | $adminLinks .= " "; |
418 | 418 | } |
419 | 419 | if ($this->publisher->getConfig('perm_delete') || PublisherUtils::IsUserModerator($this) || PublisherUtils::IsUserAdmin()) { |
420 | 420 | // Delete button |
421 | - $adminLinks .= "<a href='" . PUBLISHER_URL . "/submit.php?op=del&itemid=" . $this->getVar('itemid') . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png'" . " title='" . _CO_PUBLISHER_DELETE . "' alt='" . _CO_PUBLISHER_DELETE . "' /></a>"; |
|
421 | + $adminLinks .= "<a href='".PUBLISHER_URL."/submit.php?op=del&itemid=".$this->getVar('itemid')."'><img src='".PUBLISHER_URL."/images/links/delete.png'"." title='"._CO_PUBLISHER_DELETE."' alt='"._CO_PUBLISHER_DELETE."' /></a>"; |
|
422 | 422 | $adminLinks .= " "; |
423 | 423 | } |
424 | 424 | } |
425 | 425 | if ($this->publisher->getConfig('perm_clone') || PublisherUtils::IsUserModerator($this) || PublisherUtils::IsUserAdmin()) { |
426 | 426 | // Duplicate button |
427 | - $adminLinks .= "<a href='" . PUBLISHER_URL . "/submit.php?op=clone&itemid=" . $this->getVar('itemid') . "'><img src='" . PUBLISHER_URL . "/images/links/clone.gif'" . " title='" . _CO_PUBLISHER_CLONE . "' alt='" . _CO_PUBLISHER_CLONE . "' /></a>"; |
|
427 | + $adminLinks .= "<a href='".PUBLISHER_URL."/submit.php?op=clone&itemid=".$this->getVar('itemid')."'><img src='".PUBLISHER_URL."/images/links/clone.gif'"." title='"._CO_PUBLISHER_CLONE."' alt='"._CO_PUBLISHER_CLONE."' /></a>"; |
|
428 | 428 | $adminLinks .= " "; |
429 | 429 | } |
430 | 430 | } |
431 | 431 | // PDF button |
432 | 432 | if ($xoops->service('htmltopdf')->isAvailable()) { |
433 | - $adminLinks .= "<a href='" . PUBLISHER_URL . "/makepdf.php?itemid=" . $this->getVar('itemid') . "' rel='nofollow' target='_blank'><img src='" . PUBLISHER_URL . "/images/links/pdf.gif' title='" . _CO_PUBLISHER_PDF . "' alt='" . _CO_PUBLISHER_PDF . "' /></a>"; |
|
433 | + $adminLinks .= "<a href='".PUBLISHER_URL."/makepdf.php?itemid=".$this->getVar('itemid')."' rel='nofollow' target='_blank'><img src='".PUBLISHER_URL."/images/links/pdf.gif' title='"._CO_PUBLISHER_PDF."' alt='"._CO_PUBLISHER_PDF."' /></a>"; |
|
434 | 434 | $adminLinks .= " "; |
435 | 435 | } |
436 | 436 | // Print button |
437 | - $adminLinks .= "<a href='" . PublisherUtils::seoGenUrl("print", $this->getVar('itemid'), $this->getVar('short_url')) . "' rel='nofollow' target='_blank'><img src='" . PUBLISHER_URL . "/images/links/print.gif' title='" . _CO_PUBLISHER_PRINT . "' alt='" . _CO_PUBLISHER_PRINT . "' /></a>"; |
|
437 | + $adminLinks .= "<a href='".PublisherUtils::seoGenUrl("print", $this->getVar('itemid'), $this->getVar('short_url'))."' rel='nofollow' target='_blank'><img src='".PUBLISHER_URL."/images/links/print.gif' title='"._CO_PUBLISHER_PRINT."' alt='"._CO_PUBLISHER_PRINT."' /></a>"; |
|
438 | 438 | $adminLinks .= " "; |
439 | 439 | // Email button |
440 | 440 | if ($xoops->isActiveModule('tellafriend')) { |
441 | 441 | $subject = sprintf(_CO_PUBLISHER_INTITEMFOUND, $xoops->getConfig('sitename')); |
442 | 442 | $subject = $this->_convert_for_japanese($subject); |
443 | 443 | $maillink = PublisherUtils::tellafriend($subject); |
444 | - $adminLinks .= '<a href="' . $maillink . '"><img src="' . PUBLISHER_URL . '/images/links/friend.gif" title="' . _CO_PUBLISHER_MAIL . '" alt="' . _CO_PUBLISHER_MAIL . '" /></a>'; |
|
444 | + $adminLinks .= '<a href="'.$maillink.'"><img src="'.PUBLISHER_URL.'/images/links/friend.gif" title="'._CO_PUBLISHER_MAIL.'" alt="'._CO_PUBLISHER_MAIL.'" /></a>'; |
|
445 | 445 | $adminLinks .= " "; |
446 | 446 | } |
447 | 447 | return $adminLinks; |
@@ -460,19 +460,19 @@ discard block |
||
460 | 460 | $tags['MODULE_NAME'] = $this->publisher->getModule()->getVar('name'); |
461 | 461 | $tags['ITEM_NAME'] = $this->title(); |
462 | 462 | $tags['CATEGORY_NAME'] = $this->getCategoryName(); |
463 | - $tags['CATEGORY_URL'] = PUBLISHER_URL . '/category.php?categoryid=' . $this->getVar('categoryid'); |
|
463 | + $tags['CATEGORY_URL'] = PUBLISHER_URL.'/category.php?categoryid='.$this->getVar('categoryid'); |
|
464 | 464 | $tags['ITEM_BODY'] = $this->body(); |
465 | 465 | $tags['DATESUB'] = $this->datesub(); |
466 | 466 | foreach ($notifications as $notification) { |
467 | 467 | switch ($notification) { |
468 | 468 | case _PUBLISHER_NOT_ITEM_PUBLISHED : |
469 | - $tags['ITEM_URL'] = PUBLISHER_URL . '/item.php?itemid=' . $this->getVar('itemid'); |
|
469 | + $tags['ITEM_URL'] = PUBLISHER_URL.'/item.php?itemid='.$this->getVar('itemid'); |
|
470 | 470 | $notification_handler->triggerEvent('global', 0, 'published', $tags, array(), $this->publisher->getModule()->getVar('mid')); |
471 | 471 | $notification_handler->triggerEvent('category', $this->getVar('categoryid'), 'published', $tags, array(), $this->publisher->getModule()->getVar('mid')); |
472 | 472 | $notification_handler->triggerEvent('item', $this->getVar('itemid'), 'approved', $tags, array(), $this->publisher->getModule()->getVar('mid')); |
473 | 473 | break; |
474 | 474 | case _PUBLISHER_NOT_ITEM_SUBMITTED : |
475 | - $tags['WAITINGFILES_URL'] = PUBLISHER_URL . '/admin/item.php?itemid=' . $this->getVar('itemid'); |
|
475 | + $tags['WAITINGFILES_URL'] = PUBLISHER_URL.'/admin/item.php?itemid='.$this->getVar('itemid'); |
|
476 | 476 | $notification_handler->triggerEvent('global', 0, 'submitted', $tags, array(), $this->publisher->getModule()->getVar('mid')); |
477 | 477 | $notification_handler->triggerEvent('category', $this->getVar('categoryid'), 'submitted', $tags, array(), $this->publisher->getModule()->getVar('mid')); |
478 | 478 | break; |
@@ -512,9 +512,9 @@ discard block |
||
512 | 512 | public function getItemLink($class = false, $maxsize = 0) |
513 | 513 | { |
514 | 514 | if ($class) { |
515 | - return '<a class=' . $class . ' href="' . $this->getItemUrl() . '">' . $this->title($maxsize) . '</a>'; |
|
515 | + return '<a class='.$class.' href="'.$this->getItemUrl().'">'.$this->title($maxsize).'</a>'; |
|
516 | 516 | } else { |
517 | - return '<a href="' . $this->getItemUrl() . '">' . $this->title($maxsize) . '</a>'; |
|
517 | + return '<a href="'.$this->getItemUrl().'">'.$this->title($maxsize).'</a>'; |
|
518 | 518 | } |
519 | 519 | } |
520 | 520 | |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | $imageObjs = array(); |
599 | 599 | if (count($images_ids) > 0) { |
600 | 600 | $image_handler = Images::getInstance()->getHandlerImages(); |
601 | - $criteria = new CriteriaCompo(new Criteria('image_id', '(' . implode(',', $images_ids) . ')', 'IN')); |
|
601 | + $criteria = new CriteriaCompo(new Criteria('image_id', '('.implode(',', $images_ids).')', 'IN')); |
|
602 | 602 | $imageObjs = $image_handler->getObjects($criteria, true); |
603 | 603 | unset($criteria); |
604 | 604 | } |
@@ -715,12 +715,12 @@ discard block |
||
715 | 715 | if (is_object($images['main'])) { |
716 | 716 | /* @var $image ImagesImage */ |
717 | 717 | $image = $images['main']; |
718 | - $dimensions = getimagesize(\XoopsBaseConfig::get('root-path') . '/uploads/' . $image->getVar('image_name')); |
|
718 | + $dimensions = getimagesize(\XoopsBaseConfig::get('root-path').'/uploads/'.$image->getVar('image_name')); |
|
719 | 719 | $item['image_width'] = $dimensions[0]; |
720 | 720 | $item['image_height'] = $dimensions[1]; |
721 | - $item['image_path'] = \XoopsBaseConfig::get('url') . '/uploads/' . $image->getVar('image_name'); |
|
721 | + $item['image_path'] = \XoopsBaseConfig::get('url').'/uploads/'.$image->getVar('image_name'); |
|
722 | 722 | // pass this on since some consumers build custom thumbnails |
723 | - $item['image_vpath'] = 'uploads/' . $image->getVar('image_name'); |
|
723 | + $item['image_vpath'] = 'uploads/'.$image->getVar('image_name'); |
|
724 | 724 | $item['image_thumb'] = \Xoops::getInstance() |
725 | 725 | ->service('thumbnail') |
726 | 726 | ->getImgUrl($item['image_vpath'], 0, 180) |
@@ -743,12 +743,12 @@ discard block |
||
743 | 743 | $i = 0; |
744 | 744 | /* @var $image ImagesImage */ |
745 | 745 | foreach ($images['others'] as $image) { |
746 | - $dimensions = getimagesize(\XoopsBaseConfig::get('root-path') . '/uploads/' . $image->getVar('image_name')); |
|
746 | + $dimensions = getimagesize(\XoopsBaseConfig::get('root-path').'/uploads/'.$image->getVar('image_name')); |
|
747 | 747 | $item['images'][$i]['width'] = $dimensions[0]; |
748 | 748 | $item['images'][$i]['height'] = $dimensions[1]; |
749 | - $item['images'][$i]['path'] = \XoopsBaseConfig::get('url') . '/uploads/' . $image->getVar('image_name'); |
|
749 | + $item['images'][$i]['path'] = \XoopsBaseConfig::get('url').'/uploads/'.$image->getVar('image_name'); |
|
750 | 750 | $item['images'][$i]['thumb'] = $thumbService |
751 | - ->getImgUrl('uploads/' . $image->getVar('image_name'), 240, 0) |
|
751 | + ->getImgUrl('uploads/'.$image->getVar('image_name'), 240, 0) |
|
752 | 752 | ->getValue(); |
753 | 753 | $item['images'][$i]['name'] = $image->getVar('image_nicename'); |
754 | 754 | ++$i; |
@@ -766,9 +766,9 @@ discard block |
||
766 | 766 | { |
767 | 767 | $color = $this->publisher->getConfig('format_highlight_color'); |
768 | 768 | if (substr($color, 0, 1) !== '#') { |
769 | - $color = '#' . $color; |
|
769 | + $color = '#'.$color; |
|
770 | 770 | } |
771 | - $pre = '<span style="font-weight: bolder; background-color: ' . $color . ';">'; |
|
771 | + $pre = '<span style="font-weight: bolder; background-color: '.$color.';">'; |
|
772 | 772 | $post = '</span>'; |
773 | 773 | return \Xmf\Highlighter::apply($keywords, $content, $pre, $post); |
774 | 774 | } |
@@ -1139,7 +1139,7 @@ discard block |
||
1139 | 1139 | // Categories for which user has access |
1140 | 1140 | $categoriesGranted = $this->publisher->getPermissionHandler()->getGrantedItems('category_read'); |
1141 | 1141 | if (!empty($categoriesGranted)) { |
1142 | - $grantedCategories = new Criteria('categoryid', "(" . implode(',', $categoriesGranted) . ")", 'IN'); |
|
1142 | + $grantedCategories = new Criteria('categoryid', "(".implode(',', $categoriesGranted).")", 'IN'); |
|
1143 | 1143 | $criteriaPermissions->add($grantedCategories, 'AND'); |
1144 | 1144 | } else { |
1145 | 1145 | return 0; |
@@ -1295,7 +1295,7 @@ discard block |
||
1295 | 1295 | // Categories for which user has access |
1296 | 1296 | $categoriesGranted = $this->publisher->getPermissionHandler()->getGrantedItems('category_read'); |
1297 | 1297 | if (!empty($categoriesGranted)) { |
1298 | - $grantedCategories = new Criteria('categoryid', "(" . implode(',', $categoriesGranted) . ")", 'IN'); |
|
1298 | + $grantedCategories = new Criteria('categoryid', "(".implode(',', $categoriesGranted).")", 'IN'); |
|
1299 | 1299 | $criteriaPermissions->add($grantedCategories, 'AND'); |
1300 | 1300 | } else { |
1301 | 1301 | return array(); |
@@ -1393,7 +1393,7 @@ discard block |
||
1393 | 1393 | $eb = $qb->expr(); |
1394 | 1394 | if (!empty($notNullFields)) { |
1395 | 1395 | if (!is_array($notNullFields)) { |
1396 | - $notNullFields = (array) $notNullFields; |
|
1396 | + $notNullFields = (array)$notNullFields; |
|
1397 | 1397 | } |
1398 | 1398 | foreach ($notNullFields as $v) { |
1399 | 1399 | if ($whereMode === 'AND') { |
@@ -1440,7 +1440,7 @@ discard block |
||
1440 | 1440 | if (is_array($userid) && count($userid) > 0) { |
1441 | 1441 | $userid = array_map("intval", $userid); |
1442 | 1442 | $criteriaUser = new CriteriaCompo(); |
1443 | - $criteriaUser->add(new Criteria('uid', '(' . implode(',', $userid) . ')', 'IN'), 'OR'); |
|
1443 | + $criteriaUser->add(new Criteria('uid', '('.implode(',', $userid).')', 'IN'), 'OR'); |
|
1444 | 1444 | } elseif (is_numeric($userid) && $userid > 0) { |
1445 | 1445 | $criteriaUser = new CriteriaCompo(); |
1446 | 1446 | $criteriaUser->add(new Criteria('uid', $userid), 'OR'); |
@@ -1451,19 +1451,19 @@ discard block |
||
1451 | 1451 | for ($i = 0; $i < count($queryarray); ++$i) { |
1452 | 1452 | $criteriaKeyword = new CriteriaCompo(); |
1453 | 1453 | if (in_array('title', $searchin)) { |
1454 | - $criteriaKeyword->add(new Criteria('title', '%' . $queryarray[$i] . '%', 'LIKE'), 'OR'); |
|
1454 | + $criteriaKeyword->add(new Criteria('title', '%'.$queryarray[$i].'%', 'LIKE'), 'OR'); |
|
1455 | 1455 | } |
1456 | 1456 | if (in_array('subtitle', $searchin)) { |
1457 | - $criteriaKeyword->add(new Criteria('subtitle', '%' . $queryarray[$i] . '%', 'LIKE'), 'OR'); |
|
1457 | + $criteriaKeyword->add(new Criteria('subtitle', '%'.$queryarray[$i].'%', 'LIKE'), 'OR'); |
|
1458 | 1458 | } |
1459 | 1459 | if (in_array('body', $searchin)) { |
1460 | - $criteriaKeyword->add(new Criteria('body', '%' . $queryarray[$i] . '%', 'LIKE'), 'OR'); |
|
1460 | + $criteriaKeyword->add(new Criteria('body', '%'.$queryarray[$i].'%', 'LIKE'), 'OR'); |
|
1461 | 1461 | } |
1462 | 1462 | if (in_array('summary', $searchin)) { |
1463 | - $criteriaKeyword->add(new Criteria('summary', '%' . $queryarray[$i] . '%', 'LIKE'), 'OR'); |
|
1463 | + $criteriaKeyword->add(new Criteria('summary', '%'.$queryarray[$i].'%', 'LIKE'), 'OR'); |
|
1464 | 1464 | } |
1465 | 1465 | if (in_array('meta_keywords', $searchin)) { |
1466 | - $criteriaKeyword->add(new Criteria('meta_keywords', '%' . $queryarray[$i] . '%', 'LIKE'), 'OR'); |
|
1466 | + $criteriaKeyword->add(new Criteria('meta_keywords', '%'.$queryarray[$i].'%', 'LIKE'), 'OR'); |
|
1467 | 1467 | } |
1468 | 1468 | $criteriaKeywords->add($criteriaKeyword, $andor); |
1469 | 1469 | unset($criteriaKeyword); |
@@ -1479,11 +1479,11 @@ discard block |
||
1479 | 1479 | if (count($categoriesGranted) == 0) { |
1480 | 1480 | return $ret; |
1481 | 1481 | } |
1482 | - $grantedCategories = new Criteria('categoryid', "(" . implode(',', $categoriesGranted) . ")", 'IN'); |
|
1482 | + $grantedCategories = new Criteria('categoryid', "(".implode(',', $categoriesGranted).")", 'IN'); |
|
1483 | 1483 | $criteriaPermissions->add($grantedCategories, 'AND'); |
1484 | 1484 | } elseif (count($categories) > 0) { |
1485 | 1485 | $criteriaPermissions = new CriteriaCompo(); |
1486 | - $grantedCategories = new Criteria('categoryid', "(" . implode(',', $categories) . ")", 'IN'); |
|
1486 | + $grantedCategories = new Criteria('categoryid', "(".implode(',', $categories).")", 'IN'); |
|
1487 | 1487 | $criteriaPermissions->add($grantedCategories, 'AND'); |
1488 | 1488 | } |
1489 | 1489 | $criteriaItemsStatus = new CriteriaCompo(); |
@@ -1578,7 +1578,7 @@ discard block |
||
1578 | 1578 | */ |
1579 | 1579 | public function countArticlesByCat($parentid, &$catsCount, $spaces = '', $resultCatCounts = array()) |
1580 | 1580 | { |
1581 | - $newspaces = $spaces . '--'; |
|
1581 | + $newspaces = $spaces.'--'; |
|
1582 | 1582 | $thecount = 0; |
1583 | 1583 | foreach ($catsCount[$parentid] as $subCatId => $count) { |
1584 | 1584 | $thecount = $thecount + $count; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @version $Id$ |
26 | 26 | */ |
27 | 27 | |
28 | -include_once dirname(__DIR__) . '/include/common.php'; |
|
28 | +include_once dirname(__DIR__).'/include/common.php'; |
|
29 | 29 | |
30 | 30 | class PublisherCategory extends XoopsObject |
31 | 31 | { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | if ($parentObj->notLoaded()) { |
134 | 134 | exit; |
135 | 135 | } |
136 | - $ret = $parentObj->getCategoryPath($withAllLink) . " > " . $ret; |
|
136 | + $ret = $parentObj->getCategoryPath($withAllLink)." > ".$ret; |
|
137 | 137 | } |
138 | 138 | $this->_categoryPath = $ret; |
139 | 139 | } |
@@ -198,9 +198,9 @@ discard block |
||
198 | 198 | public function getCategoryLink($class = false) |
199 | 199 | { |
200 | 200 | if ($class) { |
201 | - return "<a class='$class' href='" . $this->getCategoryUrl() . "'>" . $this->getVar('name') . "</a>"; |
|
201 | + return "<a class='$class' href='".$this->getCategoryUrl()."'>".$this->getVar('name')."</a>"; |
|
202 | 202 | } else { |
203 | - return "<a href='" . $this->getCategoryUrl() . "'>" . $this->getVar('name') . "</a>"; |
|
203 | + return "<a href='".$this->getCategoryUrl()."'>".$this->getVar('name')."</a>"; |
|
204 | 204 | } |
205 | 205 | } |
206 | 206 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $category['last_title_link'] = $this->getVar('last_title_link', 'n'); |
259 | 259 | } |
260 | 260 | if ($this->image() !== 'blank.png') { |
261 | - $category['image_path'] = PublisherUtils::getImageDir('category', false) . $this->image(); |
|
261 | + $category['image_path'] = PublisherUtils::getImageDir('category', false).$this->image(); |
|
262 | 262 | } else { |
263 | 263 | $category['image_path'] = ''; |
264 | 264 | } |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | $category['last_title_link'] = $this->getVar('last_title_link', 'n'); |
283 | 283 | } |
284 | 284 | if ($this->image() !== 'blank.png') { |
285 | - $category['image_path'] = PublisherUtils::getImageDir('category', false) . $this->image(); |
|
285 | + $category['image_path'] = PublisherUtils::getImageDir('category', false).$this->image(); |
|
286 | 286 | } else { |
287 | 287 | $category['image_path'] = ''; |
288 | 288 | } |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | if (!PublisherUtils::IsUserAdmin()) { |
428 | 428 | $categoriesGranted = $this->publisher->getPermissionHandler()->getGrantedItems('category_read'); |
429 | 429 | if (count($categoriesGranted) > 0) { |
430 | - $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
430 | + $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
431 | 431 | } else { |
432 | 432 | return $ret; |
433 | 433 | } |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | for ($j = 0; $j < $level; ++$j) { |
459 | 459 | $spaces .= '--'; |
460 | 460 | } |
461 | - $theresult[$category['categoryid']] = $spaces . $category['name']; |
|
461 | + $theresult[$category['categoryid']] = $spaces.$category['name']; |
|
462 | 462 | if (isset($cat_array[$category['categoryid']])) { |
463 | 463 | $level = $level + 1; |
464 | 464 | foreach ($cat_array[$category['categoryid']] as $cat) { |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | if (!PublisherUtils::IsUserAdmin()) { |
479 | 479 | $categoriesGranted = $this->publisher->getPermissionHandler()->getGrantedItems('item_submit'); |
480 | 480 | if (count($categoriesGranted) > 0) { |
481 | - $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
481 | + $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
482 | 482 | } else { |
483 | 483 | return $ret; |
484 | 484 | } |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | if (!PublisherUtils::IsUserAdmin()) { |
521 | 521 | $categoriesGranted = $this->publisher->getPermissionHandler()->getGrantedItems('category_read'); |
522 | 522 | if (count($categoriesGranted) > 0) { |
523 | - $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
523 | + $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
524 | 524 | } else { |
525 | 525 | return $ret; |
526 | 526 | } |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | if (!PublisherUtils::IsUserAdmin()) { |
566 | 566 | $categoriesGranted = $this->publisher->getPermissionHandler()->getGrantedItems('category_read'); |
567 | 567 | if (count($categoriesGranted) > 0) { |
568 | - $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
568 | + $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
569 | 569 | } else { |
570 | 570 | return 0; |
571 | 571 | } |
@@ -587,12 +587,12 @@ discard block |
||
587 | 587 | public function &getSubCats($categories) |
588 | 588 | { |
589 | 589 | $xoops = Xoops::getInstance(); |
590 | - $criteria = new CriteriaCompo(new Criteria('parentid', "(" . implode(',', array_keys($categories)) . ")", 'IN')); |
|
590 | + $criteria = new CriteriaCompo(new Criteria('parentid', "(".implode(',', array_keys($categories)).")", 'IN')); |
|
591 | 591 | $ret = array(); |
592 | 592 | if (!PublisherUtils::IsUserAdmin()) { |
593 | 593 | $categoriesGranted = $this->publisher->getPermissionHandler()->getGrantedItems('category_read'); |
594 | 594 | if (count($categoriesGranted) > 0) { |
595 | - $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
595 | + $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
596 | 596 | } else { |
597 | 597 | return $ret; |
598 | 598 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * @version $Id$ |
25 | 25 | */ |
26 | 26 | |
27 | -include_once dirname(__DIR__) . '/include/common.php'; |
|
27 | +include_once dirname(__DIR__).'/include/common.php'; |
|
28 | 28 | |
29 | 29 | class PublisherRating extends XoopsObject |
30 | 30 | { |
@@ -22,7 +22,7 @@ |
||
22 | 22 | * @version $Id$ |
23 | 23 | */ |
24 | 24 | |
25 | -include_once dirname(__DIR__) . '/include/common.php'; |
|
25 | +include_once dirname(__DIR__).'/include/common.php'; |
|
26 | 26 | |
27 | 27 | class PublisherGroupPermHandler extends XoopsGroupPermHandler |
28 | 28 | { |
@@ -20,7 +20,7 @@ |
||
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | 22 | |
23 | -include_once dirname(dirname(__DIR__)) . '/include/common.php'; |
|
23 | +include_once dirname(dirname(__DIR__)).'/include/common.php'; |
|
24 | 24 | |
25 | 25 | class PublisherFileForm extends Xoops\Form\ThemeForm |
26 | 26 | { |