Completed
Push — master ( 369c90...324e29 )
by Michael
04:57
created
admin/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
  * @author       XOOPS Development Team
17 17
  */
18 18
 
19
-require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
20
-include_once __DIR__ . '/admin_header.php';
19
+require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php';
20
+include_once __DIR__.'/admin_header.php';
21 21
 
22 22
 xoops_cp_header();
23 23
 
@@ -26,4 +26,4 @@  discard block
 block discarded – undo
26 26
 echo $indexAdmin->addNavigation(basename(__FILE__));
27 27
 echo $indexAdmin->renderIndex();
28 28
 
29
-include_once __DIR__ . '/admin_footer.php';
29
+include_once __DIR__.'/admin_footer.php';
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
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * @author       XOOPS Development Team
17 17
  */
18 18
 
19
-include_once __DIR__ . '/admin_header.php';
19
+include_once __DIR__.'/admin_header.php';
20 20
 
21 21
 xoops_cp_header();
22 22
 
@@ -25,4 +25,4 @@  discard block
 block discarded – undo
25 25
 echo $aboutAdmin->addNavigation(basename(__FILE__));
26 26
 echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
27 27
 
28
-include_once __DIR__ . '/admin_footer.php';
28
+include_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/functions.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
  */
21 21
 
22 22
 if (!defined('XOOPS_ROOT_PATH')) {
23
-    die('XOOPS root path not defined');
23
+	die('XOOPS root path not defined');
24 24
 }
25 25
 
26 26
 
Please login to merge, or discard this patch.
reference.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,24 +31,24 @@  discard block
 block discarded – undo
31 31
 $baseurl   = REFERENCES_URL . basename(__FILE__);
32 32
 $artice_id = isset($_GET['article_id']) ? (int)$_GET['article_id'] : 0;
33 33
 if ($artice_id == 0) {
34
-    references_utils::redirect(_MD_REFERENCES_ERROR4, 'index.php', 4);
34
+	references_utils::redirect(_MD_REFERENCES_ERROR4, 'index.php', 4);
35 35
 }
36 36
 $article = null;
37 37
 $article = $h_references_articles->get($artice_id);
38 38
 if (!is_object($article)) {
39
-    references_utils::redirect(_MD_REFERENCES_ERROR4, 'index.php', 4);
39
+	references_utils::redirect(_MD_REFERENCES_ERROR4, 'index.php', 4);
40 40
 }
41 41
 // Vérification des permissions
42 42
 $handlers = references_handler::getInstance();
43 43
 if (!$handlers->h_references_articles->userCanSeeReference($article)) {
44
-    references_utils::redirect(_NOPERM, 'index.php', 4);
44
+	references_utils::redirect(_NOPERM, 'index.php', 4);
45 45
 }
46 46
 
47 47
 // Chargement de la catégorie
48 48
 $category = null;
49 49
 $category = $h_references_categories->get($article->getVar('article_category_id'));
50 50
 if (!is_object($category)) {
51
-    references_utils::redirect(_MD_REFERENCES_ERROR2, 'index.php', 4);
51
+	references_utils::redirect(_MD_REFERENCES_ERROR2, 'index.php', 4);
52 52
 }
53 53
 $xoopsTpl->assign('category', $category->toArray());
54 54
 $xoopsTpl->assign('article', $article->toArray());
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 
58 58
 // Breadcrumb
59 59
 $breadcrumb = array(
60
-    $category->getUrl() => $category->getVar('category_title'),
61
-    $baseurl            => $article->getVar('article_title')
60
+	$category->getUrl() => $category->getVar('category_title'),
61
+	$baseurl            => $article->getVar('article_title')
62 62
 );
63 63
 $xoopsTpl->assign('breadcrumb', references_utils::breadcrumb($breadcrumb));
64 64
 
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 $xoTheme->addScript(REFERENCES_JS_URL . 'js/mootools.js');
69 69
 $xoTheme->addScript(REFERENCES_JS_URL . 'js/mootools-1.2-more.js');
70 70
 if (isset($xoopsConfig) && file_exists(REFERENCES_PATH . 'language/' . $xoopsConfig['language'] . '/slimbox.js')) {
71
-    $xoTheme->addScript(REFERENCES_URL . 'language/' . $xoopsConfig['language'] . '/slimbox.js');
71
+	$xoTheme->addScript(REFERENCES_URL . 'language/' . $xoopsConfig['language'] . '/slimbox.js');
72 72
 } else {
73
-    $xoTheme->addScript(REFERENCES_JS_URL . 'js/slimbox.js');
73
+	$xoTheme->addScript(REFERENCES_JS_URL . 'js/slimbox.js');
74 74
 }
75 75
 
