added support for Firebug SQL logging
[qcms.git] / config / bootstrap.php
blob4f2c87d8a20300fc9f5692c88f62688aebec26fa
1 <?php
3 Configure::load('setup');
4 Configure::load('settings');
5 Configure::load('site');
7 function url(){
9 $argc = func_num_args();
10 $argv = func_get_args();
12 if ($argc == 1 && is_array($argv[0])) {
13 $argv = $argv[0];
14 $argc = count($argv);
17 switch ($argc) {
18 case 1:
19 if (strpos($argv[0], '/')!== false) {
20 return url(explode('/', ltrim($argv[0], '/')));
22 return array('action' => $argv[0]);
23 case 2:
24 return array('controller' => $argv[0], 'action' => $argv[1]);
25 case 3:
26 return array('controller' => $argv[0], 'action' => $argv[1], $argv[2]);
27 default:
28 $controller = array_shift($argv);
29 $action = array_shift($argv);
30 return array('controller' => $controller, 'action' => $action, $argv);