@@ -25,7 +25,7 @@ |
||
25 | 25 | // Project: Article Project // |
26 | 26 | // ------------------------------------------------------------------------ // |
27 | 27 | |
28 | -if (!defined("XOOPS_ROOT_PATH")){ exit(); } |
|
28 | +if (!defined("XOOPS_ROOT_PATH")) { exit(); } |
|
29 | 29 | |
30 | 30 | include dirname(__FILE__)."/vars.php"; |
31 | 31 | mod_loadFunctions("", $GLOBALS["moddirname"]); |
@@ -26,35 +26,35 @@ |
||
26 | 26 | |
27 | 27 | class ModuleTransferHandler extends TransferHandler |
28 | 28 | { |
29 | - function ModuleTransferHandler() |
|
30 | - { |
|
31 | - $this->TransferHandler(); |
|
32 | - } |
|
29 | + function ModuleTransferHandler() |
|
30 | + { |
|
31 | + $this->TransferHandler(); |
|
32 | + } |
|
33 | 33 | |
34 | - /** |
|
35 | - * Get valid addon list |
|
36 | - * |
|
37 | - * @param array $skip Addons to skip |
|
38 | - * @param boolean $sort To sort the list upon 'level' |
|
39 | - * return array $list |
|
40 | - */ |
|
41 | - function &getList($skip = array(), $sort = true) |
|
42 | - { |
|
43 | - $list = parent::getList($skip, $sort); |
|
44 | - return $list; |
|
45 | - } |
|
34 | + /** |
|
35 | + * Get valid addon list |
|
36 | + * |
|
37 | + * @param array $skip Addons to skip |
|
38 | + * @param boolean $sort To sort the list upon 'level' |
|
39 | + * return array $list |
|
40 | + */ |
|
41 | + function &getList($skip = array(), $sort = true) |
|
42 | + { |
|
43 | + $list = parent::getList($skip, $sort); |
|
44 | + return $list; |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * If need change config of an item |
|
49 | - * 1 parent::load_item |
|
50 | - * 2 $this->config |
|
51 | - * 3 $this->do_transfer |
|
52 | - */ |
|
53 | - function do_transfer($item, &$data) |
|
54 | - { |
|
55 | - $ret = parent::do_transfer($item, $data); |
|
47 | + /** |
|
48 | + * If need change config of an item |
|
49 | + * 1 parent::load_item |
|
50 | + * 2 $this->config |
|
51 | + * 3 $this->do_transfer |
|
52 | + */ |
|
53 | + function do_transfer($item, &$data) |
|
54 | + { |
|
55 | + $ret = parent::do_transfer($item, $data); |
|
56 | 56 | |
57 | 57 | return $ret; |
58 | - } |
|
58 | + } |
|
59 | 59 | } |
60 | 60 | ?> |
61 | 61 | \ No newline at end of file |
@@ -17,7 +17,7 @@ |
||
17 | 17 | exit(); |
18 | 18 | } |
19 | 19 | |
20 | -if(!@include_once XOOPS_ROOT_PATH."/Frameworks/transfer/transfer.php" ) return null; |
|
20 | +if (!@include_once XOOPS_ROOT_PATH."/Frameworks/transfer/transfer.php") return null; |
|
21 | 21 | |
22 | 22 | // Specify the addons to skip for the module |
23 | 23 | $GLOBALS["addons_skip_module"] = array("pm", "email"); |
@@ -17,7 +17,9 @@ |
||
17 | 17 | exit(); |
18 | 18 | } |
19 | 19 | |
20 | -if(!@include_once XOOPS_ROOT_PATH."/Frameworks/transfer/transfer.php" ) return null; |
|
20 | +if(!@include_once XOOPS_ROOT_PATH."/Frameworks/transfer/transfer.php" ) { |
|
21 | + return null; |
|
22 | +} |
|
21 | 23 | |
22 | 24 | // Specify the addons to skip for the module |
23 | 25 | $GLOBALS["addons_skip_module"] = array("pm", "email"); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | // Project: Article Project // |
26 | 26 | // ------------------------------------------------------------------------ // |
27 | 27 | |
28 | -if(!defined("PLANET_INI")) define("PLANET_INI",1); |
|
28 | +if (!defined("PLANET_INI")) define("PLANET_INI", 1); |
|
29 | 29 | |
30 | 30 | /* |
31 | 31 | * The prefix for database table name prefix |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | |
54 | 54 | // include customized variables |
55 | -if( is_object($GLOBALS["xoopsModule"]) && $GLOBALS["moddirname"] == $GLOBALS["xoopsModule"]->getVar("dirname", "n") ) { |
|
55 | +if (is_object($GLOBALS["xoopsModule"]) && $GLOBALS["moddirname"] == $GLOBALS["xoopsModule"]->getVar("dirname", "n")) { |
|
56 | 56 | $GLOBALS["xoopsModuleConfig"] = planet_load_config(); |
57 | 57 | } |
58 | 58 |
@@ -25,7 +25,9 @@ |
||
25 | 25 | // Project: Article Project // |
26 | 26 | // ------------------------------------------------------------------------ // |
27 | 27 | |
28 | -if(!defined("PLANET_INI")) define("PLANET_INI",1); |
|
28 | +if(!defined("PLANET_INI")) { |
|
29 | + define("PLANET_INI",1); |
|
30 | +} |
|
29 | 31 | |
30 | 32 | /* |
31 | 33 | * The prefix for database table name prefix |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | // ------------------------------------------------------------------------ // |
27 | 27 | if (!defined("XOOPS_ROOT_PATH")) exit(); |
28 | 28 | |
29 | -require_once(XOOPS_ROOT_PATH . "/class/xoopsformloader.php"); |
|
30 | -$category_handler =& xoops_getmodulehandler("category", $GLOBALS["moddirname"]); |
|
29 | +require_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); |
|
30 | +$category_handler = & xoops_getmodulehandler("category", $GLOBALS["moddirname"]); |
|
31 | 31 | |
32 | 32 | $form = new XoopsThemeForm(_EDIT, "formblog", xoops_getenv('PHP_SELF'), "POST", true); |
33 | 33 | |
@@ -42,10 +42,10 @@ discard block |
||
42 | 42 | |
43 | 43 | $categories_option = $category_handler->getList(); |
44 | 44 | natsort($categories_option); |
45 | -if(count($categories_option)) { |
|
45 | +if (count($categories_option)) { |
|
46 | 46 | $cat_option_tray = new XoopsFormElementTray(planet_constant("MD_CATEGORY"), "<br />"); |
47 | 47 | $options = array(0=>_NONE); |
48 | - foreach($categories_option as $id=>$title){ |
|
48 | + foreach ($categories_option as $id=>$title) { |
|
49 | 49 | $options[$id] = $title; |
50 | 50 | } |
51 | 51 | $cat_select = new XoopsFormSelect("", "categories", $categories, 3, true); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | /* For admin only */ |
58 | -if(is_object($xoopsUser) && $xoopsUser->isAdmin()){ |
|
58 | +if (is_object($xoopsUser) && $xoopsUser->isAdmin()) { |
|
59 | 59 | $status_option_tray = new XoopsFormElementTray(planet_constant("MD_STATUS"), "<br />"); |
60 | 60 | $status_select = new XoopsFormSelect("", "blog_status", $blog_obj->getVar("blog_status")); |
61 | 61 | $status_select->addOptionArray(array("0"=>planet_constant("MD_PENDING"), "1"=>planet_constant("MD_ACTIVE"), "2"=>planet_constant("MD_FEATURED"))); |
@@ -24,7 +24,9 @@ |
||
24 | 24 | // URL: http://xoops.org // |
25 | 25 | // Project: Article Project // |
26 | 26 | // ------------------------------------------------------------------------ // |
27 | -if (!defined("XOOPS_ROOT_PATH")) exit(); |
|
27 | +if (!defined("XOOPS_ROOT_PATH")) { |
|
28 | + exit(); |
|
29 | +} |
|
28 | 30 | |
29 | 31 | require_once(XOOPS_ROOT_PATH . "/class/xoopsformloader.php"); |
30 | 32 | $category_handler =& xoops_getmodulehandler("category", $GLOBALS["moddirname"]); |
@@ -25,7 +25,7 @@ |
||
25 | 25 | // Project: Article Project // |
26 | 26 | // ------------------------------------------------------------------------ // |
27 | 27 | |
28 | -if (!defined('XOOPS_ROOT_PATH')){ exit(); } |
|
28 | +if (!defined('XOOPS_ROOT_PATH')) { exit(); } |
|
29 | 29 | |
30 | 30 | include dirname(__FILE__)."/vars.php"; |
31 | 31 | mod_loadFunctions("", $GLOBALS["moddirname"]); |
@@ -25,7 +25,7 @@ |
||
25 | 25 | // Project: Article Project // |
26 | 26 | // ------------------------------------------------------------------------ // |
27 | 27 | |
28 | -if (!defined("XOOPS_ROOT_PATH")){ exit(); } |
|
28 | +if (!defined("XOOPS_ROOT_PATH")) { exit(); } |
|
29 | 29 | |
30 | 30 | include dirname(__FILE__)."/vars.php"; |
31 | 31 | mod_loadFunctions("", $GLOBALS["moddirname"]); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | // along with this program; if not, write to the Free Software // |
25 | 25 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
26 | 26 | // ------------------------------------------------------------------------ // |
27 | -if (!defined('XOOPS_ROOT_PATH')){ exit(); } |
|
27 | +if (!defined('XOOPS_ROOT_PATH')) { exit(); } |
|
28 | 28 | |
29 | 29 | include dirname(__FILE__)."/vars.php"; |
30 | 30 | mod_loadFunctions("", $GLOBALS["moddirname"]); |
@@ -151,13 +151,13 @@ |
||
151 | 151 | $content .= "<br />".planet_constant("MD_SOURCE").": ".$articles_obj[$id]->getVar("art_link")." ".$articles_obj[$id]->getVar("art_author"); |
152 | 152 | $items[] = array( |
153 | 153 | "title" => $articles_obj[$id]->getVar("art_title"), |
154 | - "link" => XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.article.php".URL_DELIMITER."".$articles_obj[$id]->getVar("art_id"), |
|
155 | - "description" => $content, |
|
156 | - "descriptionHtmlSyndicated" => true, |
|
157 | - "date" => $articles_obj[$id]->getTime("rss"), |
|
158 | - "source" => XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/", |
|
159 | - "author" => $articles_obj[$id]->getVar("art_author") |
|
160 | - ); |
|
154 | + "link" => XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.article.php".URL_DELIMITER."".$articles_obj[$id]->getVar("art_id"), |
|
155 | + "description" => $content, |
|
156 | + "descriptionHtmlSyndicated" => true, |
|
157 | + "date" => $articles_obj[$id]->getTime("rss"), |
|
158 | + "source" => XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/", |
|
159 | + "author" => $articles_obj[$id]->getVar("art_author") |
|
160 | + ); |
|
161 | 161 | } |
162 | 162 | unset($articles_obj, $criteria); |
163 | 163 |
@@ -27,58 +27,58 @@ discard block |
||
27 | 27 | ob_start(); |
28 | 28 | include "header.php"; |
29 | 29 | |
30 | -if(planet_parse_args($args_num, $args, $args_str)){ |
|
30 | +if (planet_parse_args($args_num, $args, $args_str)) { |
|
31 | 31 | $args["article"] = @$args_num[0]; |
32 | 32 | $args["type"] = @$args_str[0]; |
33 | 33 | } |
34 | 34 | |
35 | 35 | /* Specified Article */ |
36 | -$article_id = intval( empty($_GET["article"])?@$args["article"]:$_GET["article"] ); |
|
36 | +$article_id = intval(empty($_GET["article"]) ? @$args["article"] : $_GET["article"]); |
|
37 | 37 | /* Specified Category */ |
38 | -$category_id = intval( empty($_GET["category"])?@$args["category"]:$_GET["category"] ); |
|
38 | +$category_id = intval(empty($_GET["category"]) ? @$args["category"] : $_GET["category"]); |
|
39 | 39 | /* Specified Blog */ |
40 | -$blog_id = intval( empty($_GET["blog"])?@$args["blog"]:$_GET["blog"] ); |
|
40 | +$blog_id = intval(empty($_GET["blog"]) ? @$args["blog"] : $_GET["blog"]); |
|
41 | 41 | /* Specified Bookmar(Favorite) UID */ |
42 | -$uid = intval( empty($_GET["uid"])?@$args["uid"]:$_GET["uid"] ); |
|
42 | +$uid = intval(empty($_GET["uid"]) ? @$args["uid"] : $_GET["uid"]); |
|
43 | 43 | |
44 | -$type = empty($_GET["type"])?(empty($_GET["op"])?@$args["type"]:$_GET["op"]):$_GET["type"]; |
|
44 | +$type = empty($_GET["type"]) ? (empty($_GET["op"]) ? @$args["type"] : $_GET["op"]) : $_GET["type"]; |
|
45 | 45 | $type = strtoupper($type); |
46 | 46 | |
47 | 47 | $valid_format = array("RSS0.91", "RSS1.0", "RSS2.0", "PIE0.1", "MBOX", "OPML", "ATOM", "ATOM0.3", "HTML", "JS"); |
48 | -if($type == "RDF") $type = "RSS1.0"; |
|
49 | -if($type == "RSS") $type = "RSS0.91"; |
|
50 | -if(empty($type) || !in_array($type, $valid_format)){ |
|
48 | +if ($type == "RDF") $type = "RSS1.0"; |
|
49 | +if ($type == "RSS") $type = "RSS0.91"; |
|
50 | +if (empty($type) || !in_array($type, $valid_format)) { |
|
51 | 51 | planet_trackback_response(1, planet_constant("MD_INVALID")); |
52 | 52 | exit(); |
53 | 53 | } |
54 | 54 | |
55 | -$category_handler =& xoops_getmodulehandler("category", $GLOBALS["moddirname"]); |
|
56 | -$blog_handler =& xoops_getmodulehandler("blog", $GLOBALS["moddirname"]); |
|
57 | -$article_handler =& xoops_getmodulehandler("article", $GLOBALS["moddirname"]); |
|
58 | -$bookmark_handler =& xoops_getmodulehandler("bookmark", $GLOBALS["moddirname"]); |
|
55 | +$category_handler = & xoops_getmodulehandler("category", $GLOBALS["moddirname"]); |
|
56 | +$blog_handler = & xoops_getmodulehandler("blog", $GLOBALS["moddirname"]); |
|
57 | +$article_handler = & xoops_getmodulehandler("article", $GLOBALS["moddirname"]); |
|
58 | +$bookmark_handler = & xoops_getmodulehandler("bookmark", $GLOBALS["moddirname"]); |
|
59 | 59 | |
60 | -if(!empty($article_id)) { |
|
61 | - $article_obj =& $article_handler->get($article_id); |
|
62 | - if(!$article_obj->getVar("art_id")){ |
|
60 | +if (!empty($article_id)) { |
|
61 | + $article_obj = & $article_handler->get($article_id); |
|
62 | + if (!$article_obj->getVar("art_id")) { |
|
63 | 63 | planet_trackback_response(1, planet_constant("MD_EXPIRED")); |
64 | 64 | exit(); |
65 | 65 | } |
66 | 66 | $source = "article"; |
67 | -}elseif(!empty($blog_id)) { |
|
68 | - $blog_obj =& $blog_handler->get($blog_id); |
|
69 | - if(!$blog_obj->getVar("blog_id")){ |
|
67 | +}elseif (!empty($blog_id)) { |
|
68 | + $blog_obj = & $blog_handler->get($blog_id); |
|
69 | + if (!$blog_obj->getVar("blog_id")) { |
|
70 | 70 | planet_trackback_response(1, planet_constant("MD_INVALID")); |
71 | 71 | exit(); |
72 | 72 | } |
73 | 73 | $source = "blog"; |
74 | -}elseif(!empty($category_id)) { |
|
74 | +}elseif (!empty($category_id)) { |
|
75 | 75 | $source = "category"; |
76 | - $category_obj =& $category_handler->get($category_id); |
|
77 | - if(!$category_obj->getVar("cat_id")){ |
|
76 | + $category_obj = & $category_handler->get($category_id); |
|
77 | + if (!$category_obj->getVar("cat_id")) { |
|
78 | 78 | planet_trackback_response(1, planet_constant("MD_INVALID")); |
79 | 79 | exit(); |
80 | 80 | } |
81 | -}elseif(!empty($uid)) { |
|
81 | +}elseif (!empty($uid)) { |
|
82 | 82 | $source = "bookmark"; |
83 | 83 | } |
84 | 84 | else $source = ""; |
@@ -94,12 +94,12 @@ discard block |
||
94 | 94 | $criteria = new CriteriaCompo(); |
95 | 95 | $criteria->setLimit($xoopsModuleConfig["articles_perpage"]); |
96 | 96 | $articles_obj = array(); |
97 | -switch($source){ |
|
97 | +switch ($source) { |
|
98 | 98 | case "article": |
99 | 99 | $pagetitle = planet_constant("MD_ARTICLE"); |
100 | 100 | $rssdesc = planet_constant("MD_XMLDESC_ARTICLE"); |
101 | 101 | |
102 | - $articles_obj[$article_id] =& $article_obj; |
|
102 | + $articles_obj[$article_id] = & $article_obj; |
|
103 | 103 | |
104 | 104 | $xml_link = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.article.php".URL_DELIMITER."".$article_obj->getVar("art_id"); |
105 | 105 | break; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $rssdesc = sprintf(planet_constant("MD_XMLDESC_CATEGORY"), $category_obj->getVar("cat_title")); |
110 | 110 | |
111 | 111 | $criteria->add(new Criteria("bc.cat_id", $category_id)); |
112 | - $articles_obj =& $article_handler->getByCategory($criteria); |
|
112 | + $articles_obj = & $article_handler->getByCategory($criteria); |
|
113 | 113 | |
114 | 114 | $xml_link = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php".URL_DELIMITER."c".$category_id; |
115 | 115 | break; |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $rssdesc = sprintf(planet_constant("MD_XMLDESC_BLOG"), $blog_obj->getVar("blog_title")); |
120 | 120 | |
121 | 121 | $criteria->add(new Criteria("blog_id", $blog_id)); |
122 | - $articles_obj =& $article_handler->getAll($criteria); |
|
122 | + $articles_obj = & $article_handler->getAll($criteria); |
|
123 | 123 | |
124 | 124 | $xml_link = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php".URL_DELIMITER."b".$blog_id; |
125 | 125 | break; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $rssdesc = sprintf(planet_constant("MD_XMLDESC_BOOKMARK"), $author_name); |
131 | 131 | |
132 | 132 | $criteria->add(new Criteria("bm.bm_uid", $uid)); |
133 | - $articles_obj =& $article_handler->getByBookmark($criteria); |
|
133 | + $articles_obj = & $article_handler->getByBookmark($criteria); |
|
134 | 134 | |
135 | 135 | $xml_link = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php".URL_DELIMITER."u".$uid; |
136 | 136 | |
@@ -140,13 +140,13 @@ discard block |
||
140 | 140 | $pagetitle = planet_constant("MD_INDEX"); |
141 | 141 | $rssdesc = planet_constant("MD_XMLDESC_INDEX"); |
142 | 142 | |
143 | - $articles_obj =& $article_handler->getAll($criteria); |
|
143 | + $articles_obj = & $article_handler->getAll($criteria); |
|
144 | 144 | |
145 | 145 | $xml_link = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php"; |
146 | 146 | break; |
147 | 147 | } |
148 | 148 | $items = array(); |
149 | -foreach(array_keys($articles_obj) as $id){ |
|
149 | +foreach (array_keys($articles_obj) as $id) { |
|
150 | 150 | $content = $articles_obj[$id]->getVar("art_content"); |
151 | 151 | $content .= "<br />".planet_constant("MD_SOURCE").": ".$articles_obj[$id]->getVar("art_link")." ".$articles_obj[$id]->getVar("art_author"); |
152 | 152 | $items[] = array( |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } |
162 | 162 | unset($articles_obj, $criteria); |
163 | 163 | |
164 | -$xml_handler =& xoops_getmodulehandler("xml", $GLOBALS["moddirname"]); |
|
164 | +$xml_handler = & xoops_getmodulehandler("xml", $GLOBALS["moddirname"]); |
|
165 | 165 | $xml = $xml_handler->create($type); |
166 | 166 | $xml->setVar("encoding", $xml_charset); |
167 | 167 | $xml->setVar("title", $xoopsConfig["sitename"]." :: ".$pagetitle, "UTF-8", $xml_charset, true); |
@@ -45,8 +45,12 @@ discard block |
||
45 | 45 | $type = strtoupper($type); |
46 | 46 | |
47 | 47 | $valid_format = array("RSS0.91", "RSS1.0", "RSS2.0", "PIE0.1", "MBOX", "OPML", "ATOM", "ATOM0.3", "HTML", "JS"); |
48 | -if($type == "RDF") $type = "RSS1.0"; |
|
49 | -if($type == "RSS") $type = "RSS0.91"; |
|
48 | +if($type == "RDF") { |
|
49 | + $type = "RSS1.0"; |
|
50 | +} |
|
51 | +if($type == "RSS") { |
|
52 | + $type = "RSS0.91"; |
|
53 | +} |
|
50 | 54 | if(empty($type) || !in_array($type, $valid_format)){ |
51 | 55 | planet_trackback_response(1, planet_constant("MD_INVALID")); |
52 | 56 | exit(); |
@@ -64,24 +68,25 @@ discard block |
||
64 | 68 | exit(); |
65 | 69 | } |
66 | 70 | $source = "article"; |
67 | -}elseif(!empty($blog_id)) { |
|
71 | +} elseif(!empty($blog_id)) { |
|
68 | 72 | $blog_obj =& $blog_handler->get($blog_id); |
69 | 73 | if(!$blog_obj->getVar("blog_id")){ |
70 | 74 | planet_trackback_response(1, planet_constant("MD_INVALID")); |
71 | 75 | exit(); |
72 | 76 | } |
73 | 77 | $source = "blog"; |
74 | -}elseif(!empty($category_id)) { |
|
78 | +} elseif(!empty($category_id)) { |
|
75 | 79 | $source = "category"; |
76 | 80 | $category_obj =& $category_handler->get($category_id); |
77 | 81 | if(!$category_obj->getVar("cat_id")){ |
78 | 82 | planet_trackback_response(1, planet_constant("MD_INVALID")); |
79 | 83 | exit(); |
80 | 84 | } |
81 | -}elseif(!empty($uid)) { |
|
85 | +} elseif(!empty($uid)) { |
|
82 | 86 | $source = "bookmark"; |
87 | +} else { |
|
88 | + $source = ""; |
|
83 | 89 | } |
84 | -else $source = ""; |
|
85 | 90 | |
86 | 91 | $xml_charset = "UTF-8"; |
87 | 92 | include_once XOOPS_ROOT_PATH.'/class/template.php'; |
@@ -25,13 +25,13 @@ |
||
25 | 25 | // Project: Article Project // |
26 | 26 | // ------------------------------------------------------------------------ // |
27 | 27 | |
28 | -if (!defined('XOOPS_ROOT_PATH')){ exit(); } |
|
28 | +if (!defined('XOOPS_ROOT_PATH')) { exit(); } |
|
29 | 29 | |
30 | 30 | $current_path = __FILE__; |
31 | -if ( DIRECTORY_SEPARATOR != "/" ) $current_path = str_replace( strpos( $current_path, "\\\\", 2 ) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $current_path); |
|
32 | -$url_arr = explode("/",strstr($current_path,"/modules/")); |
|
33 | -include XOOPS_ROOT_PATH . "/modules/".$url_arr[2]."/include/vars.php"; |
|
34 | -include_once(XOOPS_ROOT_PATH . "/modules/".$GLOBALS["moddirname"]."/include/functions.php"); |
|
31 | +if (DIRECTORY_SEPARATOR != "/") $current_path = str_replace(strpos($current_path, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $current_path); |
|
32 | +$url_arr = explode("/", strstr($current_path, "/modules/")); |
|
33 | +include XOOPS_ROOT_PATH."/modules/".$url_arr[2]."/include/vars.php"; |
|
34 | +include_once(XOOPS_ROOT_PATH."/modules/".$GLOBALS["moddirname"]."/include/functions.php"); |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Functions handling module blocks |
@@ -28,7 +28,9 @@ |
||
28 | 28 | if (!defined('XOOPS_ROOT_PATH')){ exit(); } |
29 | 29 | |
30 | 30 | $current_path = __FILE__; |
31 | -if ( DIRECTORY_SEPARATOR != "/" ) $current_path = str_replace( strpos( $current_path, "\\\\", 2 ) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $current_path); |
|
31 | +if ( DIRECTORY_SEPARATOR != "/" ) { |
|
32 | + $current_path = str_replace( strpos( $current_path, "\\\\", 2 ) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $current_path); |
|
33 | +} |
|
32 | 34 | $url_arr = explode("/",strstr($current_path,"/modules/")); |
33 | 35 | include XOOPS_ROOT_PATH . "/modules/".$url_arr[2]."/include/vars.php"; |
34 | 36 | include_once(XOOPS_ROOT_PATH . "/modules/".$GLOBALS["moddirname"]."/include/functions.php"); |