Skip to content

Commit 04bf130

Browse files
committed
Hot fix 0.0.3
Fix: Now JATE can stay in bower's folder or not.
1 parent 0728889 commit 04bf130

File tree

5 files changed

+13
-29
lines changed

5 files changed

+13
-29
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Just Another Template Engine
44
##HOW TO INSTALL
55
######BOWER
66
```
7-
bower install jate
7+
bower install JATE
88
```
99

1010
##NATIVE
1111
A system in PHP to better handle HTML, CSS and JS.
12-
Recommend the use of Bootstrap.
12+
Recommend the use of Bootstrap.

jate.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<?php
2+
$GLOBALS["JATEPath"] = "";
23
$commonLocations = array(
3-
"bower_components/JATE/jate/coreEngine.php",
4-
"jate/coreEngine.php"
4+
"bower_components/JATE/",
5+
""
56
);
67
foreach ($commonLocations as $i)
7-
if(file_exists($i)) {
8-
require_once($i);
8+
if(file_exists($i."jate/coreEngine.php")) {
9+
$GLOBALS["JATEPath"] = $i;
10+
require_once($i."jate/coreEngine.php");
911
break;
1012
}
11-
1213
?>

jate/.gitattributes

Lines changed: 0 additions & 17 deletions
This file was deleted.

jate/class/Menu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
`flag_active` bit(1) DEFAULT b'1'
99
) ENGINE=MyISAM AUTO_INCREMENT DEFAULT CHARSET=utf8;
1010
***/
11-
require_once("jate/class/Module.php");
11+
require_once($GLOBALS["JATEPath"]."jate/class/Module.php");
1212
class Menu extends Module {
1313
public $name;
1414
public $data;

jate/coreEngine.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ function requireComponents($_path) {
1111
}
1212
//REQUIRE
1313
//jateStuff
14-
requireComponent("jate/config.php");
15-
requireComponent("jate/function/folder.php");
16-
requireComponents("jate/function");
17-
requireComponents("jate/class");
14+
requireComponent ($GLOBALS["JATEPath"]."jate/config.php");
15+
requireComponent ($GLOBALS["JATEPath"]."jate/function/folder.php");
16+
requireComponents($GLOBALS["JATEPath"]."jate/function");
17+
requireComponents($GLOBALS["JATEPath"]."jate/class");
1818
//common
1919
requireComponent("config.php");
2020
requireComponent("function/folder.php");

0 commit comments

Comments
 (0)