@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @author Mage Grégory (AKA Mage) |
22 | 22 | * @version $Id$ |
23 | 23 | */ |
24 | -include __DIR__ . '/header.php'; |
|
24 | +include __DIR__.'/header.php'; |
|
25 | 25 | |
26 | 26 | // Call header |
27 | 27 | $xoops->header('admin:page/page_admin_related.tpl'); |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | if (count($datas_delete) != 0) { |
107 | 107 | $criteria = $criteria = new CriteriaCompo(); |
108 | 108 | $criteria->add(new Criteria('link_related_id', $related_id)); |
109 | - $criteria->add(new Criteria('link_content_id', '(' . implode(', ', $datas_delete) . ')', 'IN')); |
|
110 | - $links_ids = $link_Handler->getIds($criteria); |
|
109 | + $criteria->add(new Criteria('link_content_id', '('.implode(', ', $datas_delete).')', 'IN')); |
|
110 | + $links_ids = $link_Handler->getIds($criteria); |
|
111 | 111 | if (!$link_Handler->DeleteByIds($links_ids)) { |
112 | 112 | } |
113 | 113 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | array('ok' => 1, 'related_id' => $related_id, 'op' => 'delete'), |
173 | 173 | 'related.php', |
174 | 174 | XoopsLocale::Q_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ITEM |
175 | - . '<br /><span class="red">' . $obj->getvar('related_name') . '<span>' |
|
175 | + . '<br /><span class="red">'.$obj->getvar('related_name').'<span>' |
|
176 | 176 | ); |
177 | 177 | } |
178 | 178 | break; |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $adminmenu[$i]['link'] = 'admin/related.php'; |
35 | 35 | $adminmenu[$i]['icon'] = 'groupmod.png'; |
36 | 36 | ++$i; |
37 | -$adminmenu[$i]['title'] =PageLocale::SYSTEM_PERMISSIONS; |
|
37 | +$adminmenu[$i]['title'] = PageLocale::SYSTEM_PERMISSIONS; |
|
38 | 38 | $adminmenu[$i]['link'] = 'admin/permissions.php'; |
39 | 39 | $adminmenu[$i]['icon'] = 'permissions.png'; |
40 | 40 | ++$i; |
@@ -19,7 +19,7 @@ |
||
19 | 19 | * @author Mage Grégory (AKA Mage) |
20 | 20 | * @version $Id$ |
21 | 21 | */ |
22 | -include __DIR__ . '/header.php'; |
|
22 | +include __DIR__.'/header.php'; |
|
23 | 23 | |
24 | 24 | // heaser |
25 | 25 | $xoops->header(); |
@@ -31,14 +31,14 @@ |
||
31 | 31 | $time = time(); |
32 | 32 | $content_id = Request::getInt('content_id', 0); |
33 | 33 | $option = Request::getInt('option', 0); |
34 | - if (!isset($_SESSION['page_rating' . $content_id]) || $_SESSION['page_rating' . $content_id] < $time) { |
|
35 | - $_SESSION['page_rating' . $content_id] = $time + $interval; |
|
34 | + if (!isset($_SESSION['page_rating'.$content_id]) || $_SESSION['page_rating'.$content_id] < $time) { |
|
35 | + $_SESSION['page_rating'.$content_id] = $time + $interval; |
|
36 | 36 | |
37 | 37 | // Test if the page exist |
38 | 38 | $contentObj = $content_Handler->get($content_id); |
39 | 39 | if (($contentObj === null) |
40 | 40 | // || $contentObj->getVar('content_author') == $uid |
41 | - || $contentObj->getVar('content_status') == 0 || $contentObj->getVar('content_dorating') == 0) { |
|
41 | + || $contentObj->getVar('content_status') == 0 || $contentObj->getVar('content_dorating') == 0) { |
|
42 | 42 | echo json_encode($ret); |
43 | 43 | exit(); |
44 | 44 | } |
@@ -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!) |
@@ -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 | } |