diff options
author | wei <> | 2006-07-02 04:51:24 +0000 |
---|---|---|
committer | wei <> | 2006-07-02 04:51:24 +0000 |
commit | 4009bc98e96c38d22b3c199f3bfefe4c30783d00 (patch) | |
tree | ec5125c72b4e49407bda6452631bb90692eb08f1 /tests/FunctionalTests/tickets/protected/pages/Home.php | |
parent | b2f51830b7ad319f5d978b411d9bfd87f03308eb (diff) |
Add Ticket tests
Diffstat (limited to 'tests/FunctionalTests/tickets/protected/pages/Home.php')
-rwxr-xr-x | tests/FunctionalTests/tickets/protected/pages/Home.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Home.php b/tests/FunctionalTests/tickets/protected/pages/Home.php new file mode 100755 index 00000000..37804419 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Home.php @@ -0,0 +1,34 @@ +<?php + +class Home extends TPage +{ + public function onLoad($param) + { + parent::onLoad($param); + $list=$this->getPageList(dirname(__FILE__),''); + $this->List->DataSource=$list; + $this->List->dataBind(); + } + + protected function getPageList($directory,$basePath) + { + $list=array(); + $folder=@opendir($directory); + while($entry=@readdir($folder)) + { + if($entry[0]==='.') + continue; + else if(is_file($directory.'/'.$entry)) + { + if(($page=basename($entry,'.page'))!==$entry && strpos($page,'.')===false) + $list['?page='.$basePath.$page]=$basePath.$page; + } + else + $list=array_merge($list,$this->getPageList($directory.'/'.$entry,$basePath.$entry.'.')); + } + closedir($folder); + return $list; + } +} + +?>
\ No newline at end of file |