@@ -15,7 +15,7 @@ |
||
| 15 | 15 | $this->addJSByURI($this->volunteerRoot.'/js/volunteer.js', false); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | - function printPage($header=true) |
|
| 18 | + function printPage($header = true) |
|
| 19 | 19 | { |
| 20 | 20 | if($this->user === false || $this->user === null) |
| 21 | 21 | { |
@@ -5,11 +5,11 @@ |
||
| 5 | 5 | $classname = ltrim($classname, '\\'); |
| 6 | 6 | $filename = ''; |
| 7 | 7 | $namespace = ''; |
| 8 | - if ($lastNsPos = strrpos($classname, '\\')) |
|
| 8 | + if($lastNsPos = strrpos($classname, '\\')) |
|
| 9 | 9 | {
|
| 10 | 10 | $namespace = substr($classname, 0, $lastNsPos); |
| 11 | 11 | $classname = substr($classname, $lastNsPos + 1); |
| 12 | - $filename = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
|
|
| 12 | + $filename = str_replace('\\', DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR;
|
|
| 13 | 13 | } |
| 14 | 14 | $filename = __DIR__.DIRECTORY_SEPARATOR.$filename.'class.'.$classname.'.php'; |
| 15 | 15 | if(is_readable($filename)) |
@@ -1,29 +1,29 @@ |
||
| 1 | 1 | <?php |
| 2 | -function VolunteerAutoload($classname) |
|
| 3 | -{
|
|
| 2 | +function VolunteerAutoload($classname) |
|
| 3 | +{ |
|
| 4 | 4 | $classname = str_replace('/', '\\', $classname);
|
| 5 | 5 | $classname = ltrim($classname, '\\'); |
| 6 | 6 | $filename = ''; |
| 7 | 7 | $namespace = ''; |
| 8 | - if ($lastNsPos = strrpos($classname, '\\')) |
|
| 9 | - {
|
|
| 8 | + if ($lastNsPos = strrpos($classname, '\\')) |
|
| 9 | + { |
|
| 10 | 10 | $namespace = substr($classname, 0, $lastNsPos); |
| 11 | 11 | $classname = substr($classname, $lastNsPos + 1); |
| 12 | 12 | $filename = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
|
| 13 | 13 | } |
| 14 | 14 | $filename = __DIR__.DIRECTORY_SEPARATOR.$filename.'class.'.$classname.'.php'; |
| 15 | - if(is_readable($filename)) |
|
| 16 | - {
|
|
| 15 | + if(is_readable($filename)) |
|
| 16 | + { |
|
| 17 | 17 | require $filename; |
| 18 | 18 | } |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | -if(version_compare(PHP_VERSION, '5.3.0', '>=')) |
|
| 22 | -{
|
|
| 21 | +if(version_compare(PHP_VERSION, '5.3.0', '>=')) |
|
| 22 | +{ |
|
| 23 | 23 | spl_autoload_register('VolunteerAutoload', true, true);
|
| 24 | -} |
|
| 25 | -else |
|
| 26 | -{
|
|
| 24 | +} |
|
| 25 | +else |
|
| 26 | +{ |
|
| 27 | 27 | spl_autoload_register('VolunteerAutoload');
|
| 28 | 28 | } |
| 29 | 29 | /* vim: set tabstop=4 shiftwidth=4 expandtab: */ |