]> git.mxchange.org Git - friendica-addons.git/blob - jappixmini/jappix/php/store-tree.php
default features - actually handle the security token in the addon code
[friendica-addons.git] / jappixmini / jappix / php / store-tree.php
1 <?php
2
3 /*
4
5 Jappix - An open social platform
6 This script (re)generates the store sub-folders (after an update)
7
8 -------------------------------------------------
9
10 License: AGPL
11 Author: Vanaryon
12 Last revision: 26/08/11
13
14 */
15
16 // Someone is trying to hack us?
17 if(!defined('JAPPIX_BASE'))
18         exit;
19
20 // Array of the sub-folders to create
21 $store_folders = array(
22         'access',
23         'avatars',
24         'backgrounds',
25         'cache',
26         'conf',
27         'logos',
28         'logs',
29         'music',
30         'send',
31         'share',
32         'updates'
33 );
34
35 // Creates the sub-folders
36 for($i = 0; $i < count($store_folders); $i++) {
37         $current = JAPPIX_BASE.'/store/'.$store_folders[$i];
38         
39         // Create the folder itself
40         if(!is_dir($current))
41                 mkdir($current, 0777, true);
42         
43         chmod($current, 0777);
44         
45         // Create the security file inside the folder
46         $security_html = securityHTML();
47         
48         file_put_contents($current.'/index.html', $security_html);
49 }
50
51 ?>