Completed
Push — master ( 7c5656...a50592 )
by Michael
01:55
created
admin/admin.article.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 // URL: https://xoops.org                         //
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27
-require_once __DIR__ . '/admin_header.php';
27
+require_once __DIR__.'/admin_header.php';
28 28
 
29 29
 xoops_cp_header();
30 30
 $adminObject = \Xmf\Module\Admin::getInstance();
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
  * This is a tricky fix for incomplete solution of module cone
37 37
  * it is expected to have a better solution in article 1.0
38 38
  */
39
-require XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
39
+require XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
40 40
 //planet_adminmenu(3);
41 41
 
42 42
 $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
43 43
 if (!empty($xoopsModuleConfig['article_expire'])) {
44
-    $criteria = new Criteria('art_time', time() - $xoopsModuleConfig['article_expire'] * 60 * 60 * 24, '<');
44
+    $criteria = new Criteria('art_time', time()-$xoopsModuleConfig['article_expire']*60*60*24, '<');
45 45
     if (!empty($_GET['purge'])) {
46 46
         $crit = new CriteriaCompo($criteria);
47 47
         $crit->add(new Criteria('art_comments', 0));
@@ -51,17 +51,17 @@  discard block
 block discarded – undo
51 51
         }
52 52
     }
53 53
     $article_count_expire = $articleHandler->getCount($criteria);
54
-} else {
54
+}else {
55 55
     $article_count_expire = 0;
56 56
 }
57 57
 $article_count = $articleHandler->getCount();
58 58
 
59
-echo "<fieldset><legend style=\"font-weight: bold; color: #900;\">" . planet_constant('AM_ARTICLES') . '</legend>';
59
+echo "<fieldset><legend style=\"font-weight: bold; color: #900;\">".planet_constant('AM_ARTICLES').'</legend>';
60 60
 echo "<div style=\"padding: 8px;\">";
61
-echo "<br clear=\"all\">" . planet_constant('AM_COUNT') . ': ' . $article_count;
61
+echo "<br clear=\"all\">".planet_constant('AM_COUNT').': '.$article_count;
62 62
 echo "<br clear=\"all\">";
