Skip to content

Commit 06faf50

Browse files
author
Ryan Rentfro
committed
Updates system core, interfaces, and extensions for latest build
1 parent 99ae4e5 commit 06faf50

File tree

7 files changed

+50
-13
lines changed

7 files changed

+50
-13
lines changed

system/core/application.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
foreach (glob(Config::$filePath . "system/abstract/*.php") as $abstract) require_once $abstract;
2020
foreach (glob(Config::$filePath . "system/interface/*.php") as $interface) require_once $interface;
2121

22+
/*
23+
* Load the now() function into global space if it exists
24+
*/
25+
if (file_exists(Config::$filePath . 'system/ext/now.php')) require_once(Config::$filePath . 'system/ext/now.php');
26+
if (file_exists(Config::$filePath . 'system/ext/getStatus.php')) require_once(Config::$filePath . 'system/ext/getStatus.php');
27+
2228
/*
2329
* Setup Debugging
2430
*/
@@ -49,7 +55,7 @@
4955
/*
5056
* Load Propel Config if it exists
5157
*/
52-
if (file_exists(Config::$filePath . 'system/core/propel.php')) require('propel.php');
58+
if (file_exists(Config::$filePath . 'system/core/propel.php')) require(Config::$filePath . 'system/core/propel.php');
5359

5460
/*
5561
* Run the Application via the Strider Controller

system/core/controller.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,9 @@ public function render($view, Template $template)
6666
if ($controller == null) $controller = $app;
6767
$twigLoader = new \Twig_Loader_Filesystem(Config::$filePath . Config::$appStorage . $app . '/' . Config::$viewStorage);
6868
$twig = new \Twig_Environment($twigLoader, array('debug' => Config::$debugMode));
69-
if (Config::$debugMode)
70-
{
71-
$twig->addExtension(new \Twig_Extension_Debug());
72-
}
73-
69+
if (Config::$debugMode) $twig->addExtension(new \Twig_Extension_Debug());
7470
$globals = Globals::toArray();
7571
$templateData = array_merge($templateData, $globals);
76-
dBug($templateData);
7772
echo $twig->render($view . '.' . Config::$viewFileType, $templateData);
7873
}
7974
}

system/core/globals.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public static function parm()
213213
*/
214214
public static function getParm($key)
215215
{
216-
if (is_numeric($key) && isset(self::$parm[$key])) return self::$parm[$key];
216+
if (is_numeric($key)) return self::$parm[$key];
217217
return null;
218218
}
219219

@@ -256,6 +256,7 @@ public static function setParm($key, $value)
256256

257257
if (is_numeric($key) && $key < 9)
258258
{
259+
dBug('setting value');
259260
self::$parm[$key] = $value;
260261
return true;
261262
}

system/core/package.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ public function __construct()
4040
'public/components/jquery-ui/jquery-ui.min.js'
4141
),
4242
'css' => array(
43-
'public/components/jquery-ui/themes/base/theme.css'
43+
'public/components/jquery-ui/themes/base/theme.css',
44+
'public/components/jquery-ui/themes/flick/jquery-ui.min.css',
45+
4446
)
4547
),
4648
'jquery-file-upload' => array(

system/ext/getStatus.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
function getStatus($statusId)
3+
{
4+
switch($statusId)
5+
{
6+
default:
7+
return 'Unknown';
8+
break;
9+
case 0:
10+
return 'Pending';
11+
break;
12+
case 1:
13+
return 'Active';
14+
break;
15+
case 2:
16+
return 'Inactive';
17+
break;
18+
case 3:
19+
return 'Deleted';
20+
break;
21+
case 4:
22+
return 'Flagged';
23+
break;
24+
case 5:
25+
return 'Approved';
26+
break;
27+
}
28+
}
29+
?>

system/ext/now.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
function now()
3+
{
4+
return date('Y-m-d H:i:s');
5+
}
6+
?>

system/interface/crudmodel.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
*/
1212
interface CRUDModel
1313
{
14-
public function create();
15-
public function read();
16-
public function update();
17-
public function delete();
14+
public function read($id);
15+
public function delete($id);
1816
}

0 commit comments

Comments
 (0)