@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $moduleDirName = basename(dirname(__DIR__)); |
| 29 | 29 | |
| 30 | 30 | if (false !== ($moduleHelper = Xmf\Module\Helper::getHelper($moduleDirName))) { |
| 31 | -} else { |
|
| 31 | +}else { |
|
| 32 | 32 | $moduleHelper = Xmf\Module\Helper::getHelper('system'); |
| 33 | 33 | } |
| 34 | 34 | $adminObject = \Xmf\Module\Admin::getInstance(); |
@@ -42,24 +42,24 @@ discard block |
||
| 42 | 42 | $i = 0; |
| 43 | 43 | $adminmenu[$i]['title'] = _AM_MODULEADMIN_HOME; |
| 44 | 44 | $adminmenu[$i]['link'] = 'admin/index.php'; |
| 45 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/home.png'; |
|
| 45 | +$adminmenu[$i]['icon'] = $pathIcon32.'/home.png'; |
|
| 46 | 46 | ++$i; |
| 47 | 47 | $adminmenu[$i]['title'] = planet_constant('MI_ADMENU_INDEX'); |
| 48 | 48 | $adminmenu[$i]['link'] = 'admin/main.php'; |
| 49 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/manage.png'; |
|
| 49 | +$adminmenu[$i]['icon'] = $pathIcon32.'/manage.png'; |
|
| 50 | 50 | |
| 51 | 51 | ++$i; |
| 52 | 52 | $adminmenu[$i]['title'] = planet_constant('MI_ADMENU_CATEGORY'); |
| 53 | 53 | $adminmenu[$i]['link'] = 'admin/admin.category.php'; |
| 54 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/category.png'; |
|
| 54 | +$adminmenu[$i]['icon'] = $pathIcon32.'/category.png'; |
|
| 55 | 55 | ++$i; |
| 56 | 56 | $adminmenu[$i]['title'] = planet_constant('MI_ADMENU_BLOG'); |
| 57 | 57 | $adminmenu[$i]['link'] = 'admin/admin.blog.php'; |
| 58 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/translations.png'; |
|
| 58 | +$adminmenu[$i]['icon'] = $pathIcon32.'/translations.png'; |
|
| 59 | 59 | ++$i; |
| 60 | 60 | $adminmenu[$i]['title'] = planet_constant('MI_ADMENU_ARTICLE'); |
| 61 | 61 | $adminmenu[$i]['link'] = 'admin/admin.article.php'; |
| 62 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/content.png'; |
|
| 62 | +$adminmenu[$i]['icon'] = $pathIcon32.'/content.png'; |
|
| 63 | 63 | //++$i; |
| 64 | 64 | //$adminmenu[$i]['title'] = planet_constant("MI_ADMENU_BLOCK"); |
| 65 | 65 | //$adminmenu[$i]['link'] = "admin/admin.block.php"; |
@@ -67,4 +67,4 @@ discard block |
||
| 67 | 67 | ++$i; |
| 68 | 68 | $adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT; |
| 69 | 69 | $adminmenu[$i]['link'] = 'admin/about.php'; |
| 70 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/about.png'; |
|
| 70 | +$adminmenu[$i]['icon'] = $pathIcon32.'/about.png'; |
|
@@ -24,18 +24,18 @@ discard block |
||
| 24 | 24 | // URL: https://xoops.org // |
| 25 | 25 | // Project: Article Project // |
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | -require_once __DIR__ . '/admin_header.php'; |
|
| 28 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 27 | +require_once __DIR__.'/admin_header.php'; |
|
| 28 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 29 | 29 | |
| 30 | 30 | xoops_cp_header(); |
| 31 | 31 | $adminObject = \Xmf\Module\Admin::getInstance(); |
| 32 | 32 | $adminObject->displayNavigation(basename(__FILE__)); |
| 33 | -require XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'; |
|
| 33 | +require XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php'; |
|
| 34 | 34 | //planet_adminmenu(1); |
| 35 | 35 | |
| 36 | 36 | $op = !empty($_POST['op']) ? $_POST['op'] : (!empty($_GET['op']) ? $_GET['op'] : ''); |
| 37 | 37 | $cat_id = !empty($_POST['category']) ? $_POST['category'] : (!empty($_GET['category']) ? $_GET['category'] : 0); |
| 38 | -$cat_id = is_array($cat_id) ? array_map('intval', $cat_id) : (int)$cat_id; |
|
| 38 | +$cat_id = is_array($cat_id) ? array_map('intval', $cat_id) : (int) $cat_id; |
|
| 39 | 39 | |
| 40 | 40 | $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']); |
| 41 | 41 | $blogHandler = xoops_getModuleHandler('blog', $GLOBALS['moddirname']); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | case 'save': |
| 45 | 45 | if ($cat_id) { |
| 46 | 46 | $category_obj = $categoryHandler->get($cat_id); |
| 47 | - } else { |
|
| 47 | + }else { |
|
| 48 | 48 | $category_obj = $categoryHandler->create(); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | if (!$categoryHandler->insert($category_obj)) { |
| 55 | 55 | $message = planet_constant('AM_ERROR'); |
| 56 | - } else { |
|
| 56 | + }else { |
|
| 57 | 57 | $message = planet_constant('AM_DBUPDATED'); |
| 58 | 58 | } |
| 59 | 59 | redirect_header('admin.category.php', 2, $message); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | case 'order': |
| 74 | 74 | $count = count($_POST['cat_order']); |
| 75 | - for ($i = 0; $i < $count; ++$i) { |
|
| 75 | + for ($i = 0; $i<$count; ++$i) { |
|
| 76 | 76 | $category_obj = $categoryHandler->get($_POST['cat'][$i]); |
| 77 | 77 | $category_obj->setVar('cat_order', $_POST['cat_order'][$i]); |
| 78 | 78 | $categoryHandler->insert($category_obj, true); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | $button_tray->addElement($butt_cancel); |
| 97 | 97 | $form->addElement($button_tray); |
| 98 | 98 | |
| 99 | - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>'; |
|
| 99 | + echo "<fieldset><legend style='font-weight: bold; color: #900;'>"._EDIT.'</legend>'; |
|
| 100 | 100 | echo '<br>'; |
| 101 | 101 | $form->display(); |
| 102 | 102 | echo '</fieldset>'; |
@@ -110,20 +110,20 @@ discard block |
||
| 110 | 110 | $blog_counts = $blogHandler->getCountsByCategory(); |
| 111 | 111 | foreach (array_keys($categories) as $cid) { |
| 112 | 112 | if (!empty($blog_counts[$cid])) { |
| 113 | - $categories[$cid] .= ' (' . (int)$blog_counts[$cid] . ')'; |
|
| 113 | + $categories[$cid] .= ' ('.(int) $blog_counts[$cid].')'; |
|
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_LIST') . '</legend>'; |
|
| 117 | + echo "<fieldset><legend style='font-weight: bold; color: #900;'>".planet_constant('AM_LIST').'</legend>'; |
|
| 118 | 118 | echo "<br style=\"clear:both;\">"; |
| 119 | 119 | |
| 120 | 120 | echo "<form name='list' method='post'>"; |
| 121 | 121 | echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>"; |
| 122 | 122 | echo "<tr align='center'>"; |
| 123 | - echo "<th class='bg3' width='5%'>" . planet_constant('AM_ORDER') . '</td>'; |
|
| 124 | - echo "<th align='left' class='bg3' width='80%'>" . planet_constant('AM_TITLE') . '</td>'; |
|
| 125 | - echo "<th class='bg3' width='5%'>" . planet_constant('AM_BLOGCOUNT') . '</td>'; |
|
| 126 | - echo "<th class='bg3' width='5%'>" . planet_constant('AM_ACTIONS') . '</td>'; |
|
| 123 | + echo "<th class='bg3' width='5%'>".planet_constant('AM_ORDER').'</td>'; |
|
| 124 | + echo "<th align='left' class='bg3' width='80%'>".planet_constant('AM_TITLE').'</td>'; |
|
| 125 | + echo "<th class='bg3' width='5%'>".planet_constant('AM_BLOGCOUNT').'</td>'; |
|
| 126 | + echo "<th class='bg3' width='5%'>".planet_constant('AM_ACTIONS').'</td>'; |
|
| 127 | 127 | // echo "<td class='bg3' width='5%'>" . _DELETE . "</td>"; |
| 128 | 128 | |
| 129 | 129 | echo '</tr>'; |
@@ -131,20 +131,20 @@ discard block |
||
| 131 | 131 | $ii = 0; |
| 132 | 132 | foreach (array_keys($categories) as $cid) { |
| 133 | 133 | echo "<tr class='odd' align='left'>"; |
| 134 | - echo "<td><input type='hidden' name='cat[]' value='" . $cid . "'>"; |
|
| 135 | - echo "<input type='text' name='cat_order[]' value='" . ($ii * 10) . "'></td>"; |
|
| 136 | - echo '<td>' . $categories[$cid] . '</td>'; |
|
| 137 | - echo "<td align='center'>" . @$blog_counts[$cid] . '</td>'; |
|
| 134 | + echo "<td><input type='hidden' name='cat[]' value='".$cid."'>"; |
|
| 135 | + echo "<input type='text' name='cat_order[]' value='".($ii*10)."'></td>"; |
|
| 136 | + echo '<td>'.$categories[$cid].'</td>'; |
|
| 137 | + echo "<td align='center'>".@$blog_counts[$cid].'</td>'; |
|
| 138 | 138 | |
| 139 | - echo "<td align='center'><a href='admin.category.php?op=edit &category='" . $cid . "' title='" . _EDIT . "'><img src='" . $pathIcon16 . "/edit.png '" . "alt='" . _EDIT . "' title='" . _EDIT . "' </a> |
|
| 140 | - <a href='admin.category.php?op=del &category='" . $cid . "' title='" . _DELETE . "'><img src='" . $pathIcon16 . "/delete.png '" . " alt='" . _EDIT . "' title='" . _DELETE . "' </a></td>"; |
|
| 139 | + echo "<td align='center'><a href='admin.category.php?op=edit &category='".$cid."' title='"._EDIT."'><img src='".$pathIcon16."/edit.png '"."alt='"._EDIT."' title='"._EDIT."' </a> |
|
| 140 | + <a href='admin.category.php?op=del &category='" . $cid."' title='"._DELETE."'><img src='".$pathIcon16."/delete.png '"." alt='"._EDIT."' title='"._DELETE."' </a></td>"; |
|
| 141 | 141 | echo '</tr>'; |
| 142 | 142 | ++$ii; |
| 143 | 143 | } |
| 144 | 144 | echo "<tr class='even' align='center'>"; |
| 145 | 145 | echo "<td colspan='5'>"; |
| 146 | - echo "<input name='submit' value='" . _SUBMIT . "' type='submit'>"; |
|
| 147 | - echo "<input name='' value='" . _CANCEL . "' type='reset'>"; |
|
| 146 | + echo "<input name='submit' value='"._SUBMIT."' type='submit'>"; |
|
| 147 | + echo "<input name='' value='"._CANCEL."' type='reset'>"; |
|
| 148 | 148 | echo "<input name='op' value='order' type='hidden'>"; |
| 149 | 149 | echo '</td>'; |
| 150 | 150 | echo '</tr>'; |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | $button_tray->addElement($butt_cancel); |
| 164 | 164 | $form->addElement($button_tray); |
| 165 | 165 | |
| 166 | - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _ADD . '</legend>'; |
|
| 166 | + echo "<fieldset><legend style='font-weight: bold; color: #900;'>"._ADD.'</legend>'; |
|
| 167 | 167 | echo '<br>'; |
| 168 | 168 | $form->display(); |
| 169 | 169 | echo '</fieldset>'; |
@@ -17,8 +17,8 @@ discard block |
||
| 17 | 17 | * @author XOOPS Development Team |
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
| 21 | -require_once __DIR__ . '/admin_header.php'; |
|
| 20 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
| 21 | +require_once __DIR__.'/admin_header.php'; |
|
| 22 | 22 | |
| 23 | 23 | xoops_cp_header(); |
| 24 | 24 | |
@@ -27,4 +27,4 @@ discard block |
||
| 27 | 27 | $adminObject->displayNavigation(basename(__FILE__)); |
| 28 | 28 | $adminObject->displayIndex(); |
| 29 | 29 | |
| 30 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 30 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
| 29 | 29 | |
| 30 | -include __DIR__ . '/include/vars.php'; |
|
| 30 | +include __DIR__.'/include/vars.php'; |
|
| 31 | 31 | |
| 32 | -$modversion = array( |
|
| 32 | +$modversion = array( |
|
| 33 | 33 | 'name' => planet_constant('MI_NAME'), |
| 34 | 34 | 'version' => 2.10, |
| 35 | 35 | 'module_status' => 'Final', |
@@ -39,11 +39,11 @@ discard block |
||
| 39 | 39 | 'credits' => 'XOOPS Project', |
| 40 | 40 | 'image' => 'assets/images/logoModule.png', |
| 41 | 41 | 'dirname' => $GLOBALS['moddirname'], |
| 42 | - 'help' => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/readme.html' |
|
| 42 | + 'help' => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/readme.html' |
|
| 43 | 43 | ); |
| 44 | 44 | $modversion['help'] = 'page=help'; |
| 45 | 45 | $modversion['license'] = 'GNU see LICENSE'; |
| 46 | -$modversion['license_file'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/gpl.txt'; |
|
| 46 | +$modversion['license_file'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/gpl.txt'; |
|
| 47 | 47 | $modversion['author_word'] = ''; |
| 48 | 48 | $modversion['module_team'] = ''; |
| 49 | 49 | |
@@ -62,12 +62,12 @@ discard block |
||
| 62 | 62 | // database tables |
| 63 | 63 | $modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; |
| 64 | 64 | $modversion['tables'] = array( |
| 65 | - $GLOBALS['MOD_DB_PREFIX'] . '_category', |
|
| 66 | - $GLOBALS['MOD_DB_PREFIX'] . '_article', |
|
| 67 | - $GLOBALS['MOD_DB_PREFIX'] . '_blog', |
|
| 68 | - $GLOBALS['MOD_DB_PREFIX'] . '_blogcat', |
|
| 69 | - $GLOBALS['MOD_DB_PREFIX'] . '_bookmark', |
|
| 70 | - $GLOBALS['MOD_DB_PREFIX'] . '_rate' |
|
| 65 | + $GLOBALS['MOD_DB_PREFIX'].'_category', |
|
| 66 | + $GLOBALS['MOD_DB_PREFIX'].'_article', |
|
| 67 | + $GLOBALS['MOD_DB_PREFIX'].'_blog', |
|
| 68 | + $GLOBALS['MOD_DB_PREFIX'].'_blogcat', |
|
| 69 | + $GLOBALS['MOD_DB_PREFIX'].'_bookmark', |
|
| 70 | + $GLOBALS['MOD_DB_PREFIX'].'_rate' |
|
| 71 | 71 | ); |
| 72 | 72 | |
| 73 | 73 | // Admin things |
@@ -93,11 +93,11 @@ discard block |
||
| 93 | 93 | /** |
| 94 | 94 | * Templates |
| 95 | 95 | */ |
| 96 | -$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_index.tpl', 'description' => ''); |
|
| 97 | -$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_article.tpl', 'description' => ''); |
|
| 98 | -$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_archive.tpl', 'description' => ''); |
|
| 99 | -$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_blogs.tpl', 'description' => ''); |
|
| 100 | -$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_search.tpl', 'description' => ''); |
|
| 96 | +$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_index.tpl', 'description' => ''); |
|
| 97 | +$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_article.tpl', 'description' => ''); |
|
| 98 | +$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_archive.tpl', 'description' => ''); |
|
| 99 | +$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_blogs.tpl', 'description' => ''); |
|
| 100 | +$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_search.tpl', 'description' => ''); |
|
| 101 | 101 | |
| 102 | 102 | //module css |
| 103 | 103 | $modversion['css'] = 'templates/style.css'; |
@@ -109,31 +109,31 @@ discard block |
||
| 109 | 109 | $modversion['blocks'][$i]['file'] = 'block.php'; |
| 110 | 110 | $modversion['blocks'][$i]['name'] = planet_constant('MI_ARTICLE'); |
| 111 | 111 | $modversion['blocks'][$i]['description'] = planet_constant('MI_ARTICLE_DESC'); |
| 112 | -$modversion['blocks'][$i]['show_func'] = $GLOBALS['VAR_PREFIX'] . '_article_show'; |
|
| 112 | +$modversion['blocks'][$i]['show_func'] = $GLOBALS['VAR_PREFIX'].'_article_show'; |
|
| 113 | 113 | $modversion['blocks'][$i]['options'] = 'time|10|0|0'; // type|MaxItems|TitleLength|SummaryLength |
| 114 | -$modversion['blocks'][$i]['edit_func'] = $GLOBALS['VAR_PREFIX'] . '_article_edit'; |
|
| 115 | -$modversion['blocks'][$i]['template'] = $GLOBALS['VAR_PREFIX'] . '_block_article.tpl'; |
|
| 114 | +$modversion['blocks'][$i]['edit_func'] = $GLOBALS['VAR_PREFIX'].'_article_edit'; |
|
| 115 | +$modversion['blocks'][$i]['template'] = $GLOBALS['VAR_PREFIX'].'_block_article.tpl'; |
|
| 116 | 116 | |
| 117 | 117 | ++$i; |
| 118 | 118 | $modversion['blocks'][$i]['file'] = 'block.php'; |
| 119 | 119 | $modversion['blocks'][$i]['name'] = planet_constant('MI_CATEGORY'); |
| 120 | 120 | $modversion['blocks'][$i]['description'] = planet_constant('MI_CATEGORY_DESC'); |
| 121 | -$modversion['blocks'][$i]['show_func'] = $GLOBALS['VAR_PREFIX'] . '_category_show'; |
|
| 122 | -$modversion['blocks'][$i]['template'] = $GLOBALS['VAR_PREFIX'] . '_block_category.tpl'; |
|
| 121 | +$modversion['blocks'][$i]['show_func'] = $GLOBALS['VAR_PREFIX'].'_category_show'; |
|
| 122 | +$modversion['blocks'][$i]['template'] = $GLOBALS['VAR_PREFIX'].'_block_category.tpl'; |
|
| 123 | 123 | |
| 124 | 124 | ++$i; |
| 125 | 125 | $modversion['blocks'][$i]['file'] = 'block.php'; |
| 126 | 126 | $modversion['blocks'][$i]['name'] = planet_constant('MI_BLOG'); |
| 127 | 127 | $modversion['blocks'][$i]['description'] = planet_constant('MI_BLOG_DESC'); |
| 128 | -$modversion['blocks'][$i]['show_func'] = $GLOBALS['VAR_PREFIX'] . '_blog_show'; |
|
| 128 | +$modversion['blocks'][$i]['show_func'] = $GLOBALS['VAR_PREFIX'].'_blog_show'; |
|
| 129 | 129 | $modversion['blocks'][$i]['options'] = 'feature|10|0|1'; // type|MaxItems|TitleLength|ShowDesc |
| 130 | -$modversion['blocks'][$i]['edit_func'] = $GLOBALS['VAR_PREFIX'] . '_blog_edit'; |
|
| 131 | -$modversion['blocks'][$i]['template'] = $GLOBALS['VAR_PREFIX'] . '_block_blog.tpl'; |
|
| 130 | +$modversion['blocks'][$i]['edit_func'] = $GLOBALS['VAR_PREFIX'].'_blog_edit'; |
|
| 131 | +$modversion['blocks'][$i]['template'] = $GLOBALS['VAR_PREFIX'].'_block_blog.tpl'; |
|
| 132 | 132 | |
| 133 | 133 | // Search |
| 134 | 134 | $modversion['hasSearch'] = 1; |
| 135 | 135 | $modversion['search']['file'] = 'include/search.inc.php'; |
| 136 | -$modversion['search']['func'] = $GLOBALS['VAR_PREFIX'] . '_search'; |
|
| 136 | +$modversion['search']['func'] = $GLOBALS['VAR_PREFIX'].'_search'; |
|
| 137 | 137 | |
| 138 | 138 | // Comments |
| 139 | 139 | $modversion['hasComments'] = 1; |
@@ -143,15 +143,15 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | // Comment callback functions |
| 145 | 145 | $modversion['comments']['callbackFile'] = 'include/comment.inc.php'; |
| 146 | -$modversion['comments']['callback']['approve'] = $GLOBALS['VAR_PREFIX'] . '_com_approve'; |
|
| 147 | -$modversion['comments']['callback']['update'] = $GLOBALS['VAR_PREFIX'] . '_com_update'; |
|
| 146 | +$modversion['comments']['callback']['approve'] = $GLOBALS['VAR_PREFIX'].'_com_approve'; |
|
| 147 | +$modversion['comments']['callback']['update'] = $GLOBALS['VAR_PREFIX'].'_com_update'; |
|
| 148 | 148 | |
| 149 | 149 | // Configs |
| 150 | 150 | // Config items |
| 151 | 151 | $modversion['config'][] = array( |
| 152 | 152 | 'name' => 'do_debug', |
| 153 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG', |
|
| 154 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG_DESC', |
|
| 153 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG', |
|
| 154 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG_DESC', |
|
| 155 | 155 | 'formtype' => 'yesno', |
| 156 | 156 | 'valuetype' => 'int', |
| 157 | 157 | 'default' => 1 |
@@ -159,8 +159,8 @@ discard block |
||
| 159 | 159 | |
| 160 | 160 | $modversion['config'][] = array( |
| 161 | 161 | 'name' => 'do_urw', |
| 162 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE', |
|
| 163 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE_DESC', |
|
| 162 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE', |
|
| 163 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE_DESC', |
|
| 164 | 164 | 'formtype' => 'yesno', |
| 165 | 165 | 'valuetype' => 'int', |
| 166 | 166 | 'default' => in_array(php_sapi_name(), array('apache', 'apache2handler')) |
@@ -168,8 +168,8 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | $modversion['config'][] = array( |
| 170 | 170 | 'name' => 'theme_set', |
| 171 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET', |
|
| 172 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET_DESC', |
|
| 171 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_THEMESET', |
|
| 172 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_THEMESET_DESC', |
|
| 173 | 173 | 'formtype' => 'select', |
| 174 | 174 | 'valuetype' => 'text', |
| 175 | 175 | 'options' => array(_NONE => '0'), |
@@ -178,23 +178,23 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | $modversion['config'][] = array( |
| 180 | 180 | 'name' => 'timeformat', |
| 181 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT', |
|
| 182 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_DESC', |
|
| 181 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT', |
|
| 182 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_DESC', |
|
| 183 | 183 | 'formtype' => 'select', |
| 184 | 184 | 'valuetype' => 'text', |
| 185 | 185 | 'options' => array( |
| 186 | 186 | _DATESTRING => 'l', |
| 187 | 187 | _MEDIUMDATESTRING => 'm', |
| 188 | 188 | _SHORTDATESTRING => 's', |
| 189 | - $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_CUSTOM' => 'c' |
|
| 189 | + $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_CUSTOM' => 'c' |
|
| 190 | 190 | ), |
| 191 | 191 | 'default' => 'c' |
| 192 | 192 | ); |
| 193 | 193 | |
| 194 | 194 | $modversion['config'][] = array( |
| 195 | 195 | 'name' => 'articles_perpage', |
| 196 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE', |
|
| 197 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE_DESC', |
|
| 196 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE', |
|
| 197 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE_DESC', |
|
| 198 | 198 | 'formtype' => 'textbox', |
| 199 | 199 | 'valuetype' => 'int', |
| 200 | 200 | 'default' => 10 |
@@ -202,8 +202,8 @@ discard block |
||
| 202 | 202 | |
| 203 | 203 | $modversion['config'][] = array( |
| 204 | 204 | 'name' => 'list_perpage', |
| 205 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE', |
|
| 206 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE_DESC', |
|
| 205 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE', |
|
| 206 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE_DESC', |
|
| 207 | 207 | 'formtype' => 'textbox', |
| 208 | 208 | 'valuetype' => 'int', |
| 209 | 209 | 'default' => 20 |
@@ -211,8 +211,8 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | $modversion['config'][] = array( |
| 213 | 213 | 'name' => 'blogs_perupdate', |
| 214 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE', |
|
| 215 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE_DESC', |
|
| 214 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE', |
|
| 215 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE_DESC', |
|
| 216 | 216 | 'formtype' => 'textbox', |
| 217 | 217 | 'valuetype' => 'int', |
| 218 | 218 | 'default' => 10 |
@@ -220,8 +220,8 @@ discard block |
||
| 220 | 220 | |
| 221 | 221 | $modversion['config'][] = array( |
| 222 | 222 | 'name' => 'article_expire', |
| 223 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE', |
|
| 224 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE_DESC', |
|
| 223 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE', |
|
| 224 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE_DESC', |
|
| 225 | 225 | 'formtype' => 'textbox', |
| 226 | 226 | 'valuetype' => 'int', |
| 227 | 227 | 'default' => 30 |
@@ -229,8 +229,8 @@ discard block |
||
| 229 | 229 | |
| 230 | 230 | $modversion['config'][] = array( |
| 231 | 231 | 'name' => 'display_summary', |
| 232 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY', |
|
| 233 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY_DESC', |
|
| 232 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY', |
|
| 233 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY_DESC', |
|
| 234 | 234 | 'formtype' => 'textbox', |
| 235 | 235 | 'valuetype' => 'int', |
| 236 | 236 | 'default' => 0 |
@@ -238,8 +238,8 @@ discard block |
||
| 238 | 238 | |
| 239 | 239 | $modversion['config'][] = array( |
| 240 | 240 | 'name' => 'do_sibling', |
| 241 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING', |
|
| 242 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING_DESC', |
|
| 241 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING', |
|
| 242 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING_DESC', |
|
| 243 | 243 | 'formtype' => 'yesno', |
| 244 | 244 | 'valuetype' => 'int', |
| 245 | 245 | 'default' => 1 |
@@ -247,8 +247,8 @@ discard block |
||
| 247 | 247 | |
| 248 | 248 | $modversion['config'][] = array( |
| 249 | 249 | 'name' => 'pings', |
| 250 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_PING', |
|
| 251 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PING_DESC', |
|
| 250 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_PING', |
|
| 251 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_PING_DESC', |
|
| 252 | 252 | 'formtype' => 'textarea', |
| 253 | 253 | 'valuetype' => 'text', |
| 254 | 254 | 'default' => '' |
@@ -256,8 +256,8 @@ discard block |
||
| 256 | 256 | |
| 257 | 257 | $modversion['config'][] = array( |
| 258 | 258 | 'name' => 'trackback_option', |
| 259 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION', |
|
| 260 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION_DESC', |
|
| 259 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION', |
|
| 260 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION_DESC', |
|
| 261 | 261 | 'formtype' => 'select', |
| 262 | 262 | 'valuetype' => 'int', |
| 263 | 263 | 'default' => 0, |
@@ -266,17 +266,17 @@ discard block |
||
| 266 | 266 | |
| 267 | 267 | $modversion['config'][] = array( |
| 268 | 268 | 'name' => 'copyright', |
| 269 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT', |
|
| 270 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT_DESC', |
|
| 269 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT', |
|
| 270 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT_DESC', |
|
| 271 | 271 | 'formtype' => 'textbox', |
| 272 | 272 | 'valuetype' => 'text', |
| 273 | - 'default' => 'Copyright© %s & ' . $xoopsConfig['sitename'] |
|
| 273 | + 'default' => 'Copyright© %s & '.$xoopsConfig['sitename'] |
|
| 274 | 274 | ); |
| 275 | 275 | |
| 276 | 276 | $modversion['config'][] = array( |
| 277 | 277 | 'name' => 'newblog_submit', |
| 278 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT', |
|
| 279 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT_DESC', |
|
| 278 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT', |
|
| 279 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT_DESC', |
|
| 280 | 280 | 'formtype' => 'select', |
| 281 | 281 | 'valuetype' => 'int', |
| 282 | 282 | 'default' => 2, |
@@ -291,8 +291,8 @@ discard block |
||
| 291 | 291 | |
| 292 | 292 | $modversion['config'][] = array( |
| 293 | 293 | 'name' => 'anonymous_rate', |
| 294 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE', |
|
| 295 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE_DESC', |
|
| 294 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE', |
|
| 295 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE_DESC', |
|
| 296 | 296 | 'formtype' => 'yesno', |
| 297 | 297 | 'valuetype' => 'int', |
| 298 | 298 | 'default' => 0 |
@@ -300,8 +300,8 @@ discard block |
||
| 300 | 300 | |
| 301 | 301 | $modversion['config'][] = array( |
| 302 | 302 | 'name' => 'do_pseudocron', |
| 303 | - 'title' => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON', |
|
| 304 | - 'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON_DESC', |
|
| 303 | + 'title' => $GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON', |
|
| 304 | + 'description' => $GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON_DESC', |
|
| 305 | 305 | 'formtype' => 'yesno', |
| 306 | 306 | 'valuetype' => 'int', |
| 307 | 307 | 'default' => 1 |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | |
| 312 | 312 | $modversion['hasNotification'] = 1; |
| 313 | 313 | $modversion['notification']['lookup_file'] = 'include/notification.inc.php'; |
| 314 | -$modversion['notification']['lookup_func'] = $GLOBALS['VAR_PREFIX'] . '_notify_iteminfo'; |
|
| 314 | +$modversion['notification']['lookup_func'] = $GLOBALS['VAR_PREFIX'].'_notify_iteminfo'; |
|
| 315 | 315 | |
| 316 | 316 | $i = 0; |
| 317 | 317 | ++$i; |
@@ -25,10 +25,10 @@ |
||
| 25 | 25 | // Project: Article Project // |
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | 27 | |
| 28 | -include __DIR__ . '/../../mainfile.php'; |
|
| 29 | -include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'; |
|
| 28 | +include __DIR__.'/../../mainfile.php'; |
|
| 29 | +include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php'; |
|
| 30 | 30 | //require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/functions.php'; |
| 31 | -require_once __DIR__ . '/class/utility.php'; |
|
| 31 | +require_once __DIR__.'/class/utility.php'; |
|
| 32 | 32 | |
| 33 | 33 | planet_define_url_delimiter(); |
| 34 | 34 | $myts = MyTextSanitizer::getInstance(); |
@@ -26,18 +26,18 @@ |
||
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | 27 | use Xmf\Request; |
| 28 | 28 | |
| 29 | -include __DIR__ . '/header.php'; |
|
| 30 | -$article_id = Request::getInt('article', 0, 'GET');//empty($_GET['article']) ? 0 : (int)$_GET['article']; |
|
| 29 | +include __DIR__.'/header.php'; |
|
| 30 | +$article_id = Request::getInt('article', 0, 'GET'); //empty($_GET['article']) ? 0 : (int)$_GET['article']; |
|
| 31 | 31 | if (empty($article_id)) { |
| 32 | 32 | return; |
| 33 | 33 | } |
| 34 | -if (planetGetCookie('art_' . $article_id) > 0) { |
|
| 34 | +if (planetGetCookie('art_'.$article_id)>0) { |
|
| 35 | 35 | return; |
| 36 | 36 | } |
| 37 | 37 | $articleHandler = xoops_getModuleHandler('article', $xoopsModule->getVar('dirname')); |
| 38 | 38 | $article_obj = $articleHandler->get($article_id); |
| 39 | -$article_obj->setVar('art_views', $article_obj->getVar('art_views') + 1, true); |
|
| 39 | +$article_obj->setVar('art_views', $article_obj->getVar('art_views')+1, true); |
|
| 40 | 40 | $articleHandler->insert($article_obj, true); |
| 41 | -PlanetUtility::planetSetCookie('art_' . $article_id, time()); |
|
| 41 | +PlanetUtility::planetSetCookie('art_'.$article_id, time()); |
|
| 42 | 42 | |
| 43 | 43 | return; |
@@ -24,5 +24,5 @@ |
||
| 24 | 24 | // URL: https://xoops.org // |
| 25 | 25 | // Project: Article Project // |
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | -include __DIR__ . '/../../mainfile.php'; |
|
| 28 | -include XOOPS_ROOT_PATH . '/include/comment_reply.php'; |
|
| 27 | +include __DIR__.'/../../mainfile.php'; |
|
| 28 | +include XOOPS_ROOT_PATH.'/include/comment_reply.php'; |
|
@@ -26,26 +26,26 @@ discard block |
||
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | 27 | use Xmf\Request; |
| 28 | 28 | |
| 29 | -include __DIR__ . '/header.php'; |
|
| 29 | +include __DIR__.'/header.php'; |
|
| 30 | 30 | |
| 31 | -$art_id = Request::getInt('article', Request::getInt('article', 0, 'POST'), 'GET');//(int)(isset($_GET['article']) ? $_GET['article'] : (isset($_POST['article']) ? $_POST['article'] : 0)); |
|
| 31 | +$art_id = Request::getInt('article', Request::getInt('article', 0, 'POST'), 'GET'); //(int)(isset($_GET['article']) ? $_GET['article'] : (isset($_POST['article']) ? $_POST['article'] : 0)); |
|
| 32 | 32 | if (empty($art_id)) { |
| 33 | 33 | redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID')); |
| 34 | 34 | } |
| 35 | 35 | if (!$xoopsUser->isAdmin()) { |
| 36 | 36 | redirect_header('javascript:history.go(-1);', 2, _NOPERM); |
| 37 | 37 | } |
| 38 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
| 39 | -include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'; |
|
| 38 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
| 39 | +include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php'; |
|
| 40 | 40 | |
| 41 | 41 | $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']); |
| 42 | 42 | $article_obj = $articleHandler->get($art_id); |
| 43 | 43 | |
| 44 | -$op = Request::getCmd('op', 'check', 'POST');//isset($_POST['op']) ? $_POST['op'] : ''; |
|
| 44 | +$op = Request::getCmd('op', 'check', 'POST'); //isset($_POST['op']) ? $_POST['op'] : ''; |
|
| 45 | 45 | |
| 46 | 46 | if ($op === 'del' || !empty(Request::getString('del', '', 'POST'))) { |
| 47 | 47 | $articleHandler->delete($article_obj); |
| 48 | - $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'; |
|
| 48 | + $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'; |
|
| 49 | 49 | $message = planet_constant('MD_SAVED'); |
| 50 | 50 | redirect_header($redirect, 2, $message); |
| 51 | 51 | } elseif ($op === 'save') { |
@@ -66,15 +66,15 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | $art_id_new = $articleHandler->insert($article_obj); |
| 68 | 68 | if (!$article_obj->getVar('art_id')) { |
| 69 | - $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'; |
|
| 69 | + $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'; |
|
| 70 | 70 | $message = planet_constant('MD_INSERTERROR'); |
| 71 | - } else { |
|
| 72 | - $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id'); |
|
| 71 | + }else { |
|
| 72 | + $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$article_obj->getVar('art_id'); |
|
| 73 | 73 | $message = planet_constant('MD_SAVED'); |
| 74 | 74 | } |
| 75 | 75 | redirect_header($redirect, 2, $message); |
| 76 | -} else { |
|
| 77 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 76 | +}else { |
|
| 77 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 78 | 78 | |
| 79 | 79 | $form = new XoopsThemeForm(_EDIT, 'formarticle', xoops_getenv('PHP_SELF'), 'post', true); |
| 80 | 80 | |
@@ -93,9 +93,9 @@ discard block |
||
| 93 | 93 | $butt_del->setExtra("onClick='document.forms.formarticle.op.value=del'"); |
| 94 | 94 | $button_tray->addElement($butt_del); |
| 95 | 95 | $butt_cancel = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); |
| 96 | - $butt_cancel->setExtra("onclick='window.document.location=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . (int)$art_id . "\"'"); |
|
| 96 | + $butt_cancel->setExtra("onclick='window.document.location=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.(int) $art_id."\"'"); |
|
| 97 | 97 | $button_tray->addElement($butt_cancel); |
| 98 | 98 | $form->addElement($button_tray); |
| 99 | 99 | $form->display(); |
| 100 | 100 | } |
| 101 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 101 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -26,10 +26,10 @@ discard block |
||
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | 27 | use Xmf\Request; |
| 28 | 28 | |
| 29 | -include __DIR__ . '/header.php'; |
|
| 29 | +include __DIR__.'/header.php'; |
|
| 30 | 30 | |
| 31 | 31 | if (preg_match("/\/notification_update\.php/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) { |
| 32 | - include XOOPS_ROOT_PATH . '/include/notification_update.php'; |
|
| 32 | + include XOOPS_ROOT_PATH.'/include/notification_update.php'; |
|
| 33 | 33 | exit(); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -66,10 +66,10 @@ discard block |
||
| 66 | 66 | } |
| 67 | 67 | */ |
| 68 | 68 | |
| 69 | -$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name') . ' - ' . planet_constant('MD_BLOGS'); |
|
| 69 | +$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name').' - '.planet_constant('MD_BLOGS'); |
|
| 70 | 70 | $xoopsOption['template_main'] = PlanetUtility::planetGetTemplate('blogs'); |
| 71 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
| 72 | -include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'; |
|
| 71 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
| 72 | +include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php'; |
|
| 73 | 73 | |
| 74 | 74 | // Following part will not be executed after cache |
| 75 | 75 | $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']); |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $criteria = new CriteriaCompo(); |
| 82 | 82 | $blog_prefix = ''; |
| 83 | 83 | /* Specific category */ |
| 84 | -if ($category_id > 0) { |
|
| 84 | +if ($category_id>0) { |
|
| 85 | 85 | $category_obj = $categoryHandler->get($category_id); |
| 86 | 86 | $criteria->add(new Criteria('bc.cat_id', $category_id)); |
| 87 | 87 | $uid = 0; |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /* User bookmarks(favorites) */ |
| 95 | -if ($uid > 0) { |
|
| 95 | +if ($uid>0) { |
|
| 96 | 96 | $criteria->add(new Criteria('bm.bm_uid', $uid)); |
| 97 | 97 | $category_id = 0; |
| 98 | 98 | $blog_id = 0; |
@@ -106,25 +106,25 @@ discard block |
||
| 106 | 106 | $blog_prefix = 'b.'; |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | -$criteria->add(new Criteria($blog_prefix . 'blog_status', 0, '>')); |
|
| 109 | +$criteria->add(new Criteria($blog_prefix.'blog_status', 0, '>')); |
|
| 110 | 110 | |
| 111 | 111 | /* Sort */ |
| 112 | 112 | $order = 'DESC'; |
| 113 | 113 | $sort = empty($sort) ? 'default' : $sort; |
| 114 | 114 | switch ($sort) { |
| 115 | 115 | case 'marks': |
| 116 | - $sortby = $blog_prefix . 'blog_marks'; |
|
| 116 | + $sortby = $blog_prefix.'blog_marks'; |
|
| 117 | 117 | break; |
| 118 | 118 | case 'rating': |
| 119 | - $sortby = $blog_prefix . 'blog_rating'; |
|
| 119 | + $sortby = $blog_prefix.'blog_rating'; |
|
| 120 | 120 | break; |
| 121 | 121 | case 'time': |
| 122 | - $sortby = $blog_prefix . 'blog_time'; |
|
| 122 | + $sortby = $blog_prefix.'blog_time'; |
|
| 123 | 123 | break; |
| 124 | 124 | case 'default': |
| 125 | 125 | default: |
| 126 | 126 | $sort = 'default'; |
| 127 | - $sortby = $blog_prefix . 'blog_id'; |
|
| 127 | + $sortby = $blog_prefix.'blog_id'; |
|
| 128 | 128 | break; |
| 129 | 129 | } |
| 130 | 130 | $criteria->setSort($sortby); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $criteria->setStart($start); |
| 133 | 133 | $criteria->setLimit($limit); |
| 134 | 134 | |
| 135 | -$tags = empty($list) ? '' : array($blog_prefix . 'blog_title', $blog_prefix . 'blog_time'); |
|
| 135 | +$tags = empty($list) ? '' : array($blog_prefix.'blog_title', $blog_prefix.'blog_time'); |
|
| 136 | 136 | switch ($query_type) { |
| 137 | 137 | case 'category': |
| 138 | 138 | $blogs_obj = $blogHandler->getByCategory($criteria, $tags); |
@@ -172,31 +172,31 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | unset($blogs_obj); |
| 174 | 174 | |
| 175 | -if ($count_blog > $limit) { |
|
| 176 | - include XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 175 | +if ($count_blog>$limit) { |
|
| 176 | + include XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 177 | 177 | $start_link = array(); |
| 178 | 178 | if ($sort) { |
| 179 | - $start_link[] = 'sort=' . $sort; |
|
| 179 | + $start_link[] = 'sort='.$sort; |
|
| 180 | 180 | } |
| 181 | 181 | if ($category_id) { |
| 182 | - $start_link[] = 'category=' . $category_id; |
|
| 182 | + $start_link[] = 'category='.$category_id; |
|
| 183 | 183 | } |
| 184 | 184 | if ($list) { |
| 185 | - $start_link[] = 'list=' . $list; |
|
| 185 | + $start_link[] = 'list='.$list; |
|
| 186 | 186 | } |
| 187 | 187 | $nav = new XoopsPageNav($count_blog, $limit, $start, 'start', implode('&', $start_link)); |
| 188 | 188 | $pagenav = $nav->renderNav(4); |
| 189 | -} else { |
|
| 189 | +}else { |
|
| 190 | 190 | $pagenav = ''; |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | $xoopsTpl->assign('xoops_pagetitle', $xoopsOption['xoops_pagetitle']); |
| 194 | -$xoopsTpl->assign('link_home', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\"" . planet_constant('MD_HOME') . "\" target=\"_self\">" . planet_constant('MD_HOME') . '</a>'); |
|
| 194 | +$xoopsTpl->assign('link_home', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/index.php\" title=\"".planet_constant('MD_HOME')."\" target=\"_self\">".planet_constant('MD_HOME').'</a>'); |
|
| 195 | 195 | |
| 196 | 196 | if ($category_id || $uid) { |
| 197 | - $xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/view.blogs.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>'); |
|
| 197 | + $xoopsTpl->assign('link_index', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/view.blogs.php\" title=\"".planet_constant('MD_INDEX')."\" target=\"_self\">".planet_constant('MD_INDEX').'</a>'); |
|
| 198 | 198 | |
| 199 | - $link_articles = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . "\" title=\"" . planet_constant('MD_ARTICLES') . "\">" . planet_constant('MD_ARTICLES') . '</a>'; |
|
| 199 | + $link_articles = "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.(empty($category_id) ? '' : '/c'.$category_id).(empty($uid) ? '' : '/u'.$uid)."\" title=\"".planet_constant('MD_ARTICLES')."\">".planet_constant('MD_ARTICLES').'</a>'; |
|
| 200 | 200 | $xoopsTpl->assign('link_articles', $link_articles); |
| 201 | 201 | } |
| 202 | 202 | |
@@ -205,8 +205,8 @@ discard block |
||
| 205 | 205 | . '/modules/' |
| 206 | 206 | . $GLOBALS['moddirname'] |
| 207 | 207 | . '/view.blogs.php' |
| 208 | - . (empty($category_id) ? '' : '/c' . $category_id) |
|
| 209 | - . (empty($uid) ? '' : '/u' . $uid) |
|
| 208 | + . (empty($category_id) ? '' : '/c'.$category_id) |
|
| 209 | + . (empty($uid) ? '' : '/u'.$uid) |
|
| 210 | 210 | . (empty($list) ? '/l1' : '') |
| 211 | 211 | . "\" title=\"" |
| 212 | 212 | . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) |
@@ -216,14 +216,14 @@ discard block |
||
| 216 | 216 | $xoopsTpl->assign('link_switch', $link_switch); |
| 217 | 217 | |
| 218 | 218 | if (empty($uid) && is_object($xoopsUser)) { |
| 219 | - $xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>'); |
|
| 219 | + $xoopsTpl->assign('link_bookmark', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'.URL_DELIMITER.'u'.$xoopsUser->getVar('uid')."\" title=\"".planet_constant('MD_BOOKMARKS')."\" target=\"_self\">".planet_constant('MD_BOOKMARKS').'</a>'); |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | if ($xoopsModuleConfig['newblog_submit'] == 1 || is_object($xoopsUser)) { |
| 223 | - $xoopsTpl->assign('link_submit', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\"" . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>'); |
|
| 223 | + $xoopsTpl->assign('link_submit', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/action.blog.php\" title=\""._SUBMIT."\" target=\"_blank\">"._SUBMIT.'</a>'); |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | -$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name') . '::' . planet_constant('MD_BLOGS')); |
|
| 226 | +$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name').'::'.planet_constant('MD_BLOGS')); |
|
| 227 | 227 | $xoopsTpl->assign('category', @$category_data); |
| 228 | 228 | $xoopsTpl->assign('user', @$user_data); |
| 229 | 229 | $xoopsTpl->assign('blogs', $blogs); |
@@ -237,19 +237,19 @@ discard block |
||
| 237 | 237 | $xoopsTpl->assign('canrate', 1); |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | -$sort_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER; |
|
| 240 | +$sort_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'.URL_DELIMITER; |
|
| 241 | 241 | $vars = array(); |
| 242 | 242 | if (!empty($category_id)) { |
| 243 | - $vars[] = 'c' . $category_id; |
|
| 243 | + $vars[] = 'c'.$category_id; |
|
| 244 | 244 | } |
| 245 | 245 | if (!empty($uid)) { |
| 246 | - $vars[] = 'u' . $uid; |
|
| 246 | + $vars[] = 'u'.$uid; |
|
| 247 | 247 | } |
| 248 | 248 | if (!empty($list)) { |
| 249 | 249 | $vars[] = 'li'; |
| 250 | 250 | } |
| 251 | 251 | if (!empty($vars)) { |
| 252 | - $sort_link .= implode('/', $vars) . '/'; |
|
| 252 | + $sort_link .= implode('/', $vars).'/'; |
|
| 253 | 253 | } |
| 254 | 254 | $sortlinks = array(); |
| 255 | 255 | $valid_sorts = array( |
@@ -262,8 +262,8 @@ discard block |
||
| 262 | 262 | if ($val == $sort) { |
| 263 | 263 | continue; |
| 264 | 264 | } |
| 265 | - $sortlinks[] = "<a href=\"" . $sort_link . $val . "\">" . $name . '</a>'; |
|
| 265 | + $sortlinks[] = "<a href=\"".$sort_link.$val."\">".$name.'</a>'; |
|
| 266 | 266 | } |
| 267 | 267 | $xoopsTpl->assign('link_sort', implode(' | ', $sortlinks)); |
| 268 | 268 | |
| 269 | -require_once __DIR__ . '/footer.php'; |
|
| 269 | +require_once __DIR__.'/footer.php'; |
|