76 76
 $categoriesSelect = $h_references_categories->getCategoriesSelect('categoriesSelect', $category->getVar('category_id'));
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -24,12 +24,12 @@  discard block
 block discarded – undo
24 24
  *
25 25
  * @param integer $article_id Le numéro de la référence
26 26
  */
27
-require __DIR__ . '/header.php';
27
+require __DIR__.'/header.php';
28 28
 $xoopsOption['template_main'] = 'references_reference.tpl';
29
-require XOOPS_ROOT_PATH . '/header.php';
29
+require XOOPS_ROOT_PATH.'/header.php';
30 30
 
31
-$baseurl   = REFERENCES_URL . basename(__FILE__);
32
-$artice_id = isset($_GET['article_id']) ? (int)$_GET['article_id'] : 0;
31
+$baseurl   = REFERENCES_URL.basename(__FILE__);
32
+$artice_id = isset($_GET['article_id']) ? (int) $_GET['article_id'] : 0;
33 33
 if ($artice_id == 0) {
34 34
     references_utils::redirect(_MD_REFERENCES_ERROR4, 'index.php', 4);
35 35
 }
@@ -65,25 +65,25 @@  discard block
 block discarded – undo
65 65
 $xoopsTpl->assign('use_rss', references_utils::getModuleOption('use_rss'));
66 66
 
67 67
 // MooTools
