@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | - function htmlParser( $_str) { |
|
2 | + function htmlParser($_str) { |
|
3 | 3 | return htmlentities($_str, ENT_QUOTES | ENT_IGNORE, "UTF-8"); |
4 | 4 | } |
5 | 5 | ?> |
@@ -7,37 +7,37 @@ |
||
7 | 7 | public function __construct() { |
8 | 8 | parent::__construct(); |
9 | 9 | $this->pages = []; |
10 | - $this->defaultPage = ["Page404",[]]; |
|
10 | + $this->defaultPage = ["Page404", []]; |
|
11 | 11 | $this->currentPage = null; |
12 | 12 | $this->connection = null; |
13 | 13 | } |
14 | - public function addPage( $_page ) { |
|
14 | + public function addPage($_page) { |
|
15 | 15 | $label = ""; |
16 | 16 | $class = ""; |
17 | 17 | $param = []; |
18 | - if(is_array($_page)) { |
|
18 | + if (is_array($_page)) { |
|
19 | 19 | $label = $_page[0]; |
20 | 20 | $class = $_page[1]; |
21 | - if(isset($_page[2])) |
|
21 | + if (isset($_page[2])) |
|
22 | 22 | $param = $_page[2]; |
23 | 23 | } else { |
24 | 24 | $label = $_page; |
25 | 25 | $class = $_page; |
26 | 26 | } |
27 | - $this->pages[$label] = [$class,$param]; |
|
27 | + $this->pages[$label] = [$class, $param]; |
|
28 | 28 | } |
29 | - public function addPages( $_pages ) { |
|
29 | + public function addPages($_pages) { |
|
30 | 30 | foreach ($_pages as $i) |
31 | 31 | $this->addPage($i); |
32 | 32 | } |
33 | - public function fetchPage( $_label ) { |
|
33 | + public function fetchPage($_label) { |
|
34 | 34 | $temp = $this->defaultPage; |
35 | - if(isset($this->pages[$_label])) |
|
35 | + if (isset($this->pages[$_label])) |
|
36 | 36 | $temp = $this->pages[$_label]; |
37 | 37 | $this->currentPage = new $temp[0]($temp[1]); |
38 | 38 | return $this->currentPage; |
39 | 39 | } |
40 | - public function setDefaultPage( $_page ) { |
|
40 | + public function setDefaultPage($_page) { |
|
41 | 41 | $this->defaultPage = $_page; |
42 | 42 | } |
43 | 43 | public function draw() { |
@@ -18,8 +18,9 @@ discard block |
||
18 | 18 | if(is_array($_page)) { |
19 | 19 | $label = $_page[0]; |
20 | 20 | $class = $_page[1]; |
21 | - if(isset($_page[2])) |
|
22 | - $param = $_page[2]; |
|
21 | + if(isset($_page[2])) { |
|
22 | + $param = $_page[2]; |
|
23 | + } |
|
23 | 24 | } else { |
24 | 25 | $label = $_page; |
25 | 26 | $class = $_page; |
@@ -27,13 +28,15 @@ discard block |
||
27 | 28 | $this->pages[$label] = [$class,$param]; |
28 | 29 | } |
29 | 30 | public function addPages( $_pages ) { |
30 | - foreach ($_pages as $i) |
|
31 | - $this->addPage($i); |
|
31 | + foreach ($_pages as $i) { |
|
32 | + $this->addPage($i); |
|
33 | + } |
|
32 | 34 | } |
33 | 35 | public function fetchPage( $_label ) { |
34 | 36 | $temp = $this->defaultPage; |
35 | - if(isset($this->pages[$_label])) |
|
36 | - $temp = $this->pages[$_label]; |
|
37 | + if(isset($this->pages[$_label])) { |
|
38 | + $temp = $this->pages[$_label]; |
|
39 | + } |
|
37 | 40 | $this->currentPage = new $temp[0]($temp[1]); |
38 | 41 | return $this->currentPage; |
39 | 42 | } |
@@ -11,9 +11,10 @@ discard block |
||
11 | 11 | if($i["fk_menu"] == 0) { |
12 | 12 | array_push($temp, array("label" => $i["label"], "link" => $i["link"], "submenu" => [])); |
13 | 13 | $submenu = c_query("SELECT * FROM menu WHERE fk_menu = ".$i["pk_menu"],"Menu,getMenu,submenu"); |
14 | - if($submenu) |
|
15 | - foreach ($submenu as $j) |
|
14 | + if($submenu) { |
|
15 | + foreach ($submenu as $j) |
|
16 | 16 | array_push( $temp[count($temp)-1]["submenu"], array("label" => $j["label"], "link" => $j["link"], []) ); |
17 | + } |
|
17 | 18 | } |
18 | 19 | } |
19 | 20 | $this->data["menu"] = $temp; |
@@ -26,18 +27,20 @@ discard block |
||
26 | 27 | if( is_array($i["submenu"]) && count($i["submenu"])<1) { |
27 | 28 | $temp .= '<li><a href="'.$i["link"].'">'.$i["label"].'</a></li>'; |
28 | 29 | } else { |
29 | - if($this->isSubString($actual_link,array_merge(array_column($i["submenu"], 'link'), array($i["link"])))) |
|
30 | - $temp .= '<li class="dropdown active">'; |
|
31 | - else |
|
32 | - $temp .= '<li class="dropdown">'; |
|
30 | + if($this->isSubString($actual_link,array_merge(array_column($i["submenu"], 'link'), array($i["link"])))) { |
|
31 | + $temp .= '<li class="dropdown active">'; |
|
32 | + } else { |
|
33 | + $temp .= '<li class="dropdown">'; |
|
34 | + } |
|
33 | 35 | $temp .= |
34 | 36 | '<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">'. |
35 | 37 | $i["label"]. |
36 | 38 | '<span class="caret"></span>'. |
37 | 39 | '</a>'. |
38 | 40 | '<ul class="dropdown-menu">'; |
39 | - foreach ($i["submenu"] as $j) |
|
40 | - $temp .= '<li><a href="'.$j["link"].'">'.$j["label"].'</a></li>'; |
|
41 | + foreach ($i["submenu"] as $j) { |
|
42 | + $temp .= '<li><a href="'.$j["link"].'">'.$j["label"].'</a></li>'; |
|
43 | + } |
|
41 | 44 | $temp .= '</ul></li>'; |
42 | 45 | } |
43 | 46 | } |
@@ -45,17 +48,19 @@ discard block |
||
45 | 48 | } |
46 | 49 | protected function isSubString( $_string, $_list) { |
47 | 50 | $success = false; |
48 | - foreach ($_list as $i) |
|
49 | - if(strpos($_string,$i) !== false) |
|
51 | + foreach ($_list as $i) { |
|
52 | + if(strpos($_string,$i) !== false) |
|
50 | 53 | $success = true; |
54 | + } |
|
51 | 55 | return $success; |
52 | 56 | } |
53 | 57 | public function loginWithUser() { |
54 | 58 | $this->init(); |
55 | 59 | $temp = []; |
56 | 60 | $user = ""; |
57 | - if(!isset($_SESSION["username"])) |
|
58 | - $_SESSION["username"] ="guest"; |
|
61 | + if(!isset($_SESSION["username"])) { |
|
62 | + $_SESSION["username"] ="guest"; |
|
63 | + } |
|
59 | 64 | $user = $_SESSION["username"]; |
60 | 65 | $blackList = c_query( |
61 | 66 | "SELECT user.*,user_section.* |
@@ -69,11 +74,13 @@ discard block |
||
69 | 74 | foreach ($this->data["menu"] as $i) { |
70 | 75 | $success = true; |
71 | 76 | $k = $i["label"]; |
72 | - foreach ($blackList as $j) |
|
73 | - if( $j["section"] == $k) |
|
77 | + foreach ($blackList as $j) { |
|
78 | + if( $j["section"] == $k) |
|
74 | 79 | $success = false; |
75 | - if($success) |
|
76 | - array_push($temp,$i); |
|
80 | + } |
|
81 | + if($success) { |
|
82 | + array_push($temp,$i); |
|
83 | + } |
|
77 | 84 | } |
78 | 85 | $this->data["menu"] = $temp; |
79 | 86 | } |
@@ -4,17 +4,17 @@ discard block |
||
4 | 4 | parent::__construct(); |
5 | 5 | } |
6 | 6 | public function init() { |
7 | - $menu = c_query("SELECT * FROM menu WHERE flag_active = 1 ORDER BY `order`","Menu,getMenu,menu"); |
|
7 | + $menu = c_query("SELECT * FROM menu WHERE flag_active = 1 ORDER BY `order`", "Menu,getMenu,menu"); |
|
8 | 8 | $temp = []; |
9 | 9 | foreach ($menu as $i) { |
10 | 10 | $submenu = []; |
11 | - if($i["fk_menu"] == 0) { |
|
11 | + if ($i["fk_menu"] == 0) { |
|
12 | 12 | $pk_menu = $i["pk_menu"]; |
13 | 13 | array_push($temp, array("label" => $i["label"], "link" => $i["link"], "submenu" => [])); |
14 | - $submenu = c_query("SELECT * FROM menu WHERE fk_menu = $pk_menu ORDER BY `order`","Menu,getMenu,submenu"); |
|
15 | - if($submenu) |
|
14 | + $submenu = c_query("SELECT * FROM menu WHERE fk_menu = $pk_menu ORDER BY `order`", "Menu,getMenu,submenu"); |
|
15 | + if ($submenu) |
|
16 | 16 | foreach ($submenu as $j) |
17 | - array_push( $temp[count($temp)-1]["submenu"], array("label" => $j["label"], "link" => $j["link"], []) ); |
|
17 | + array_push($temp[count($temp) - 1]["submenu"], array("label" => $j["label"], "link" => $j["link"], [])); |
|
18 | 18 | } |
19 | 19 | } |
20 | 20 | $this->data["menu"] = $temp; |
@@ -24,10 +24,10 @@ discard block |
||
24 | 24 | $temp = ""; |
25 | 25 | $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; |
26 | 26 | foreach ($this->data["menu"] as $i) { |
27 | - if( is_array($i["submenu"]) && count($i["submenu"])<1) { |
|
27 | + if (is_array($i["submenu"]) && count($i["submenu"]) < 1) { |
|
28 | 28 | $temp .= '<li><a href="'.$i["link"].'">'.$i["label"].'</a></li>'; |
29 | 29 | } else { |
30 | - if($this->isSubString($actual_link,array_merge(array_column($i["submenu"], 'link'), array($i["link"])))) |
|
30 | + if ($this->isSubString($actual_link, array_merge(array_column($i["submenu"], 'link'), array($i["link"])))) |
|
31 | 31 | $temp .= '<li class="dropdown active">'; |
32 | 32 | else |
33 | 33 | $temp .= '<li class="dropdown">'; |
@@ -44,10 +44,10 @@ discard block |
||
44 | 44 | } |
45 | 45 | return $temp; |
46 | 46 | } |
47 | - protected function isSubString( $_string, $_list) { |
|
47 | + protected function isSubString($_string, $_list) { |
|
48 | 48 | $success = false; |
49 | 49 | foreach ($_list as $i) |
50 | - if(strpos($_string,$i) !== false) |
|
50 | + if (strpos($_string, $i) !== false) |
|
51 | 51 | $success = true; |
52 | 52 | return $success; |
53 | 53 | } |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | $this->init(); |
56 | 56 | $temp = []; |
57 | 57 | $user = ""; |
58 | - if(!isset($_SESSION["username"])) |
|
59 | - $_SESSION["username"] ="guest"; |
|
58 | + if (!isset($_SESSION["username"])) |
|
59 | + $_SESSION["username"] = "guest"; |
|
60 | 60 | $user = $_SESSION["username"]; |
61 | 61 | $blackList = c_query( |
62 | 62 | "SELECT user.*,user_section.* |
@@ -71,10 +71,10 @@ discard block |
||
71 | 71 | $success = true; |
72 | 72 | $k = $i["label"]; |
73 | 73 | foreach ($blackList as $j) |
74 | - if( $j["section"] == $k) |
|
74 | + if ($j["section"] == $k) |
|
75 | 75 | $success = false; |
76 | - if($success) |
|
77 | - array_push($temp,$i); |
|
76 | + if ($success) |
|
77 | + array_push($temp, $i); |
|
78 | 78 | } |
79 | 79 | $this->data["menu"] = $temp; |
80 | 80 | } |
@@ -5,27 +5,27 @@ |
||
5 | 5 | public $DEBUG; |
6 | 6 | public $pages; |
7 | 7 | public function __construct() { |
8 | - $this->connection["enable"] = false; |
|
9 | - $this->connection["user"] = ""; |
|
8 | + $this->connection["enable"] = false; |
|
9 | + $this->connection["user"] = ""; |
|
10 | 10 | $this->connection["password"] = ""; |
11 | 11 | $this->connection["database"] = ""; |
12 | - $this->connection["server"] = ""; |
|
13 | - $this->all = ""; |
|
12 | + $this->connection["server"] = ""; |
|
13 | + $this->all = ""; |
|
14 | 14 | $this->DEBUG = 0; |
15 | 15 | $this->pages = []; |
16 | 16 | } |
17 | - public function import( $_path ) { |
|
17 | + public function import($_path) { |
|
18 | 18 | $data = file_get_contents($_path); |
19 | 19 | $data = json_decode($data); |
20 | 20 | $this->overlay($data); |
21 | 21 | } |
22 | - private function overlay( $_data ) { |
|
23 | - $this->connection["enable"] = $_data->connection->enable; |
|
24 | - $this->connection["user"] = $_data->connection->user; |
|
22 | + private function overlay($_data) { |
|
23 | + $this->connection["enable"] = $_data->connection->enable; |
|
24 | + $this->connection["user"] = $_data->connection->user; |
|
25 | 25 | $this->connection["password"] = $_data->connection->password; |
26 | 26 | $this->connection["database"] = $_data->connection->database; |
27 | - $this->connection["server"] = $_data->connection->server; |
|
28 | - $this->all = $_data->all; |
|
27 | + $this->connection["server"] = $_data->connection->server; |
|
28 | + $this->all = $_data->all; |
|
29 | 29 | $this->DEBUG = $_data->DEBUG; |
30 | 30 | $this->pages = $_data->pages; |
31 | 31 | } |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <?php |
2 | 2 | class Statistic extends Module { |
3 | - public function __construct( $_webApp ) { |
|
3 | + public function __construct($_webApp) { |
|
4 | 4 | parent::__construct(); |
5 | 5 | $pages = []; |
6 | 6 | $stats = []; |
7 | 7 | $pages = $_webApp->pages; |
8 | - foreach ( $pages as $k => $v ) { |
|
8 | + foreach ($pages as $k => $v) { |
|
9 | 9 | $temp = new $v[0]($v[1]); |
10 | 10 | $temp->addDipendences(); |
11 | 11 | $stats[$k] = []; |
12 | 12 | $stats[$k]["page"] = $v[0]; |
13 | 13 | $stats[$k]["css"] = $temp->data["css"]; |
14 | - $stats[$k]["js"] = $temp->data["js"]; |
|
14 | + $stats[$k]["js"] = $temp->data["js"]; |
|
15 | 15 | } |
16 | 16 | $this->data = $stats; |
17 | 17 | } |
@@ -7,20 +7,20 @@ |
||
7 | 7 | parent::__construct(); |
8 | 8 | $args = func_get_args(); |
9 | 9 | $count = func_num_args(); |
10 | - if (method_exists($this,$func='__construct'.$count)) |
|
11 | - call_user_func_array(array($this,$func),$args); |
|
10 | + if (method_exists($this, $func = '__construct'.$count)) |
|
11 | + call_user_func_array(array($this, $func), $args); |
|
12 | 12 | } |
13 | 13 | public function __construct0() { |
14 | 14 | $this->connection = null; |
15 | 15 | $this->database = null; |
16 | 16 | } |
17 | - public function __construct4( $_srv, $_db, $_usr, $_pass) { |
|
17 | + public function __construct4($_srv, $_db, $_usr, $_pass) { |
|
18 | 18 | $this->connection = "mysql:host=$_srv;dbname=$_db"; |
19 | - $this->database = new PDO( $this->connection, $_usr, $_pass,array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'")); |
|
19 | + $this->database = new PDO($this->connection, $_usr, $_pass, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'")); |
|
20 | 20 | $this->info = []; |
21 | - $this->info["server"] = $_srv; |
|
21 | + $this->info["server"] = $_srv; |
|
22 | 22 | $this->info["database"] = $_db; |
23 | - $this->info["user"] = $_usr; |
|
23 | + $this->info["user"] = $_usr; |
|
24 | 24 | $this->info["password"] = $_pass; |
25 | 25 | } |
26 | 26 | } |
@@ -7,8 +7,9 @@ |
||
7 | 7 | parent::__construct(); |
8 | 8 | $args = func_get_args(); |
9 | 9 | $count = func_num_args(); |
10 | - if (method_exists($this,$func='__construct'.$count)) |
|
11 | - call_user_func_array(array($this,$func),$args); |
|
10 | + if (method_exists($this,$func='__construct'.$count)) { |
|
11 | + call_user_func_array(array($this,$func),$args); |
|
12 | + } |
|
12 | 13 | } |
13 | 14 | public function __construct0() { |
14 | 15 | $this->connection = null; |
@@ -7,23 +7,23 @@ |
||
7 | 7 | $this->data["brandImg"] = ""; |
8 | 8 | $this->data["menu"] = ""; |
9 | 9 | $this->data["title"] = ""; |
10 | - $this->data["subtitle"] = ""; |
|
10 | + $this->data["subtitle"] = ""; |
|
11 | 11 | $this->data["content"] = ""; |
12 | - $this->data["outContent"] = ""; |
|
12 | + $this->data["outContent"] = ""; |
|
13 | 13 | $this->data["footer"] = ""; |
14 | 14 | $this->data["pagePath"] = []; |
15 | - $this->data["css"] = []; |
|
16 | - $this->data["js"] = []; |
|
15 | + $this->data["css"] = []; |
|
16 | + $this->data["js"] = []; |
|
17 | 17 | $this->data["jsVariables"] = []; |
18 | - $this->data["metaDescription"] = []; |
|
19 | - $this->data["metaKeywords"] = []; |
|
18 | + $this->data["metaDescription"] = []; |
|
19 | + $this->data["metaKeywords"] = []; |
|
20 | 20 | $this->data["metaAuthor"] = []; |
21 | 21 | } |
22 | 22 | public function uniforma() { |
23 | 23 | $this->addDipendences(); |
24 | 24 | $this->data["css"] = array_unique($this->data["css"]); |
25 | 25 | $this->data["js"] = array_unique($this->data["js"]); |
26 | - $this->data["pagePath"] = json_encode($this->data["pagePath"]); |
|
26 | + $this->data["pagePath"] = json_encode($this->data["pagePath"]); |
|
27 | 27 | $tempStr = ""; |
28 | 28 | foreach ($this->data["css"] as $i) |
29 | 29 | $tempStr .= '<link rel="stylesheet" href="'.$i.'">'; |
@@ -25,17 +25,20 @@ |
||
25 | 25 | $this->data["js"] = array_unique($this->data["js"]); |
26 | 26 | $this->data["pagePath"] = json_encode($this->data["pagePath"]); |
27 | 27 | $tempStr = ""; |
28 | - foreach ($this->data["css"] as $i) |
|
29 | - $tempStr .= '<link rel="stylesheet" href="'.$i.'">'; |
|
28 | + foreach ($this->data["css"] as $i) { |
|
29 | + $tempStr .= '<link rel="stylesheet" href="'.$i.'">'; |
|
30 | + } |
|
30 | 31 | $this->data["css"] = $tempStr; |
31 | 32 | $tempStr = ""; |
32 | - foreach ($this->data["js"] as $i) |
|
33 | - $tempStr .= '<script src="'.$i.'"></script>'; |
|
33 | + foreach ($this->data["js"] as $i) { |
|
34 | + $tempStr .= '<script src="'.$i.'"></script>'; |
|
35 | + } |
|
34 | 36 | $this->data["js"] = $tempStr; |
35 | 37 | $tempStr = ""; |
36 | 38 | $tempStr .= '<script type="text/javascript">'; |
37 | - foreach ($this->data["jsVariables"] as $i) |
|
38 | - $tempStr .= " ".$i[0]." = ".$i[1].";\n"; |
|
39 | + foreach ($this->data["jsVariables"] as $i) { |
|
40 | + $tempStr .= " ".$i[0]." = ".$i[1].";\n"; |
|
41 | + } |
|
39 | 42 | $tempStr .= '</script>'; |
40 | 43 | $this->data["jsVariables"] = $tempStr; |
41 | 44 | } |
@@ -22,17 +22,17 @@ discard block |
||
22 | 22 | $percent; |
23 | 23 | foreach (getGitLog() as $i) { |
24 | 24 | $cont++; |
25 | - if($cont % $nPerCol == 1) |
|
25 | + if ($cont % $nPerCol == 1) |
|
26 | 26 | echo '<div class="row">'; |
27 | - if(isset($i["tag"])) { |
|
28 | - $percent = explode(".",$i["tag"]); |
|
27 | + if (isset($i["tag"])) { |
|
28 | + $percent = explode(".", $i["tag"]); |
|
29 | 29 | $percent = 100 * intval($percent[0]) + 10 * intval($percent[1]) + intval($percent[2]); |
30 | 30 | } |
31 | 31 | ?> |
32 | 32 | <div class="col-lg-<?=$dim?>"> |
33 | 33 | <div class="well well-sm miniblock"> |
34 | 34 | <div class="autor"><b>Autor:</b> <?=$i["author"]?><br></div> |
35 | - <div class="tag"><b>Tag:</b> <?php if(isset($i["tag"])) echo $i["tag"]?><br></div> |
|
35 | + <div class="tag"><b>Tag:</b> <?php if (isset($i["tag"])) echo $i["tag"]?><br></div> |
|
36 | 36 | <div class="date"><b>Date:</b> <?=$i["date"]?><br></div> |
37 | 37 | <div class="message"><b>Message:</b> <?=$i["message"]?><br></div> |
38 | 38 | <div class="progress"> |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | </div> |
45 | 45 | </div> |
46 | 46 | <?php |
47 | - if($cont % $nPerCol == 0) |
|
47 | + if ($cont % $nPerCol == 0) |
|
48 | 48 | echo '</div>'; |
49 | 49 | } ?> |
50 | 50 | </div> |
@@ -22,8 +22,9 @@ discard block |
||
22 | 22 | $percent; |
23 | 23 | foreach (getGitLog() as $i) { |
24 | 24 | $cont++; |
25 | - if($cont % $nPerCol == 1) |
|
26 | - echo '<div class="row">'; |
|
25 | + if($cont % $nPerCol == 1) { |
|
26 | + echo '<div class="row">'; |
|
27 | + } |
|
27 | 28 | if(isset($i["tag"])) { |
28 | 29 | $percent = explode(".",$i["tag"]); |
29 | 30 | $percent = 100 * intval($percent[0]) + 10 * intval($percent[1]) + intval($percent[2]); |
@@ -32,7 +33,8 @@ discard block |
||
32 | 33 | <div class="col-lg-<?=$dim?>"> |
33 | 34 | <div class="well well-sm miniblock"> |
34 | 35 | <div class="autor"><b>Autor:</b> <?=$i["author"]?><br></div> |
35 | - <div class="tag"><b>Tag:</b> <?php if(isset($i["tag"])) echo $i["tag"]?><br></div> |
|
36 | + <div class="tag"><b>Tag:</b> <?php if(isset($i["tag"])) { |
|
37 | + echo $i["tag"]?><br></div> |
|
36 | 38 | <div class="date"><b>Date:</b> <?=$i["date"]?><br></div> |
37 | 39 | <div class="message"><b>Message:</b> <?=$i["message"]?><br></div> |
38 | 40 | <div class="progress"> |
@@ -46,6 +48,7 @@ discard block |
||
46 | 48 | <?php |
47 | 49 | if($cont % $nPerCol == 0) |
48 | 50 | echo '</div>'; |
51 | +} |
|
49 | 52 | } ?> |
50 | 53 | </div> |
51 | 54 | </div> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - if(isset($GLOBALS["JATEPath"])) |
|
2 | + if (isset($GLOBALS["JATEPath"])) |
|
3 | 3 | $GLOBALS["JATEPath"] = []; |
4 | 4 | $commonLocations = array( |
5 | 5 | "bower_components/JATE/dist/", |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | "../../dist/" |
8 | 8 | ); |
9 | 9 | foreach ($commonLocations as $i) |
10 | - if(file_exists($i."jate/coreEngine.php")) { |
|
10 | + if (file_exists($i."jate/coreEngine.php")) { |
|
11 | 11 | array_push($GLOBALS["JATEPath"], $i); |
12 | 12 | require_once($i."jate/coreEngine.php"); |
13 | 13 | break; |
@@ -1,14 +1,16 @@ |
||
1 | 1 | <?php |
2 | - if(isset($GLOBALS["JATEPath"])) |
|
3 | - $GLOBALS["JATEPath"] = []; |
|
2 | + if(isset($GLOBALS["JATEPath"])) { |
|
3 | + $GLOBALS["JATEPath"] = []; |
|
4 | + } |
|
4 | 5 | $commonLocations = array( |
5 | 6 | "bower_components/JATE/dist/", |
6 | 7 | "vendor/xaberr/jate/dist/", |
7 | 8 | "../../dist/" |
8 | 9 | ); |
9 | - foreach ($commonLocations as $i) |
|
10 | - if(file_exists($i."jate/coreEngine.php")) { |
|
10 | + foreach ($commonLocations as $i) { |
|
11 | + if(file_exists($i."jate/coreEngine.php")) { |
|
11 | 12 | array_push($GLOBALS["JATEPath"], $i); |
13 | + } |
|
12 | 14 | require_once($i."jate/coreEngine.php"); |
13 | 15 | break; |
14 | 16 | } |