Skip to content

Commit eb662fd

Browse files
author
Daniel Golub
committed
small refinements
1 parent d18c1b1 commit eb662fd

4 files changed

Lines changed: 15 additions & 8 deletions

File tree

app/base/Language/Language.base.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ public function getString($str = 'all', $language = 'default')
1616
if($language == 'default')
1717
{
1818
REQUIRE_ONCE "Stack/".$this->config['language']['default'].".stack.php";
19-
if($str != 'all')
20-
return ${"_strings_".$this->config['language']['default']}[$str];
21-
else
22-
return ${"_strings_".$this->config['language']['default']};
19+
return ( ($str != 'all') ) ? ${"_strings_".$this->config['language']['default']}[$str] : ${"_strings_".$this->config['language']['default']};
2320
}
2421

2522
else if($language != 'all' && $language != '*') {

app/controllers/welcome.controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function action_index()
6060
else
6161
{
6262
$data['title'] = 'Codengine » Welcome :)';
63-
$data['strings'] = $this->language->getString('hi', 'en');
63+
$data['strings'] = $this->language->getString('hi', 'default');
6464
View::forge('welcome/index', $data);
6565
}
6666
}

app/route.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,18 @@
2828
array_unshift($params, "");
2929
}
3030

31-
// then we need to include the controller based on the url first parameter (welcome)
31+
// if you have a user system you rely on you can deny access to all/specific controllers here.
32+
33+
// // check if user has credentials
34+
// if(isset($_SESSION['username']) && isset($_SESSION['password']))
35+
// $DB->make('select', "Users"); // ... continue according to your database
36+
// else
37+
// $user = false;
38+
39+
40+
// if($user !== true) { ......
41+
42+
// now we need to include the controller based on the url's first parameter (welcome)
3243
if(in_array($params[1].".controller.php", $controllers))
3344
{
3445
REQUIRE_ONCE 'controllers/'.$params[1].".controller.php";

app/views/footer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11

22
</div>
33
<!-- Scripts -->
4-
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
4+
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
55
<script type="text/javascript" src="http://<?php echo URL; ?>/assets/js/bootstrap.min.js"></script>
6-
<script type="text/javascript" src="http://<?php echo URL; ?>/assets/ckeditor/ckeditor.js"></script>
76
<script type="text/javascript" src="http://<?php echo URL; ?>/assets/js/backend.js"></script>
87
</body>
98
</html>

0 commit comments

Comments
 (0)