68
-$xoTheme->addScript(REFERENCES_JS_URL . 'js/mootools.js');
69
-$xoTheme->addScript(REFERENCES_JS_URL . 'js/mootools-1.2-more.js');
70
-if (isset($xoopsConfig) && file_exists(REFERENCES_PATH . 'language/' . $xoopsConfig['language'] . '/slimbox.js')) {
71
-    $xoTheme->addScript(REFERENCES_URL . 'language/' . $xoopsConfig['language'] . '/slimbox.js');
68
+$xoTheme->addScript(REFERENCES_JS_URL.'js/mootools.js');
69
+$xoTheme->addScript(REFERENCES_JS_URL.'js/mootools-1.2-more.js');
70
+if (isset($xoopsConfig) && file_exists(REFERENCES_PATH.'language/'.$xoopsConfig['language'].'/slimbox.js')) {
71
+    $xoTheme->addScript(REFERENCES_URL.'language/'.$xoopsConfig['language'].'/slimbox.js');
72 72
 } else {
73
-    $xoTheme->addScript(REFERENCES_JS_URL . 'js/slimbox.js');
73
+    $xoTheme->addScript(REFERENCES_JS_URL.'js/slimbox.js');
74 74
 }
75 75
 
76 76
 $categoriesSelect = $h_references_categories->getCategoriesSelect('categoriesSelect', $category->getVar('category_id'));
77 77
 $xoopsTpl->assign('categoriesSelect', $categoriesSelect);
78
-$xoTheme->addStylesheet(REFERENCES_JS_URL . 'css/slimbox.css');
79
-$xoTheme->addStylesheet(REFERENCES_JS_URL . 'css/accordion.css');
78
+$xoTheme->addStylesheet(REFERENCES_JS_URL.'css/slimbox.css');
79
+$xoTheme->addStylesheet(REFERENCES_JS_URL.'css/accordion.css');
80 80
 $xoopsTpl->assign('isAdmin', references_utils::isAdmin());
81 81
 
82 82
 // ****************************************************************************************************************************
83 83
 $xoopsTpl->assign('thumbsWidth', references_utils::getModuleOption('thumbs_width'));
84 84
 $xoopsTpl->assign('thumbsHeight', references_utils::getModuleOption('thumbs_height'));
85 85
 
86
-$metaTitle    = $article->getVar('article_title', 'n') . ' - ' . $xoopsModule->name();
86
+$metaTitle    = $article->getVar('article_title', 'n').' - '.$xoopsModule->name();
87 87
 $metaKeywords = references_utils::createMetaKeywords($article->getVar('article_text', 'n'));
88 88
 references_utils::setMetas($metaTitle, $metaTitle, $metaKeywords);
89
-require XOOPS_ROOT_PATH . '/footer.php';
89
+require XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
index.php 2 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
 $xoTheme->addScript(REFERENCES_JS_URL . 'js/mootools-1.2-more.js');
42 42
 
43 43
 if (isset($xoopsConfig) && file_exists(REFERENCES_PATH . 'language/' . $xoopsConfig['language'] . '/slimbox.js')) {
44
-    $xoTheme->addScript(REFERENCES_URL . 'language/' . $xoopsConfig['language'] . '/slimbox.js');
44
+	$xoTheme->addScript(REFERENCES_URL . 'language/' . $xoopsConfig['language'] . '/slimbox.js');
45 45
 } else {
46
-    $xoTheme->addScript(REFERENCES_JS_URL . 'js/slimbox.js');
46
+	$xoTheme->addScript(REFERENCES_JS_URL . 'js/slimbox.js');
47 47
 }
48 48
 
49 49
 $categories       = $h_references_categories->getCategories();
@@ -63,42 +63,42 @@  discard block
 block discarded – undo
63 63
 $refFounded              = false;
64 64
 $mostRecentReferenceDate = 0;
65 65
 if ($limit > 0) {
66
-    $uniqueCategories = $h_references_articles->getDistinctCategoriesIds();
67
-    foreach ($uniqueCategories as $categoryId) {
68
-        $items          = array();
69
-        $items          = $h_references_articles->getRecentArticles($start, $limit, references_utils::getModuleOption('sort_field'), references_utils::getModuleOption('sort_order'), true, $categoryId);
70
-        $categoryTitle  = isset($categories[$categoryId]) ? $categories[$categoryId]->getVar('category_title') : '';
71
-        $categoryWeight = isset($categories[$categoryId]) ? $categories[$categoryId]->getVar('category_weight') : 0;
72
-        if (count($items) > 0) {
73
-            foreach ($items as $item) {
74
-                $articleData = array();
75
-                $articleData = $item->toArray();
76
-                if ($item->getVar('article_id') == $article_id) {
77
-                    $xoopsTpl->assign('defaultArticle', $index);
78
-                    $refFounded = true;
79
-                }
80
-                ++$index;
81
-                $articleData['article_category_id']                                          = $categoryId;
82
-                $articleData['article_category_title']                                       = $categoryTitle;
83
-                $articleData['article_category_weight']                                      = $categoryWeight;
84
-                $categoriesForTemplate[$categoryWeight . '-' . $categoryId]['articles'][]    = $articleData;
85
-                $categoriesForTemplate[$categoryWeight . '-' . $categoryId]['categoryTitle'] = $categoryTitle;
86
-                $categoriesForTemplate[$categoryWeight . '-' . $categoryId]['categoryId']    = $categoryId;
87
-                if ($item->getVar('article_timestamp') > $mostRecentReferenceDate) {
88
-                    $mostRecentReferenceDate = $item->getVar('article_timestamp');
89
-                    $lastTitle               = strip_tags($item->getVar('article_title', 'n')) . ', ' . $item->getVar('article_date');
90
-                    $lastKeywords            = strip_tags($item->getVar('article_text', 'n'));
91
-                }
92
-            }
93
-        }
94
-    }
95
-    if (!$refFounded) {
96
-        $xoopsTpl->assign('defaultArticle', 0);
97
-    }
98
-    if (count($categoriesForTemplate) > 0) {
99
-        ksort($categoriesForTemplate);
100
-    }
101
-    $xoopsTpl->assign('categories', $categoriesForTemplate);
66
+	$uniqueCategories = $h_references_articles->getDistinctCategoriesIds();
67
+	foreach ($uniqueCategories as $categoryId) {
68
+		$items          = array();
69
+		$items          = $h_references_articles->getRecentArticles($start, $limit, references_utils::getModuleOption('sort_field'), references_utils::getModuleOption('sort_order'), true, $categoryId);
70
+		$categoryTitle  = isset($categories[$categoryId]) ? $categories[$categoryId]->getVar('category_title') : '';
71
+		$categoryWeight = isset($categories[$categoryId]) ? $categories[$categoryId]->getVar('category_weight') : 0;
72
+		if (count($items) > 0) {
73
+			foreach ($items as $item) {
74
+				$articleData = array();
75
+				$articleData = $item->toArray();
76
+				if ($item->getVar('article_id') == $article_id) {
77
+					$xoopsTpl->assign('defaultArticle', $index);
78
+					$refFounded = true;
79
+				}
80
+				++$index;
81
+				$articleData['article_category_id']                                          = $categoryId;
82
+				$articleData['article_category_title']                                       = $categoryTitle;
83
+				$articleData['article_category_weight']                                      = $categoryWeight;
84
+				$categoriesForTemplate[$categoryWeight . '-' . $categoryId]['articles'][]    = $articleData;
85
+				$categoriesForTemplate[$categoryWeight . '-' . $categoryId]['categoryTitle'] = $categoryTitle;
86
+				$categoriesForTemplate[$categoryWeight . '-' . $categoryId]['categoryId']    = $categoryId;
87
+				if ($item->getVar('article_timestamp') > $mostRecentReferenceDate) {
88
+					$mostRecentReferenceDate = $item->getVar('article_timestamp');
89
+					$lastTitle               = strip_tags($item->getVar('article_title', 'n')) . ', ' . $item->getVar('article_date');
90
+					$lastKeywords            = strip_tags($item->getVar('article_text', 'n'));
91
+				}
92
+			}
93
+		}
94
+	}
95
+	if (!$refFounded) {
96
+		$xoopsTpl->assign('defaultArticle', 0);
97
+	}
98
+	if (count($categoriesForTemplate) > 0) {
99
+		ksort($categoriesForTemplate);
100
+	}
101
+	$xoopsTpl->assign('categories', $categoriesForTemplate);
102 102
 }
103 103
 
104 104
 $xoopsTpl->assign('isAdmin', references_utils::isAdmin());
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@  discard block
 block discarded – undo
22 22
 /*
23 23
  * Page d'index du module, liste des articles
24 24
  */
25
-require __DIR__ . '/header.php';
25
+require __DIR__.'/header.php';
26 26
 $xoopsOption['template_main'] = 'references_index.tpl';
27
-require XOOPS_ROOT_PATH . '/header.php';
28
-require_once REFERENCES_PATH . 'class/registryfile.php';
27
+require XOOPS_ROOT_PATH.'/header.php';
28
+require_once REFERENCES_PATH.'class/registryfile.php';
29 29
 
30 30
 $limit      = references_utils::getModuleOption('items_index_page');
31 31
 $start      = $index = 0;
32
-$article_id = isset($_GET['article_id']) ? (int)$_GET['article_id'] : 0;    // Utiliser pour afficher un article particulier
32
+$article_id = isset($_GET['article_id']) ? (int) $_GET['article_id'] : 0; // Utiliser pour afficher un article particulier
33 33
 
34 34
 // Texte à afficher sur la page d'accueil
35 35
 $registry = new references_registryfile();
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
 $xoopsTpl->assign('use_rss', references_utils::getModuleOption('use_rss'));
38 38
 
39 39
 // MooTools
40
-$xoTheme->addScript(REFERENCES_JS_URL . 'js/mootools.js');
41
-$xoTheme->addScript(REFERENCES_JS_URL . 'js/mootools-1.2-more.js');
40
+$xoTheme->addScript(REFERENCES_JS_URL.'js/mootools.js');
41
+$xoTheme->addScript(REFERENCES_JS_URL.'js/mootools-1.2-more.js');
42 42
 
43
-if (isset($xoopsConfig) && file_exists(REFERENCES_PATH . 'language/' . $xoopsConfig['language'] . '/slimbox.js')) {
44
-    $xoTheme->addScript(REFERENCES_URL . 'language/' . $xoopsConfig['language'] . '/slimbox.js');
43
+if (isset($xoopsConfig) && file_exists(REFERENCES_PATH.'language/'.$xoopsConfig['language'].'/slimbox.js')) {
44
+    $xoTheme->addScript(REFERENCES_URL.'language/'.$xoopsConfig['language'].'/slimbox.js');
45 45
 } else {
46
-    $xoTheme->addScript(REFERENCES_JS_URL . 'js/slimbox.js');
46
+    $xoTheme->addScript(REFERENCES_JS_URL.'js/slimbox.js');
47 47
 }
48 48
 
49 49
 $categories       = $h_references_categories->getCategories();
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 $categoriesForTemplate = array();
53 53
 
54 54
 //$xoTheme->addScript(REFERENCES_JS_URL.'js/accordion.js');
55
-$xoTheme->addStylesheet(REFERENCES_JS_URL . 'css/slimbox.css');
56
-$xoTheme->addStylesheet(REFERENCES_JS_URL . 'css/accordion.css');
55
+$xoTheme->addStylesheet(REFERENCES_JS_URL.'css/slimbox.css');
56
+$xoTheme->addStylesheet(REFERENCES_JS_URL.'css/accordion.css');
57 57
 
58 58
 // ****************************************************************************************************************************
59 59
 $xoopsTpl->assign('thumbsWidth', references_utils::getModuleOption('thumbs_width'));
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
                 $articleData['article_category_id']                                          = $categoryId;
82 82
                 $articleData['article_category_title']                                       = $categoryTitle;
83 83
                 $articleData['article_category_weight']                                      = $categoryWeight;
84
-                $categoriesForTemplate[$categoryWeight . '-' . $categoryId]['articles'][]    = $articleData;
85
-                $categoriesForTemplate[$categoryWeight . '-' . $categoryId]['categoryTitle'] = $categoryTitle;
86
-                $categoriesForTemplate[$categoryWeight . '-' . $categoryId]['categoryId']    = $categoryId;
84
+                $categoriesForTemplate[$categoryWeight.'-'.$categoryId]['articles'][]    = $articleData;
85
+                $categoriesForTemplate[$categoryWeight.'-'.$categoryId]['categoryTitle'] = $categoryTitle;
86
+                $categoriesForTemplate[$categoryWeight.'-'.$categoryId]['categoryId']    = $categoryId;
87 87
                 if ($item->getVar('article_timestamp') > $mostRecentReferenceDate) {
88 88
                     $mostRecentReferenceDate = $item->getVar('article_timestamp');
89
-                    $lastTitle               = strip_tags($item->getVar('article_title', 'n')) . ', ' . $item->getVar('article_date');
89
+                    $lastTitle               = strip_tags($item->getVar('article_title', 'n')).', '.$item->getVar('article_date');
90 90
                     $lastKeywords            = strip_tags($item->getVar('article_text', 'n'));
91 91
                 }
92 92
             }
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
 }