63
-if ($article_count_expire > 0) {
64
-    echo "<br clear=\"all\"><a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/admin/admin.article.php?purge=1\" >" . planet_constant('AM_EXPIRED') . ': ' . $article_count_expire . '</a>';
63
+if ($article_count_expire>0) {
64
+    echo "<br clear=\"all\"><a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/admin/admin.article.php?purge=1\" >".planet_constant('AM_EXPIRED').': '.$article_count_expire.'</a>';
65 65
     echo "<br clear=\"all\">";
66 66
 }
67 67
 echo '</div>';
Please login to merge, or discard this patch.
admin/main.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 // URL: https://xoops.org                         //
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27
-require_once __DIR__ . '/admin_header.php';
27
+require_once __DIR__.'/admin_header.php';
28 28
 
29 29
 xoops_cp_header();
30 30
 $adminObject = \Xmf\Module\Admin::getInstance();
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
     </style>
51 51
 ";
52 52
 
53
-echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_PREFERENCES') . '</legend>';
53
+echo "<fieldset><legend style='font-weight: bold; color: #900;'>".planet_constant('AM_PREFERENCES').'</legend>';
54 54
 echo "<div style='padding: 8px;'>";
55
-echo '<label>' . '<strong>PHP Version:</strong>' . ':</label><text>' . PHP_VERSION . '</text><br>';
55
+echo '<label>'.'<strong>PHP Version:</strong>'.':</label><text>'.PHP_VERSION.'</text><br>';
56 56
 //echo '<label>' . '<strong>MySQL Version:</strong>' . ':</label><text>' . mysqli_get_server_info() . '</text><br>';
57
-echo '<label>' . '<strong>XOOPS Version:</strong>' . ':</label><text>' . XOOPS_VERSION . '</text><br>';
58
-echo '<label>' . '<strong>Module Version:</strong>' . ':</label><text>' . $xoopsModule->getInfo('version') . '</text><br>';
57
+echo '<label>'.'<strong>XOOPS Version:</strong>'.':</label><text>'.XOOPS_VERSION.'</text><br>';
58
+echo '<label>'.'<strong>Module Version:</strong>'.':</label><text>'.$xoopsModule->getInfo('version').'</text><br>';
59 59
 echo '</div>';
60 60
 echo "<div style='padding: 8px;'>";
61 61
 //echo '<label>' . planet_constant('AM_SAFEMODE') . ':</label><text>';
@@ -67,31 +67,31 @@  discard block
 block discarded – undo
67 67
 //echo '<label>' . planet_constant('AM_MAGICQUOTESGPC') . ':</label><text>';
68 68
 //echo ini_get('magic_quotes_gpc') ? planet_constant('AM_ON') : planet_constant('AM_OFF');
69 69
 //echo '</text><br>';
70
-echo '<label>' . planet_constant('AM_MAXPOSTSIZE') . ':</label><text>' . ini_get('post_max_size');
70
+echo '<label>'.planet_constant('AM_MAXPOSTSIZE').':</label><text>'.ini_get('post_max_size');
71 71
 echo '</text><br>';
72
-echo '<label>' . planet_constant('AM_MAXINPUTTIME') . ':</label><text>' . ini_get('max_input_time');
72
+echo '<label>'.planet_constant('AM_MAXINPUTTIME').':</label><text>'.ini_get('max_input_time');
73 73
 echo '</text><br>';
74
-echo '<label>' . planet_constant('AM_OUTPUTBUFFERING') . ':</label><text>' . ini_get('output_buffering');
74
+echo '<label>'.planet_constant('AM_OUTPUTBUFFERING').':</label><text>'.ini_get('output_buffering');
75 75
 echo '</text><br>';
76
-echo '<label>' . planet_constant('AM_XML_EXTENSION') . ':</label><text>';
76
+echo '<label>'.planet_constant('AM_XML_EXTENSION').':</label><text>';
77 77
 echo extension_loaded('xml') ? planet_constant('AM_ON') : planet_constant('AM_OFF');
78 78
 echo '</text><br>';
79
-echo '<label>' . planet_constant('AM_MB_EXTENSION') . ':</label><text>';
79
+echo '<label>'.planet_constant('AM_MB_EXTENSION').':</label><text>';
80 80
 echo extension_loaded('mbstring') ? planet_constant('AM_ON') : planet_constant('AM_OFF');
81 81
 echo '</text><br>';
82
-echo '<label>' . planet_constant('AM_CURL') . ':</label><text>';
82
+echo '<label>'.planet_constant('AM_CURL').':</label><text>';
83 83
 echo function_exists('curl_init') ? planet_constant('AM_ON') : planet_constant('AM_OFF');
84 84
 echo '</text><br>';
85
-echo '<label>' . planet_constant('AM_FSOCKOPEN') . ':</label><text>';
85
+echo '<label>'.planet_constant('AM_FSOCKOPEN').':</label><text>';
86 86
 echo function_exists('fsockopen') ? planet_constant('AM_ON') : planet_constant('AM_OFF');
87 87
 echo '</text><br>';
88
-echo '<label>' . planet_constant('AM_URLFOPEN') . ':</label><text>';
88
+echo '<label>'.planet_constant('AM_URLFOPEN').':</label><text>';
89 89
 echo ini_get('allow_url_fopen') ? planet_constant('AM_ON') : planet_constant('AM_OFF');
90 90
 echo '</text><br>';
91 91
 echo '</div>';
92 92
 echo '</fieldset>';
93 93
 
94
-echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_STATS') . '</legend>';
94
+echo "<fieldset><legend style='font-weight: bold; color: #900;'>".planet_constant('AM_STATS').'</legend>';
95 95
 echo "<div style='padding: 8px;'>";
96 96
 $categoryHandler    = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
97 97
 $category_count     = $categoryHandler->getCount();
@@ -101,14 +101,14 @@  discard block
 block discarded – undo
101 101
 $article_count      = $articleHandler->getCount();
102 102
 $criteria           = new Criteria('blog_status', 0);
103 103
 $blog_count_pending = $blogHandler->getCount($criteria);
104
-echo '<label>' . planet_constant('AM_TOTAL_CATEGORIES') . ':</label><text>' . $category_count;
104
+echo '<label>'.planet_constant('AM_TOTAL_CATEGORIES').':</label><text>'.$category_count;
105 105
 echo '</text><br>';
106
-echo '<label>' . planet_constant('AM_TOTAL_BLOGS') . ':</label><text>' . $blog_count;
107
-if ($blog_count_pending > 0) {
108
-    echo " (<font color=\"red\">" . $blog_count_pending . '</font>)';
106
+echo '<label>'.planet_constant('AM_TOTAL_BLOGS').':</label><text>'.$blog_count;
107
+if ($blog_count_pending>0) {
108
+    echo " (<font color=\"red\">".$blog_count_pending.'</font>)';
109 109
 }
110 110
 echo '</text><br>';
111
-echo '<label>' . planet_constant('AM_TOTAL_ARTICLES') . ':</label><text>' . $article_count;
111
+echo '<label>'.planet_constant('AM_TOTAL_ARTICLES').':</label><text>'.$article_count;
112 112
 echo '</text><br>';
113 113
 echo '</div>';
114 114
 echo '</fieldset>';
Please login to merge, or discard this patch.
admin/header.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@
 block discarded – undo
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27 27
 
28
-require_once __DIR__ . '/../../../include/cp_header.php';
29
-require XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
28
+require_once __DIR__.'/../../../include/cp_header.php';
29
+require 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 XOOPS_ROOT_PATH . '/Frameworks/art/functions.admin.php';
32
-require_once __DIR__ . '/../class/utility.php';
31
+require_once XOOPS_ROOT_PATH.'/Frameworks/art/functions.admin.php';
32
+require_once __DIR__.'/../class/utility.php';
33 33
 $moduleDirName = basename(dirname(__DIR__));
34 34
 // include the default language file for the admin interface
35 35
 xoops_loadLanguage('main', $moduleDirName);
Please login to merge, or discard this patch.
admin/about.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@
 block discarded – undo
17 17
  * @author       XOOPS Development Team
18 18
  */
19 19
 
20
-require_once __DIR__ . '/admin_header.php';
20
+require_once __DIR__.'/admin_header.php';
21 21
 xoops_cp_header();
22 22
 
23 23
 $adminObject->displayNavigation(basename(__FILE__));
24 24
 $adminObject->setPaypal('[email protected]');
25 25
 $adminObject->displayAbout(false);
26 26
 
27
-require_once __DIR__ . '/admin_footer.php';
27
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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';
Please login to merge, or discard this patch.
header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
counter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,18 +26,18 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
comment_reply.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,5 +24,5 @@
 block discarded – undo
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';
Please login to merge, or discard this patch.
action.article.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -26,26 +26,26 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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';
Please login to merge, or discard this patch.