php7 fixes
[Pman.Builder] / Themes.php
1 <?php 
2
3 /**
4  *
5  *  for themes to work, just create a softlink to them in the themes directory
6  */
7
8 require_once 'Pman.php';
9 class Pman_Builder_Themes  extends Pman 
10 {
11     // generic list we do not care who looks at it..
12     function getAuth()
13     {
14         return true;
15     }
16     
17     function get($sub, $opts = array())
18     {
19         $bd = $this->rootDir.'/themes';
20         $dh = opendir($bd);
21         $ret = array();
22         while ($dh && (false !== ($fn = readdir($dh)))) {
23             if ($fn[0] == '.') {
24                 continue;
25             }
26             if (is_link($bd .'/'. $fn) || is_dir($bd.'/'. $fn)) {
27                 $ret[] = array('name' => $fn);
28             }
29             
30             
31         }
32         closedir($dh);
33          
34         $this->jdata($ret);
35               
36         // 
37     }
38     function post($base)
39     {
40         $this->jerr("no access");
41     }
42     
43 }