103 103
 
104 104
 $xoopsTpl->assign('isAdmin', references_utils::isAdmin());
105
-$metaTitle    = $lastTitle . ' - ' . $xoopsModule->name();
106
-$metaKeywords = references_utils::createMetaKeywords($lastTitle . ' ' . $lastKeywords);
105
+$metaTitle    = $lastTitle.' - '.$xoopsModule->name();
106
+$metaKeywords = references_utils::createMetaKeywords($lastTitle.' '.$lastKeywords);
107 107
 
108 108
 references_utils::setMetas($metaTitle, $metaTitle, $metaKeywords);
109
-require XOOPS_ROOT_PATH . '/footer.php';
109
+require XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
notification_update.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,5 +18,5 @@
 block discarded – undo
18 18
  *
19 19
  * ****************************************************************************
20 20
  */
21
-require __DIR__ . '/../../mainfile.php';
22
-require XOOPS_ROOT_PATH . '/include/notification_update.php';
21
+require __DIR__.'/../../mainfile.php';
22
+require XOOPS_ROOT_PATH.'/include/notification_update.php';
Please login to merge, or discard this patch.
blocks/references_last_news.php 2 patches
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -26,26 +26,26 @@  discard block
 block discarded – undo
26 26
  */
27 27
 function b_references_last_news_show($options)
