@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | // paypal |
45 | 45 | $modversion['paypal'] = array(); |
46 | 46 | $modversion['paypal']['business'] = '[email protected]'; |
47 | -$modversion['paypal']['item_name'] = 'Donation : ' . PageLocale::MODULE_DESC; |
|
47 | +$modversion['paypal']['item_name'] = 'Donation : '.PageLocale::MODULE_DESC; |
|
48 | 48 | $modversion['paypal']['amount'] = 0; |
49 | 49 | $modversion['paypal']['currency_code'] = 'USD'; |
50 | 50 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $modversion['hasMain'] = 1; |
68 | 68 | |
69 | 69 | // Mysql file |
70 | -$modversion['schema'] = 'sql/schema.yml'; |
|
70 | +$modversion['schema'] = 'sql/schema.yml'; |
|
71 | 71 | //$modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; |
72 | 72 | |
73 | 73 | // Tables created by sql file (without prefix!) |
@@ -58,6 +58,6 @@ |
||
58 | 58 | |
59 | 59 | $tpl->assign('xoops_sitename', $xoops->getConfig('sitename')); |
60 | 60 | // Meta |
61 | -$tpl->assign('xoops_pagetitle', strip_tags($view_content->getVar('content_title') . ' - ' . XoopsLocale::A_PRINT . ' - ' . $xoopsModule->name())); |
|
61 | +$tpl->assign('xoops_pagetitle', strip_tags($view_content->getVar('content_title').' - '.XoopsLocale::A_PRINT.' - '.$xoopsModule->name())); |
|
62 | 62 | |
63 | 63 | $tpl->display('module:page/page_print.tpl'); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | { |
36 | 36 | $path = dirname(__DIR__); |
37 | 37 | XoopsLoad::addMap(array( |
38 | - 'page' => $path . '/class/helper.php', |
|
38 | + 'page' => $path.'/class/helper.php', |
|
39 | 39 | )); |
40 | 40 | } |
41 | 41 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $block[$k] = $v; |
38 | 38 | } |
39 | 39 | // related |
40 | - $block['related'] = $page->getLinkHandler()->menu_related($options[1]); |
|
40 | + $block['related'] = $page->getLinkHandler()->menu_related($options[1]); |
|
41 | 41 | |
42 | 42 | // get vote by user |
43 | 43 | $block['yourvote'] = $page->getRatingHandler()->getVotebyUser($options[1]); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $sort = ('sqlite' === \XoopsBaseConfig::get('db-type')) ? 'RANDOM()' : 'RAND()'; |
53 | 53 | $content = $page->getContentHandler()->getPagePublished(0, $options[3], $sort); |
54 | 54 | } else { |
55 | - $content = $page->getContentHandler()->getPagePublished(0, $options[3], 'content_' . $options[1], $options[2]); |
|
55 | + $content = $page->getContentHandler()->getPagePublished(0, $options[3], 'content_'.$options[1], $options[2]); |
|
56 | 56 | } |
57 | 57 | foreach (array_keys($content) as $i) { |
58 | 58 | $block['content'][$i] = $content[$i]->getValues(); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | |
179 | 179 | // criteria |
180 | 180 | $criteria = new CriteriaCompo(); |
181 | - $criteria->add(new Criteria('content_id', '(' . implode(', ', $pages_ids) . ')', 'IN')); |
|
181 | + $criteria->add(new Criteria('content_id', '('.implode(', ', $pages_ids).')', 'IN')); |
|
182 | 182 | $criteria->add(new Criteria('content_status', 0, '!=')); |
183 | 183 | $criteria->add(new Criteria('content_maindisplay', 0, '!=')); |
184 | 184 | $criteria->setSort($sort); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | |
201 | 201 | // criteria |
202 | 202 | $criteria = new CriteriaCompo(); |
203 | - $criteria->add(new Criteria('content_id', '(' . implode(', ', $pages_ids) . ')', 'IN')); |
|
203 | + $criteria->add(new Criteria('content_id', '('.implode(', ', $pages_ids).')', 'IN')); |
|
204 | 204 | $criteria->add(new Criteria('content_status', 0, '!=')); |
205 | 205 | $criteria->add(new Criteria('content_maindisplay', 0, '!=')); |
206 | 206 | $criteria->setSort($sort); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | { |
246 | 246 | $values = parent::get($content_id)->toArray(); |
247 | 247 | $values['content_id'] = 0; |
248 | - $values['content_title'] = PageLocale::CONTENT_COPY . $values['content_title']; |
|
248 | + $values['content_title'] = PageLocale::CONTENT_COPY.$values['content_title']; |
|
249 | 249 | $values['content_weight'] = 0; |
250 | 250 | $values['content_hits'] = 0; |
251 | 251 | $values['content_votes'] = 0; |
@@ -100,6 +100,6 @@ |
||
100 | 100 | ++$i; |
101 | 101 | $total += $v->getVar('rating_rating'); |
102 | 102 | } |
103 | - return array('voters' => $i, 'average' => $total/$i); |
|
103 | + return array('voters' => $i, 'average' => $total / $i); |
|
104 | 104 | } |
105 | 105 | } |
@@ -66,8 +66,8 @@ |
||
66 | 66 | $contents = $page->getContentHandler()->getPagePublished(0, $limit); |
67 | 67 | foreach ($contents as $k => $content) { |
68 | 68 | $ret[$k]['title'] = $content->getVar('content_title'); |
69 | - $ret[$k]['link'] = $page->url('viewpage.php') . '?id=' . $content->getVar('content_id'); |
|
70 | - $ret[$k]['content'] = $content->getVar('content_shorttext') . '<br />' . $content->getVar('content_text'); |
|
69 | + $ret[$k]['link'] = $page->url('viewpage.php').'?id='.$content->getVar('content_id'); |
|
70 | + $ret[$k]['content'] = $content->getVar('content_shorttext').'<br />'.$content->getVar('content_text'); |
|
71 | 71 | $ret[$k]['date'] = $content->getVar('content_create'); |
72 | 72 | } |
73 | 73 | return $ret; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | { |
32 | 32 | $xoops = Xoops::getInstance(); |
33 | 33 | $item = array(); |
34 | - $item_id = (int) $item_id; |
|
34 | + $item_id = (int)$item_id; |
|
35 | 35 | |
36 | 36 | if ($category === 'global') { |
37 | 37 | $item['name'] = ''; |
@@ -40,11 +40,11 @@ discard block |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | if ($category == 'item') { |
43 | - $sql = 'SELECT content_title FROM ' . $xoopsDB->prefix('page_content') . ' WHERE content_id = ' . $item_id; |
|
43 | + $sql = 'SELECT content_title FROM '.$xoopsDB->prefix('page_content').' WHERE content_id = '.$item_id; |
|
44 | 44 | $result = $xoopsDB->query($sql); // TODO: error check |
45 | 45 | $result_array = $xoopsDB->fetchArray($result); |
46 | 46 | $item['name'] = $result_array['title']; |
47 | - $item['url'] = \XoopsBaseConfig::get('url') . '/modules/page/viewpage.php?id=' . $item_id; |
|
47 | + $item['url'] = \XoopsBaseConfig::get('url').'/modules/page/viewpage.php?id='.$item_id; |
|
48 | 48 | return $item; |
49 | 49 | } |
50 | 50 |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | public function update($item_id, $total_num) |
72 | 72 | { |
73 | 73 | $db = Xoops::getInstance()->db(); |
74 | - $sql = 'UPDATE ' . $db->prefix('page_content') . ' SET content_comments = ' . (int)($total_num) . ' WHERE content_id = ' . (int)($item_id); |
|
74 | + $sql = 'UPDATE '.$db->prefix('page_content').' SET content_comments = '.(int)($total_num).' WHERE content_id = '.(int)($item_id); |
|
75 | 75 | $db->query($sql); |
76 | 76 | } |
77 | 77 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | return $ret; |
99 | 99 | } else { |
100 | 100 | $ret['title'] = $view_content->getVar('content_title'); |
101 | - $ret['text'] = $view_content->getVar('content_shorttext') . $view_content->getVar('content_text'); |
|
101 | + $ret['text'] = $view_content->getVar('content_shorttext').$view_content->getVar('content_text'); |
|
102 | 102 | $ret['uid'] = $view_content->getVar('content_author'); |
103 | 103 | $ret['timestamp'] = $view_content->getVar('content_create'); |
104 | 104 | } |