Completed
Push — master ( a50592...10bab4 )
by Michael
01:56
created
language/english/blocks.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -11,28 +11,28 @@
 block discarded – undo
11 11
     $current_path = str_replace(strpos($current_path, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, '/', $current_path);
12 12
 }
13 13
 $url_arr = explode('/', strstr($current_path, '/modules/'));
14
-include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/include/vars.php';
14
+include XOOPS_ROOT_PATH.'/modules/'.$url_arr[2].'/include/vars.php';
15 15
 
16
-if (defined($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_BLOCKS')) {
16
+if (defined($GLOBALS['VAR_PREFIXU'].'_LANG_EN_BLOCKS')) {
17 17
     return;
18 18
 }
19
-define($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_BLOCKS', 1);
19
+define($GLOBALS['VAR_PREFIXU'].'_LANG_EN_BLOCKS', 1);
20 20
 
21
-define($GLOBALS['VAR_PREFIXU'] . '_MB_TYPE', 'Type');
22
-define($GLOBALS['VAR_PREFIXU'] . '_MB_TYPE_TIME', 'Publish time');
23
-define($GLOBALS['VAR_PREFIXU'] . '_MB_TYPE_VIEWS', 'Views');
24
-define($GLOBALS['VAR_PREFIXU'] . '_MB_TYPE_RATES', 'Rate times');
25
-define($GLOBALS['VAR_PREFIXU'] . '_MB_TYPE_RATING', 'Rating');
26
-define($GLOBALS['VAR_PREFIXU'] . '_MB_TYPE_RANDOM', 'Random');
27
-define($GLOBALS['VAR_PREFIXU'] . '_MB_TYPE_BOOKMARKS', 'Bookmarks');
28
-define($GLOBALS['VAR_PREFIXU'] . '_MB_TYPE_FEATURED', 'Featured');
29
-define($GLOBALS['VAR_PREFIXU'] . '_MB_ITEMS', 'Item count');
30
-define($GLOBALS['VAR_PREFIXU'] . '_MB_TITLE_LENGTH', 'Title length');
31
-define($GLOBALS['VAR_PREFIXU'] . '_MB_TIMEFORMAT', 'Time format');
32
-define($GLOBALS['VAR_PREFIXU'] . '_MB_TIMEFORMAT_CUSTOM', 'Custom');
33
-define($GLOBALS['VAR_PREFIXU'] . '_MB_SUMMARY_LENGTH', 'Show summary length');
34
-define($GLOBALS['VAR_PREFIXU'] . '_MB_SHOWDESC', 'Show description');
35
-define($GLOBALS['VAR_PREFIXU'] . '_MB_CATEGORYLIST', 'Allowed categories');
21
+define($GLOBALS['VAR_PREFIXU'].'_MB_TYPE', 'Type');
22
+define($GLOBALS['VAR_PREFIXU'].'_MB_TYPE_TIME', 'Publish time');
23
+define($GLOBALS['VAR_PREFIXU'].'_MB_TYPE_VIEWS', 'Views');
24
+define($GLOBALS['VAR_PREFIXU'].'_MB_TYPE_RATES', 'Rate times');
25
+define($GLOBALS['VAR_PREFIXU'].'_MB_TYPE_RATING', 'Rating');
26
+define($GLOBALS['VAR_PREFIXU'].'_MB_TYPE_RANDOM', 'Random');
27
+define($GLOBALS['VAR_PREFIXU'].'_MB_TYPE_BOOKMARKS', 'Bookmarks');
28
+define($GLOBALS['VAR_PREFIXU'].'_MB_TYPE_FEATURED', 'Featured');
29
+define($GLOBALS['VAR_PREFIXU'].'_MB_ITEMS', 'Item count');
30
+define($GLOBALS['VAR_PREFIXU'].'_MB_TITLE_LENGTH', 'Title length');
31
+define($GLOBALS['VAR_PREFIXU'].'_MB_TIMEFORMAT', 'Time format');
32
+define($GLOBALS['VAR_PREFIXU'].'_MB_TIMEFORMAT_CUSTOM', 'Custom');
33
+define($GLOBALS['VAR_PREFIXU'].'_MB_SUMMARY_LENGTH', 'Show summary length');
34
+define($GLOBALS['VAR_PREFIXU'].'_MB_SHOWDESC', 'Show description');
35
+define($GLOBALS['VAR_PREFIXU'].'_MB_CATEGORYLIST', 'Allowed categories');
36 36
 
37
-define($GLOBALS['VAR_PREFIXU'] . '_MB_AUTHOR', 'Author');
38
-define($GLOBALS['VAR_PREFIXU'] . '_MB_TIME', 'Time');
37
+define($GLOBALS['VAR_PREFIXU'].'_MB_AUTHOR', 'Author');
38
+define($GLOBALS['VAR_PREFIXU'].'_MB_TIME', 'Time');
Please login to merge, or discard this patch.
blocks/block.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
     $current_path = str_replace(strpos($current_path, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, '/', $current_path);
33 33
 }
34 34
 $url_arr = explode('/', strstr($current_path, '/modules/'));
35
-include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/include/vars.php';
36
-include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/class/utility.php';
35
+include XOOPS_ROOT_PATH.'/modules/'.$url_arr[2].'/include/vars.php';
36
+include XOOPS_ROOT_PATH.'/modules/'.$url_arr[2].'/class/utility.php';
37 37
 //require_once XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/functions.php';
38 38
 
39 39
 /**
Please login to merge, or discard this patch.
action.rate.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  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 31
 $rate       = Request::getInt('rate', Request::getInt('rate', 0, 'POST'), 'GET'); //(int)(!empty($_POST['rate']) ? $_POST['rate'] : (!empty($_GET['rate']) ? $_GET['rate'] : 0));
32 32
 $article_id = Request::getInt('article', Request::getInt('article', 0, 'POST'), 'GET'); //(int)(!empty($_POST['article']) ? $_POST['article'] : (!empty($_GET['article']) ? $_GET['article'] : 0));
@@ -40,28 +40,28 @@  discard block
 block discarded – undo
40 40
 $blogHandler    = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
41 41
 if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) {
42 42
     $message = planet_constant('MD_NOACCESS');
43
-} else {
43
+}else {
44 44
     $uid = is_object($xoopsUser) ? $xoopsUser->getVar('uid') : 0;
45 45
     $ip  = PlanetUtility::planetGetIP();
46
-    if ($article_id > 0) {
46
+    if ($article_id>0) {
47 47
         $criteria = new CriteriaCompo(new Criteria('art_id', $article_id));
48
-    } else {
48
+    }else {
49 49
         $criteria = new CriteriaCompo(new Criteria('blog_id', $blog_id));
50 50
     }
51
-    if ($uid > 0) {
51
+    if ($uid>0) {
52 52
         $criteria->add(new Criteria('rate_uid', $uid));
53
-    } else {
53
+    }else {
54 54
         $criteria->add(new Criteria('rate_ip', $ip));
55
-        $criteria->add(new Criteria('rate_time', time() - 24 * 3600, '>'));
55
+        $criteria->add(new Criteria('rate_time', time()-24*3600, '>'));
56 56
     }
57 57
     $rateHandler = xoops_getModuleHandler('rate', $GLOBALS['moddirname']);
58 58
     if ($count = $rateHandler->getCount($criteria)) {
59 59
         $message = planet_constant('MD_ALREADYRATED');
60
-    } else {
60
+    }else {
61 61
         $rate_obj = $rateHandler->create();
62
-        if ($article_id > 0) {
62
+        if ($article_id>0) {
63 63
             $rate_obj->setVar('art_id', $article_id);
64
-        } else {
64
+        }else {
65 65
             $rate_obj->setVar('blog_id', $blog_id);
66 66
         }
67 67
         $rate_obj->setVar('rate_uid', $uid);
@@ -71,23 +71,23 @@  discard block
 block discarded – undo
71 71
         if (!$rate_id = $rateHandler->insert($rate_obj, true)) {
72 72
             redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_NOTSAVED'));
73 73
         }
74
-        if ($article_id > 0) {
74
+        if ($article_id>0) {
75 75
             $article_obj = $articleHandler->get($article_id);
76
-            $article_obj->setVar('art_rating', $article_obj->getVar('art_rating') + $rate);
77
-            $article_obj->setVar('art_rates', $article_obj->getVar('art_rates') + 1);
76
+            $article_obj->setVar('art_rating', $article_obj->getVar('art_rating')+$rate);
77
+            $article_obj->setVar('art_rates', $article_obj->getVar('art_rates')+1);
78 78
             $articleHandler->insert($article_obj, true);
79
-        } else {
79
+        }else {
80 80
             $blog_obj = $blogHandler->get($blog_id);
81
-            $blog_obj->setVar('blog_rating', $blog_obj->getVar('blog_rating') + $rate);
82
-            $blog_obj->setVar('blog_rates', $blog_obj->getVar('blog_rates') + 1);
81
+            $blog_obj->setVar('blog_rating', $blog_obj->getVar('blog_rating')+$rate);
82
+            $blog_obj->setVar('blog_rates', $blog_obj->getVar('blog_rates')+1);
83 83
             $blogHandler->insert($blog_obj, true);
84 84
         }
85 85
         $message = planet_constant('MD_ACTIONDONE');
86 86
     }
87 87
 }
88
-if ($article_id > 0) {
89
-    redirect_header(XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_id, 2, $message);
90
-} else {
91
-    redirect_header(XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $blog_id, 2, $message);
88
+if ($article_id>0) {
89
+    redirect_header(XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$article_id, 2, $message);
90
+}else {
91
+    redirect_header(XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'b'.$blog_id, 2, $message);
92 92
 }
93
-include __DIR__ . '/footer.php';
93
+include __DIR__.'/footer.php';
Please login to merge, or discard this patch.
include/vars.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     define('PLANET_INI', 1);
30 30
 }
31 31
 
32
-require_once __DIR__ . '/../class/utility.php';
32
+require_once __DIR__.'/../class/utility.php';
33 33
 /*
34 34
  * The prefix for database table name prefix
35 35
  * You can change to any term but be consistent with the table names in /sql/mysql.sql, and be unique , no conflict with other modules
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 $GLOBALS['MOD_DB_PREFIX'] = 'planet';
38 38
 
39 39
 /* You are not supposed to modify following contents */
40
-defined('FRAMEWORKS_ART_FUNCTIONS_INI') || require_once XOOPS_ROOT_PATH . '/Frameworks/art/functions.ini.php';
40
+defined('FRAMEWORKS_ART_FUNCTIONS_INI') || require_once XOOPS_ROOT_PATH.'/Frameworks/art/functions.ini.php';
41 41
 $GLOBALS['moddirname'] = mod_getDirname(__FILE__);
42 42
 
43 43
 /*
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
  * You can change to any term but be capital and unique, no conflict with other modules
52 52
  */
53 53
 $GLOBALS['VAR_PREFIXU'] = strtoupper($GLOBALS['moddirname']);
54
-require_once XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/functions.ini.php';
54
+require_once XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/include/functions.ini.php';
55 55
 
56 56
 // include customized variables
57 57
 if (is_object($GLOBALS['xoopsModule']) && $GLOBALS['moddirname'] == $GLOBALS['xoopsModule']->getVar('dirname', 'n')) {
Please login to merge, or discard this patch.
comment_new.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@
 block discarded – undo
24 24
 // URL: https://xoops.org                         //
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27
-include __DIR__ . '/header.php';
28
-$com_itemid = isset($_GET['com_itemid']) ? (int)$_GET['com_itemid'] : 0;
29
-if ($com_itemid > 0) {
27
+include __DIR__.'/header.php';
28
+$com_itemid = isset($_GET['com_itemid']) ? (int) $_GET['com_itemid'] : 0;
29
+if ($com_itemid>0) {
30 30
     $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
31 31
     $article_obj    = $articleHandler->get($com_itemid);
32 32
     $com_replytitle = $article_obj->getVar('art_title');
33
-    require_once XOOPS_ROOT_PATH . '/include/comment_new.php';
33
+    require_once XOOPS_ROOT_PATH.'/include/comment_new.php';
34 34
 }
Please login to merge, or discard this patch.
action.bookmark.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  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 31
 $blog_id = Request::getInt('blog', Request::getInt('blog', 0, 'POST'), 'GET'); //(int)(isset($_GET['blog']) ? $_GET['blog'] : (isset($_POST['blog']) ? $_POST['blog'] : 0));
32 32
 
@@ -40,19 +40,19 @@  discard block
 block discarded – undo
40 40
 $criteria->add(new Criteria('bm_uid', $uid));
41 41
 if ($count = $bookmarkHandler->getCount($criteria)) {
42 42
     $message = planet_constant('MD_ALREADYBOOKMARKED');
43
-    redirect_header(XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $uid, 2, $message);
43
+    redirect_header(XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'u'.$uid, 2, $message);
44 44
 }
45 45
 $bookmark_obj = $bookmarkHandler->create();
46 46
 $bookmark_obj->setVar('blog_id', $blog_id);
47 47
 $bookmark_obj->setVar('bm_uid', $uid);
48 48
 if (!$bookmark_id = $bookmarkHandler->insert($bookmark_obj, true)) {
49
-    redirect_header(XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $blog_id, 2, planet_constant('MD_NOTSAVED'));
49
+    redirect_header(XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'b'.$blog_id, 2, planet_constant('MD_NOTSAVED'));
50 50
 }
51 51
 $blogHandler = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
52 52
 $blog_obj    = $blogHandler->get($blog_id);
53
-$marks       = $blog_obj->getVar('blog_marks') + 1;
54
-$blog_obj->setVar('blog_marks', $blog_obj->getVar('blog_marks') + 1);
53
+$marks       = $blog_obj->getVar('blog_marks')+1;
54
+$blog_obj->setVar('blog_marks', $blog_obj->getVar('blog_marks')+1);
55 55
 $blogHandler->insert($blog_obj, true);
56 56
 $message = planet_constant('MD_ACTIONDONE');
57
-redirect_header(XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $blog_id, 2, $message);
58
-include __DIR__ . '/footer.php';
57
+redirect_header(XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'b'.$blog_id, 2, $message);
58
+include __DIR__.'/footer.php';
Please login to merge, or discard this patch.
pdf.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,21 +29,21 @@  discard block
 block discarded – undo
29 29
 
30 30
 use Xmf\Request;
31 31
 
32
-include __DIR__ . '/header.php';
32
+include __DIR__.'/header.php';
33 33
 global $pdf_data;
34 34
 if (!empty($_POST['pdf_data'])) {
35 35
     $pdf_data = unserialize(base64_decode(Request::getText('pdf_data', '', 'POST')));
36 36
 } elseif (!empty($pdf_data)) {
37
-} else {
37
+}else {
38 38
     error_reporting(0);
39
-    include __DIR__ . '/header.php';
39
+    include __DIR__.'/header.php';
40 40
     error_reporting(0);
41 41
 
42 42
     if (PlanetUtility::planetParseArguments($args_num, $args, $args_str)) {
43 43
         $args['article'] = @$args_num[0];
44 44
     }
45 45
 
46
-    $article_id = (int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']);
46
+    $article_id = (int) (empty($_GET['article']) ? @$args['article'] : $_GET['article']);
47 47
 
48 48
     $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
49 49
     $article_obj    = $articleHandler->get($article_id);
@@ -73,14 +73,14 @@  discard block
 block discarded – undo
73 73
     $pdf_data['date']    = $article_data['time'];
74 74
     $pdf_data['content'] = '';
75 75
     if ($article_data['summary']) {
76
-        $pdf_data['content'] .= planet_constant('MD_SUMMARY') . ': ' . $article_data['summary'] . '<br><br>';
76
+        $pdf_data['content'] .= planet_constant('MD_SUMMARY').': '.$article_data['summary'].'<br><br>';
77 77
     }
78
-    $pdf_data['content'] .= $article_data['text'] . '<br>';
79
-    $pdf_data['url']     = XOOPS_URL . '/modules/' . $GLOBALS['artdirname'] . '/view.article.php' . URL_DELIMITER . $article_obj->getVar('art_id');
78
+    $pdf_data['content'] .= $article_data['text'].'<br>';
79
+    $pdf_data['url'] = XOOPS_URL.'/modules/'.$GLOBALS['artdirname'].'/view.article.php'.URL_DELIMITER.$article_obj->getVar('art_id');
80 80
 }
81 81
 $pdf_data['filename'] = preg_replace("/[^0-9a-z\-_\.]/i", '', $pdf_data['title']);
82 82
 
83
-include XOOPS_ROOT_PATH . '/Frameworks/fpdf/init.php';
83
+include XOOPS_ROOT_PATH.'/Frameworks/fpdf/init.php';
84 84
 error_reporting(0);
85 85
 ob_end_clean();
86 86
 
Please login to merge, or discard this patch.
admin/admin_footer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
  */
19 19
 
20 20
 $pathIcon32 = \Xmf\Module\Admin::iconUrl('', 32);
21
-echo "<div class='adminfooter'>\n" . "  <div style='text-align: center;'>\n" . "    <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . "  </div>\n" . '  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>';
21
+echo "<div class='adminfooter'>\n"."  <div style='text-align: center;'>\n"."    <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"."  </div>\n".'  '._AM_MODULEADMIN_ADMIN_FOOTER."\n".'</div>';
22 22
 
23 23
 xoops_cp_footer();
Please login to merge, or discard this patch.
admin/admin_header.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 $path = dirname(dirname(dirname(__DIR__)));
21
-require_once $path . '/mainfile.php';
22
-require_once $path . '/include/cp_functions.php';
23
-require_once $path . '/include/cp_header.php';
24
-require_once __DIR__ . '/../class/utility.php';
21
+require_once $path.'/mainfile.php';
22
+require_once $path.'/include/cp_functions.php';
23
+require_once $path.'/include/cp_header.php';
24
+require_once __DIR__.'/../class/utility.php';
25 25
 
26 26
 //require_once __DIR__ . '/../class/utility.php';
27 27
 //require_once __DIR__ . '/../include/common.php';
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 $moduleDirName = basename(dirname(__DIR__));
30 30
 
31 31
 if (false !== ($moduleHelper = Xmf\Module\Helper::getHelper($moduleDirName))) {
32
-} else {
32
+}else {
33 33
     $moduleHelper = Xmf\Module\Helper::getHelper('system');
34 34
 }
35 35
 $adminObject = \Xmf\Module\Admin::getInstance();
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
     $xoopsTpl = new XoopsTpl();
51 51
 }
52 52
 
53
-require XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
53
+require XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
54 54
 //require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/functions.php';
55
-require_once XOOPS_ROOT_PATH . '/Frameworks/art/functions.admin.php';
55
+require_once XOOPS_ROOT_PATH.'/Frameworks/art/functions.admin.php';
56 56
 
57 57
 planet_define_url_delimiter();
Please login to merge, or discard this patch.