]> git.bts.cx Git - cx.git/blob - cx/lib/user_data.php
Added post title to page title
[cx.git] / cx / lib / user_data.php
1 <?php
2
3 cx_require('lib', 'setup.php');
4
5 function cx_user_data_find_all($type) {
6 $data_directory = join(DIRECTORY_SEPARATOR, array(CX_PUBLIC_USER_DATA_PATH, $type));
7
8 if (file_exists($data_directory)) {
9 foreach (scandir($data_directory) as $path) {
10 yield $path;
11 }
12 }
13 }
14
15 function cx_user_data_path($type, $filename = null) {
16 $path = join(DIRECTORY_SEPARATOR, array(CX_PUBLIC_USER_DATA_PATH, $type));
17 if ($filename != null) $path = join(DIRECTORY_SEPARATOR, array($path, $filename));
18 return $path;
19 }
20
21 // define('CX_USER_DATA_PATH', $data_folder_path);
22 // define('CX_PUBLIC_USER_DATA_PATH', $public_data_folder_path);
23
24 //cx_user_data_register_type($type) {
25 //
26 //}
27
28 //cx_setup_register(2, function() {
29 //});