@@ -2,7 +2,9 @@ discard block |
||
2 | 2 | |
3 | 3 | # Check PHP version |
4 | 4 | |
5 | -if (version_compare(PHP_VERSION, '7.0.0') < 0) exit('PHP version 7 or higher is required.'); |
|
5 | +if (version_compare(PHP_VERSION, '7.0.0') < 0) { |
|
6 | + exit('PHP version 7 or higher is required.'); |
|
7 | +} |
|
6 | 8 | |
7 | 9 | # Set error reporting |
8 | 10 | |
@@ -37,9 +39,11 @@ discard block |
||
37 | 39 | |
38 | 40 | # Require class file |
39 | 41 | |
40 | - if (@file_exists($file_name = ($path . '.php')) && @is_file($file_name)) require_once $file_name; |
|
41 | - |
|
42 | - else if (@file_exists($file_name = ($path . '/' . $last . '.php')) && @is_file($file_name)) require_once $file_name; |
|
42 | + if (@file_exists($file_name = ($path . '.php')) && @is_file($file_name)) { |
|
43 | + require_once $file_name; |
|
44 | + } else if (@file_exists($file_name = ($path . '/' . $last . '.php')) && @is_file($file_name)) { |
|
45 | + require_once $file_name; |
|
46 | + } |
|
43 | 47 | |
44 | 48 | # Check if class exists |
45 | 49 | |
@@ -50,5 +54,7 @@ discard block |
||
50 | 54 | |
51 | 55 | # Call autoload method |
52 | 56 | |
53 | - if (method_exists($class_name, '__autoload')) $class_name::__autoload(); |
|
54 | -}); |
|
57 | + if (method_exists($class_name, '__autoload')) { |
|
58 | + $class_name::__autoload(); |
|
59 | + } |
|
60 | + }); |
@@ -2,78 +2,78 @@ |
||
2 | 2 | |
3 | 3 | # Cadmium |
4 | 4 | |
5 | -define('CADMIUM_NAME', 'Cadmium CMS'); |
|
6 | -define('CADMIUM_HOME', 'http://cadmium-cms.com'); |
|
5 | +define('CADMIUM_NAME', 'Cadmium CMS'); |
|
6 | +define('CADMIUM_HOME', 'http://cadmium-cms.com'); |
|
7 | 7 | |
8 | -define('CADMIUM_VERSION', '0.2.1'); |
|
9 | -define('CADMIUM_COPY', '2016'); |
|
8 | +define('CADMIUM_VERSION', '0.2.1'); |
|
9 | +define('CADMIUM_COPY', '2016'); |
|
10 | 10 | |
11 | 11 | # External |
12 | 12 | |
13 | -define('JQUERY_VERSION', '2.1.4'); |
|
14 | -define('SEMANTIC_UI_VERSION', '2.1.7'); |
|
15 | -define('CKEDITOR_VERSION', '4.5.6'); |
|
13 | +define('JQUERY_VERSION', '2.1.4'); |
|
14 | +define('SEMANTIC_UI_VERSION', '2.1.7'); |
|
15 | +define('CKEDITOR_VERSION', '4.5.6'); |
|
16 | 16 | |
17 | 17 | # Sections |
18 | 18 | |
19 | -define('SECTION_ADMIN', 'Admin'); |
|
20 | -define('SECTION_SITE', 'Site'); |
|
19 | +define('SECTION_ADMIN', 'Admin'); |
|
20 | +define('SECTION_SITE', 'Site'); |
|
21 | 21 | |
22 | 22 | # Entity types |
23 | 23 | |
24 | -define('ENTITY_TYPE_PAGE', 'page'); |
|
25 | -define('ENTITY_TYPE_MENUITEM', 'menuitem'); |
|
26 | -define('ENTITY_TYPE_VARIABLE', 'variable'); |
|
27 | -define('ENTITY_TYPE_WIDGET', 'widget'); |
|
28 | -define('ENTITY_TYPE_USER', 'user'); |
|
29 | -define('ENTITY_TYPE_USER_SECRET', 'user_secret'); |
|
30 | -define('ENTITY_TYPE_USER_SESSION', 'user_session'); |
|
24 | +define('ENTITY_TYPE_PAGE', 'page'); |
|
25 | +define('ENTITY_TYPE_MENUITEM', 'menuitem'); |
|
26 | +define('ENTITY_TYPE_VARIABLE', 'variable'); |
|
27 | +define('ENTITY_TYPE_WIDGET', 'widget'); |
|
28 | +define('ENTITY_TYPE_USER', 'user'); |
|
29 | +define('ENTITY_TYPE_USER_SECRET', 'user_secret'); |
|
30 | +define('ENTITY_TYPE_USER_SESSION', 'user_session'); |
|
31 | 31 | |
32 | 32 | # Filemanager types |
33 | 33 | |
34 | -define('FILEMANAGER_TYPE_DIR', 'dir'); |
|
35 | -define('FILEMANAGER_TYPE_FILE', 'file'); |
|
34 | +define('FILEMANAGER_TYPE_DIR', 'dir'); |
|
35 | +define('FILEMANAGER_TYPE_FILE', 'file'); |
|
36 | 36 | |
37 | 37 | # Access |
38 | 38 | |
39 | -define('ACCESS_PUBLIC', 0); |
|
40 | -define('ACCESS_REGISTERED', 1); |
|
41 | -define('ACCESS_ADMINISTRATOR', 2); |
|
39 | +define('ACCESS_PUBLIC', 0); |
|
40 | +define('ACCESS_REGISTERED', 1); |
|
41 | +define('ACCESS_ADMINISTRATOR', 2); |
|
42 | 42 | |
43 | 43 | # Frequency |
44 | 44 | |
45 | -define('FREQUENCY_ALWAYS', 'always'); |
|
46 | -define('FREQUENCY_HOURLY', 'hourly'); |
|
47 | -define('FREQUENCY_DAILY', 'daily'); |
|
48 | -define('FREQUENCY_WEEKLY', 'weekly'); |
|
49 | -define('FREQUENCY_MONTHLY', 'monthly'); |
|
50 | -define('FREQUENCY_YEARLY', 'yearly'); |
|
51 | -define('FREQUENCY_NEVER', 'never'); |
|
45 | +define('FREQUENCY_ALWAYS', 'always'); |
|
46 | +define('FREQUENCY_HOURLY', 'hourly'); |
|
47 | +define('FREQUENCY_DAILY', 'daily'); |
|
48 | +define('FREQUENCY_WEEKLY', 'weekly'); |
|
49 | +define('FREQUENCY_MONTHLY', 'monthly'); |
|
50 | +define('FREQUENCY_YEARLY', 'yearly'); |
|
51 | +define('FREQUENCY_NEVER', 'never'); |
|
52 | 52 | |
53 | 53 | # Rank |
54 | 54 | |
55 | -define('RANK_GUEST', 0); |
|
56 | -define('RANK_USER', 1); |
|
57 | -define('RANK_ADMINISTRATOR', 2); |
|
55 | +define('RANK_GUEST', 0); |
|
56 | +define('RANK_USER', 1); |
|
57 | +define('RANK_ADMINISTRATOR', 2); |
|
58 | 58 | |
59 | 59 | # Sex |
60 | 60 | |
61 | -define('SEX_NOT_SELECTED', 0); |
|
62 | -define('SEX_MALE', 1); |
|
63 | -define('SEX_FEMALE', 2); |
|
61 | +define('SEX_NOT_SELECTED', 0); |
|
62 | +define('SEX_MALE', 1); |
|
63 | +define('SEX_FEMALE', 2); |
|
64 | 64 | |
65 | 65 | # Status |
66 | 66 | |
67 | -define('STATUS_ONLINE', 0); |
|
68 | -define('STATUS_MAINTENANCE', 1); |
|
69 | -define('STATUS_UPDATE', 2); |
|
67 | +define('STATUS_ONLINE', 0); |
|
68 | +define('STATUS_MAINTENANCE', 1); |
|
69 | +define('STATUS_UPDATE', 2); |
|
70 | 70 | |
71 | 71 | # Target |
72 | 72 | |
73 | -define('TARGET_SELF', 0); |
|
74 | -define('TARGET_BLANK', 1); |
|
73 | +define('TARGET_SELF', 0); |
|
74 | +define('TARGET_BLANK', 1); |
|
75 | 75 | |
76 | 76 | # Visibility |
77 | 77 | |
78 | -define('VISIBILITY_DRAFT', 0); |
|
79 | -define('VISIBILITY_PUBLISHED', 1); |
|
78 | +define('VISIBILITY_DRAFT', 0); |
|
79 | +define('VISIBILITY_PUBLISHED', 1); |