28 28
 {
29
-    global $xoopsConfig;
30
-    require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
31
-    $block = array();
32
-    $start = 0;
33
-    $limit = (int)$options[0];
34
-    if ($limit > 0) {
35
-        $items      = array();
36
-        $categories = array();
37
-        if (is_array($options) && count($options) > 1) {
38
-            $categories = array_slice($options, 1);
39
-        }
40
-        $items = $h_references_articles->getRecentArticles($start, $limit, 'article_timestamp', 'DESC', true, $categories);
41
-        if (count($items) > 0) {
42
-            foreach ($items as $item) {
43
-                $block['block_last_news'][] = $item->toArray();
44
-            }
45
-        }
46
-    }
29
+	global $xoopsConfig;
30
+	require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
31
+	$block = array();
32
+	$start = 0;
33
+	$limit = (int)$options[0];
34
+	if ($limit > 0) {
35
+		$items      = array();
36
+		$categories = array();
37
+		if (is_array($options) && count($options) > 1) {
38
+			$categories = array_slice($options, 1);
39
+		}
40
+		$items = $h_references_articles->getRecentArticles($start, $limit, 'article_timestamp', 'DESC', true, $categories);
41
+		if (count($items) > 0) {
42
+			foreach ($items as $item) {
43
+				$block['block_last_news'][] = $item->toArray();
44
+			}
45
+		}
46
+	}
47 47
 
48
-    return $block;
48
+	return $block;
49 49
 }
50 50
 
51 51
 /**
@@ -56,26 +56,26 @@  discard block
 block discarded – undo
56 56
  */
57 57
 function b_references_last_news_edit($options)
