@@ -48,11 +48,11 @@ discard block |
||
48 | 48 | |
49 | 49 | // hits |
50 | 50 | if ($view_content->getVar('content_author') != $uid && $view_content->getVar('content_dohits') != false) { |
51 | - if (!isset( $_SESSION['page_hits' . $content_id] ) || isset( $_SESSION['page_hits' . $content_id] ) && ($_SESSION['page_hits' . $content_id]['content_time'] + $interval) < time()) { |
|
51 | + if (!isset($_SESSION['page_hits'.$content_id]) || isset($_SESSION['page_hits'.$content_id]) && ($_SESSION['page_hits'.$content_id]['content_time'] + $interval) < time()) { |
|
52 | 52 | $hits = $view_content->getVar('content_hits') + 1; |
53 | 53 | $view_content->setVar('content_hits', $hits); |
54 | 54 | $content_Handler->insert($view_content); |
55 | - $_SESSION['page_hits' . $content_id]['content_time'] = time(); |
|
55 | + $_SESSION['page_hits'.$content_id]['content_time'] = time(); |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | // get token for rating |
71 | 71 | $xoops->tpl()->assign('security', $xoops->security()->createToken()); |
72 | 72 | // Meta |
73 | -$xoops->tpl()->assign('xoops_pagetitle', strip_tags($view_content->getVar('content_title') . ' - ' . $xoops->module->name())); |
|
73 | +$xoops->tpl()->assign('xoops_pagetitle', strip_tags($view_content->getVar('content_title').' - '.$xoops->module->name())); |
|
74 | 74 | $xoops->theme()->addMeta('meta', 'description', strip_tags($view_content->getVar('content_mdescription'))); |
75 | 75 | $xoops->theme()->addMeta('meta', 'keywords', strip_tags($view_content->getVar('content_mkeyword'))); |
76 | 76 | $xoops->footer(); |
@@ -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_content.tpl'); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | if (preg_match('/^\d+$/', Request::getInt('content_weight', 0)) == false) { |
132 | 132 | $error = true; |
133 | - $error_message .= PageLocale::E_WEIGHT . '<br />'; |
|
133 | + $error_message .= PageLocale::E_WEIGHT.'<br />'; |
|
134 | 134 | $obj->setVar('content_weight', 0); |
135 | 135 | } else { |
136 | 136 | $obj->setVar('content_weight', Request::getInt('content_weight', 0)); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $tags = array(); |
151 | 151 | $tags['MODULE_NAME'] = 'page'; |
152 | 152 | $tags['ITEM_NAME'] = Request::getString('content_title', ''); |
153 | - $tags['ITEM_URL'] = \XoopsBaseConfig::get('url') . '/modules/page/viewpage.php?id=' . $newcontent_id; |
|
153 | + $tags['ITEM_URL'] = \XoopsBaseConfig::get('url').'/modules/page/viewpage.php?id='.$newcontent_id; |
|
154 | 154 | $notification_handler->triggerEvent('global', 0, 'newcontent', $tags); |
155 | 155 | $notification_handler->triggerEvent('item', $newcontent_id, 'newcontent', $tags); |
156 | 156 | } |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | array('ok' => 1, 'content_id' => $content_id, 'op' => 'delete'), |
201 | 201 | 'content.php', |
202 | 202 | XoopsLocale::Q_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ITEM |
203 | - . '<br /><span class="red">' . $obj->getvar('content_title') . '<span>' |
|
203 | + . '<br /><span class="red">'.$obj->getvar('content_title').'<span>' |
|
204 | 204 | ); |
205 | 205 | } |
206 | 206 | break; |
@@ -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; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @version $Id$ |
23 | 23 | */ |
24 | 24 | |
25 | -include __DIR__ . '/header.php'; |
|
25 | +include __DIR__.'/header.php'; |
|
26 | 26 | |
27 | 27 | // Get Action type |
28 | 28 | $op = Request::getString('op', 'global'); |
@@ -71,13 +71,13 @@ discard block |
||
71 | 71 | $groups_ids_view = $gperm_Handler->getGroupIds('page_view_item', $content_id, $module_id); |
72 | 72 | $groups_ids_view = array_values($groups_ids_view); |
73 | 73 | foreach (array_keys($group_list) as $j) { |
74 | - $perms .= '<img id="loading_display' . $content_id . '_' . $j .'" src="' . $xoops->url('media/xoops/images/spinner.gif') . '" style="display:none;" alt="' . XoopsLocale::LOADING . '" />'; |
|
74 | + $perms .= '<img id="loading_display'.$content_id.'_'.$j.'" src="'.$xoops->url('media/xoops/images/spinner.gif').'" style="display:none;" alt="'.XoopsLocale::LOADING.'" />'; |
|
75 | 75 | if (in_array($j, $groups_ids_view)) { |
76 | - $perms .= "<img class=\"cursorpointer\" id=\"display" . $content_id . "_" . $j . "\" onclick=\"Xoops.changeStatus( 'permissions.php', { op: 'update_view', content_id: " . $content_id . ", group: " . $j . ", status: 'no' }, 'display" . $content_id . "_" . $j ."', 'permissions.php' )\" src=\"" . $xoops->url('modules/system/images/icons/default/success.png') . "\" alt=\"" . XoopsLocale::A_DISABLE . "\" title=\"" . XoopsLocale::A_DISABLE . "\" />"; |
|
76 | + $perms .= "<img class=\"cursorpointer\" id=\"display".$content_id."_".$j."\" onclick=\"Xoops.changeStatus( 'permissions.php', { op: 'update_view', content_id: ".$content_id.", group: ".$j.", status: 'no' }, 'display".$content_id."_".$j."', 'permissions.php' )\" src=\"".$xoops->url('modules/system/images/icons/default/success.png')."\" alt=\"".XoopsLocale::A_DISABLE."\" title=\"".XoopsLocale::A_DISABLE."\" />"; |
|
77 | 77 | } else { |
78 | - $perms .= "<img class=\"cursorpointer\" id=\"display" . $content_id . "_" . $j . "\" onclick=\"Xoops.changeStatus( 'permissions.php', { op: 'update_view', content_id: " . $content_id . ", group: " . $j . ", status: 'yes' }, 'display" . $content_id . "_" . $j ."', 'permissions.php' )\" src=\"" . $xoops->url('modules/system/images/icons/default/cancel.png') . "\" alt=\"" . XoopsLocale::A_ENABLE . "\" title=\"" . XoopsLocale::A_ENABLE . "\" />"; |
|
78 | + $perms .= "<img class=\"cursorpointer\" id=\"display".$content_id."_".$j."\" onclick=\"Xoops.changeStatus( 'permissions.php', { op: 'update_view', content_id: ".$content_id.", group: ".$j.", status: 'yes' }, 'display".$content_id."_".$j."', 'permissions.php' )\" src=\"".$xoops->url('modules/system/images/icons/default/cancel.png')."\" alt=\"".XoopsLocale::A_ENABLE."\" title=\"".XoopsLocale::A_ENABLE."\" />"; |
|
79 | 79 | } |
80 | - $perms .= $group_list[$j] . '<br />'; |
|
80 | + $perms .= $group_list[$j].'<br />'; |
|
81 | 81 | } |
82 | 82 | $content['id'] = $content_id; |
83 | 83 | $content['title'] = $content_arr[$i]->getVar('content_title'); |
@@ -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(); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | * @author Mage Grégory (AKA Mage) |
22 | 22 | * @version $Id$ |
23 | 23 | */ |
24 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
24 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
25 | 25 | |
26 | 26 | // Get main instance |
27 | 27 | XoopsLoad::load('system', 'system'); |
@@ -57,7 +57,7 @@ |
||
57 | 57 | |
58 | 58 | $tpl->assign('xoops_sitename', $xoops->getConfig('sitename')); |
59 | 59 | // Meta |
60 | -$tpl->assign('xoops_pagetitle', strip_tags($view_content->getVar('content_title') . ' - ' . XoopsLocale::A_PRINT . ' - ' . $xoopsModule->name())); |
|
60 | +$tpl->assign('xoops_pagetitle', strip_tags($view_content->getVar('content_title').' - '.XoopsLocale::A_PRINT.' - '.$xoopsModule->name())); |
|
61 | 61 | |
62 | 62 | $content = $tpl->fetch('module:page/page_pdf.tpl'); |
63 | 63 |
@@ -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 | } |