58 58
 {
59
-    global $xoopsConfig;
60
-    include XOOPS_ROOT_PATH . '/modules/references/include/common.php';
61
-    $handlers   = references_handler::getInstance();
62
-    $categories = $handlers->h_references_categories->getListArray();
63
-    $form       = '';
64
-    $form .= "<table border='0'>";
65
-    $form .= '<tr><td>' . _MB_REFERENCES_ITEMS_COUNT . "</td><td><input type='text' name='options[]' id='options' value='" . $options[0] . "' /></td></tr>\n";
66
-    $form .= '<tr><td>' . _MB_REFERENCES_CATEGORIES . "</td><td><select name='options[]' multiple='multiple'>";
67
-    $size = count($options);
68
-    foreach ($categories as $Idcategory => $categoryName) {
69
-        $sel = '';
70
-        for ($i = 1; $i < $size; ++$i) {
71
-            if ($options[$i] == $Idcategory) {
72
-                $sel = " selected='selected'";
73
-            }
74
-        }
75
-        $form .= "<option value='$Idcategory' $sel>$categoryName</option>";
76
-    }
77
-    $form .= "</select></td></tr>\n";
78
-    $form .= '</table>';
59
+	global $xoopsConfig;
60
+	include XOOPS_ROOT_PATH . '/modules/references/include/common.php';
61
+	$handlers   = references_handler::getInstance();
62
+	$categories = $handlers->h_references_categories->getListArray();
63
+	$form       = '';
64
+	$form .= "<table border='0'>";
65
+	$form .= '<tr><td>' . _MB_REFERENCES_ITEMS_COUNT . "</td><td><input type='text' name='options[]' id='options' value='" . $options[0] . "' /></td></tr>\n";
66
+	$form .= '<tr><td>' . _MB_REFERENCES_CATEGORIES . "</td><td><select name='options[]' multiple='multiple'>";
67
+	$size = count($options);
68
+	foreach ($categories as $Idcategory => $categoryName) {
69
+		$sel = '';
70
+		for ($i = 1; $i < $size; ++$i) {
71
+			if ($options[$i] == $Idcategory) {
72
+				$sel = " selected='selected'";
73
+			}
74
+		}
75
+		$form .= "<option value='$Idcategory' $sel>$categoryName</option>";
76
+	}
77
+	$form .= "</select></td></tr>\n";
78
+	$form .= '</table>';
79 79
 
80
-    return $form;
80
+	return $form;
81 81
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 function b_references_last_news_show($options)
28 28
 {
29 29
     global $xoopsConfig;
30
-    require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
30
+    require XOOPS_ROOT_PATH.'/modules/references/include/common.php';
31 31
     $block = array();
32 32
     $start = 0;
33
-    $limit = (int)$options[0];
33
+    $limit = (int) $options[0];
34 34
     if ($limit > 0) {
35 35
         $items      = array();
36 36
         $categories = array();
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
 function b_references_last_news_edit($options)
58 58
 {
59 59
     global $xoopsConfig;
60
-    include XOOPS_ROOT_PATH . '/modules/references/include/common.php';
60
+    include XOOPS_ROOT_PATH.'/modules/references/include/common.php';
61 61
     $handlers   = references_handler::getInstance();
62 62
     $categories = $handlers->h_references_categories->getListArray();
63 63
     $form       = '';
64 64
     $form .= "<table border='0'>";
65
-    $form .= '<tr><td>' . _MB_REFERENCES_ITEMS_COUNT . "</td><td><input type='text' name='options[]' id='options' value='" . $options[0] . "' /></td></tr>\n";
66
-    $form .= '<tr><td>' . _MB_REFERENCES_CATEGORIES . "</td><td><select name='options[]' multiple='multiple'>";
65
+    $form .= '<tr><td>'._MB_REFERENCES_ITEMS_COUNT."</td><td><input type='text' name='options[]' id='options' value='".$options[0]."' /></td></tr>\n";
66
+    $form .= '<tr><td>'._MB_REFERENCES_CATEGORIES."</td><td><select name='options[]' multiple='multiple'>";
67 67
     $size = count($options);
68 68
     foreach ($categories as $Idcategory => $categoryName) {
69 69
         $sel = '';
Please login to merge, or discard this patch.
blocks/references_block_tag.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -22,44 +22,44 @@
 block discarded – undo
22 22
  */
23 23
 function references_tag_block_cloud_show($options)
24 24
 {
25
-    require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
26
-    if (!references_utils::tagModuleExists()) {
27
-        return false;
28
-    }
29
-    require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
25
+	require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
26
+	if (!references_utils::tagModuleExists()) {
27
+		return false;
28
+	}
29
+	require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
30 30
 
31
-    return tag_block_cloud_show($options, 'references');
31
+	return tag_block_cloud_show($options, 'references');
32 32
 }
33 33
 
34 34
 function references_tag_block_cloud_edit($options)
35 35
 {
36
-    require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
37
-    if (!references_utils::tagModuleExists()) {
38
-        return false;
39
-    }
40
-    require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
36
+	require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
37
+	if (!references_utils::tagModuleExists()) {
38
+		return false;
39
+	}
40
+	require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
41 41
 
42
-    return tag_block_cloud_edit($options);
42
+	return tag_block_cloud_edit($options);
43 43
 }
44 44
 
45 45
 function references_tag_block_top_show($options)
46 46
 {
47
-    require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
48
-    if (!references_utils::tagModuleExists()) {
49
-        return false;
50
-    }
51
-    require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
47
+	require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
48
+	if (!references_utils::tagModuleExists()) {
49
+		return false;
50
+	}
51
+	require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
52 52
 
53
-    return tag_block_top_show($options, 'references');
53
+	return tag_block_top_show($options, 'references');
54 54
 }
55 55
 
56 56
 function references_tag_block_top_edit($options)
57 57
 {
58
-    require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
59
-    if (!references_utils::tagModuleExists()) {
60
-        return false;
61
-    }
62
-    require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
58
+	require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
59
+	if (!references_utils::tagModuleExists()) {
60
+		return false;
61
+	}
62
+	require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
63 63
 
64
-    return tag_block_top_edit($options);
64
+	return tag_block_top_edit($options);
65 65
 }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,44 +22,44 @@
 block discarded – undo
22 22
  */
23 23
 function references_tag_block_cloud_show($options)
24 24
 {
25
-    require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
25
+    require XOOPS_ROOT_PATH.'/modules/references/include/common.php';
26 26
     if (!references_utils::tagModuleExists()) {
27 27
         return false;
28 28
     }
29
-    require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
29
+    require_once XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php';
30 30
 
31 31
     return tag_block_cloud_show($options, 'references');
32 32
 }
33 33
 
34 34
 function references_tag_block_cloud_edit($options)
35 35
 {
36
-    require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
36
+    require XOOPS_ROOT_PATH.'/modules/references/include/common.php';
37 37
     if (!references_utils::tagModuleExists()) {
38 38
         return false;
39 39
     }
40
-    require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
40
+    require_once XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php';
41 41
 
42 42
     return tag_block_cloud_edit($options);
43 43
 }
44 44
 
45 45
 function references_tag_block_top_show($options)
46 46
 {
47
-    require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
47
+    require XOOPS_ROOT_PATH.'/modules/references/include/common.php';
48 48
     if (!references_utils::tagModuleExists()) {
49 49
         return false;
50 50
     }
51
-    require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
51
+    require_once XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php';
52 52
 
53 53
     return tag_block_top_show($options, 'references');
54 54
 }
55 55
 
56 56
 function references_tag_block_top_edit($options)
57 57
 {
58
-    require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
58
+    require XOOPS_ROOT_PATH.'/modules/references/include/common.php';
59 59
     if (!references_utils::tagModuleExists()) {
60 60
         return false;
61 61
     }
62
-    require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
62
+    require_once XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php';
63 63
 
64 64
     return tag_block_top_edit($options);
65 65
 }
Please login to merge, or discard this patch.
blocks/references_random_news.php 2 patches
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -26,28 +26,28 @@  discard block
 block discarded – undo
26 26
  */
27 27
 function b_references_random_news_show($options)
28 28
 {
29
-    global $xoopsConfig;
30
-    require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
31
-    $block = array();
32
-    $start = 0;
33
-    $limit = (int)$options[0];
34
-    if ($limit > 0) {
35
-        $items = array();
36
-        $h_references_articles->setCachingOptions(array('cacheDir' => REFERENCES_CACHE_PATH, 'caching' => false, 'lifeTime' => null, 'automaticSerialization' => true, 'fileNameProtection' => false));
37
-        $categories = array();
38
-        if (is_array($options) && count($options) > 1) {
39
-            $categories = array_slice($options, 1);
40
-        }
41
-        $items = $h_references_articles->getRecentArticles($start, $limit, 'RAND(), NOW()', 'DESC', true, $categories);
42
-        $h_references_articles->setCachingOptions(array('cacheDir' => REFERENCES_CACHE_PATH, 'caching' => true, 'lifeTime' => null, 'automaticSerialization' => true, 'fileNameProtection' => false));
43
-        if (count($items) > 0) {
44
-            foreach ($items as $item) {
45
-                $block['block_random_news'][] = $item->toArray();
46
-            }
47
-        }
48
-    }
29
+	global $xoopsConfig;
30
+	require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
31
+	$block = array();
32
+	$start = 0;
33
+	$limit = (int)$options[0];
34
+	if ($limit > 0) {
35
+		$items = array();
36
+		$h_references_articles->setCachingOptions(array('cacheDir' => REFERENCES_CACHE_PATH, 'caching' => false, 'lifeTime' => null, 'automaticSerialization' => true, 'fileNameProtection' => false));
37
+		$categories = array();
38
+		if (is_array($options) && count($options) > 1) {
39
+			$categories = array_slice($options, 1);
40
+		}
41
+		$items = $h_references_articles->getRecentArticles($start, $limit, 'RAND(), NOW()', 'DESC', true, $categories);
42
+		$h_references_articles->setCachingOptions(array('cacheDir' => REFERENCES_CACHE_PATH, 'caching' => true, 'lifeTime' => null, 'automaticSerialization' => true, 'fileNameProtection' => false));
43
+		if (count($items) > 0) {
44
+			foreach ($items as $item) {
45
+				$block['block_random_news'][] = $item->toArray();
46
+			}
47
+		}
48
+	}
49 49
 
50
-    return $block;
50
+	return $block;
51 51
 }
52 52
 
53 53
 /**
@@ -58,26 +58,26 @@  discard block
 block discarded – undo
58 58
  */
59 59
 function b_references_random_news_edit($options)
60 60
 {
61
-    global $xoopsConfig;
62
-    include XOOPS_ROOT_PATH . '/modules/references/include/common.php';
63
-    $handlers   = references_handler::getInstance();
64
-    $categories = $handlers->h_references_categories->getListArray();
65
-    $form       = '';
66
-    $form .= "<table border='0'>";
67
-    $form .= '<tr><td>' . _MB_REFERENCES_ITEMS_COUNT . "</td><td><input type='text' name='options[]' id='options' value='" . $options[0] . "' /></td></tr>\n";
68
-    $form .= '<tr><td>' . _MB_REFERENCES_CATEGORIES . "</td><td><select name='options[]' multiple='multiple'>";
69
-    $size = count($options);
70
-    foreach ($categories as $Idcategory => $categoryName) {
71
-        $sel = '';
72
-        for ($i = 1; $i < $size; ++$i) {
73
-            if ($options[$i] == $Idcategory) {
74
-                $sel = " selected='selected'";
75
-            }
76
-        }
77
-        $form .= "<option value='$Idcategory' $sel>$categoryName</option>";
78
-    }
79
-    $form .= "</select></td></tr>\n";
80
-    $form .= '</table>';
61
+	global $xoopsConfig;
62
+	include XOOPS_ROOT_PATH . '/modules/references/include/common.php';
63
+	$handlers   = references_handler::getInstance();
64
+	$categories = $handlers->h_references_categories->getListArray();
65
+	$form       = '';
66
+	$form .= "<table border='0'>";
67
+	$form .= '<tr><td>' . _MB_REFERENCES_ITEMS_COUNT . "</td><td><input type='text' name='options[]' id='options' value='" . $options[0] . "' /></td></tr>\n";
68
+	$form .= '<tr><td>' . _MB_REFERENCES_CATEGORIES . "</td><td><select name='options[]' multiple='multiple'>";
69
+	$size = count($options);
70
+	foreach ($categories as $Idcategory => $categoryName) {
71
+		$sel = '';
72
+		for ($i = 1; $i < $size; ++$i) {
73
+			if ($options[$i] == $Idcategory) {
74
+				$sel = " selected='selected'";
75
+			}
76
+		}
77
+		$form .= "<option value='$Idcategory' $sel>$categoryName</option>";
78
+	}
79
+	$form .= "</select></td></tr>\n";
80
+	$form .= '</table>';
81 81
 
82
-    return $form;
82
+	return $form;
83 83
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 function b_references_random_news_show($options)
28 28
 {
29 29
     global $xoopsConfig;
30
-    require XOOPS_ROOT_PATH . '/modules/references/include/common.php';
30
+    require XOOPS_ROOT_PATH.'/modules/references/include/common.php';
31 31
     $block = array();
32 32
     $start = 0;
33
-    $limit = (int)$options[0];
33
+    $limit = (int) $options[0];
34 34
     if ($limit > 0) {
35 35
         $items = array();
36 36
         $h_references_articles->setCachingOptions(array('cacheDir' => REFERENCES_CACHE_PATH, 'caching' => false, 'lifeTime' => null, 'automaticSerialization' => true, 'fileNameProtection' => false));
@@ -59,13 +59,13 @@  discard block
 block discarded – undo
59 59
 function b_references_random_news_edit($options)
60 60
 {
61 61
     global $xoopsConfig;
62
-    include XOOPS_ROOT_PATH . '/modules/references/include/common.php';
62
+    include XOOPS_ROOT_PATH.'/modules/references/include/common.php';
63 63
     $handlers   = references_handler::getInstance();
64 64
     $categories = $handlers->h_references_categories->getListArray();
65 65
     $form       = '';
66 66
     $form .= "<table border='0'>";
67
-    $form .= '<tr><td>' . _MB_REFERENCES_ITEMS_COUNT . "</td><td><input type='text' name='options[]' id='options' value='" . $options[0] . "' /></td></tr>\n";
68
-    $form .= '<tr><td>' . _MB_REFERENCES_CATEGORIES . "</td><td><select name='options[]' multiple='multiple'>";
67
+    $form .= '<tr><td>'._MB_REFERENCES_ITEMS_COUNT."</td><td><input type='text' name='options[]' id='options' value='".$options[0]."' /></td></tr>\n";
68
+    $form .= '<tr><td>'._MB_REFERENCES_CATEGORIES."</td><td><select name='options[]' multiple='multiple'>";
69 69
     $size = count($options);
70 70
     foreach ($categories as $Idcategory => $categoryName) {
71 71
         $sel = '';
Please login to merge, or discard this patch.