Passed
Push — master ( e12440...7742f2 )
by Michael
02:31
created
language/english/common.php 1 patch
Spacing   +124 added lines, -124 removed lines patch added patch discarded remove patch
@@ -25,132 +25,132 @@  discard block
 block discarded – undo
25 25
 $moduleDirName      = basename(dirname(__DIR__, 2));
26 26
 $moduleDirNameUpper = mb_strtoupper($moduleDirName);
27 27
 
28
-define('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS', 'GD library support: ');
29
-define('CO_' . $moduleDirNameUpper . '_GDLIBVERSION', 'GD Library version: ');
30
-define('CO_' . $moduleDirNameUpper . '_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)");
31
-define('CO_' . $moduleDirNameUpper . '_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)");
32
-define('CO_' . $moduleDirNameUpper . '_IMAGEINFO', 'Server status');
33
-define('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): ');
34
-define('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): ');
35
-define('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): ');
36
-define('CO_' . $moduleDirNameUpper . '_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> ");
37
-define('CO_' . $moduleDirNameUpper . '_OFF', "<span style='font-weight: bold;'>OFF</span>");
38
-define('CO_' . $moduleDirNameUpper . '_ON', "<span style='font-weight: bold;'>ON</span>");
39
-define('CO_' . $moduleDirNameUpper . '_SERVERPATH', 'Server path to XOOPS root: ');
40
-define('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS', 'Server uploads status: ');
41
-define('CO_' . $moduleDirNameUpper . '_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>");
42
-define('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.');
43
-
44
-define('CO_' . $moduleDirNameUpper . '_PRINT', "<span style='font-weight: bold;'>Print</span>");
45
-define('CO_' . $moduleDirNameUpper . '_PDF', "<span style='font-weight: bold;'>Create PDF</span>");
46
-
47
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
48
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED1', "Update failed - couldn't add new fields");
49
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
50
-define('CO_' . $moduleDirNameUpper . '_ERROR_COLUMN', 'Could not create column in database : %s');
51
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)');
52
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
53
-define('CO_' . $moduleDirNameUpper . '_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module');
54
-
55
-define('CO_' . $moduleDirNameUpper . '_FOLDERS_DELETED_OK', 'Upload Folders have been deleted');
28
+define('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS', 'GD library support: ');
29
+define('CO_'.$moduleDirNameUpper.'_GDLIBVERSION', 'GD Library version: ');
30
+define('CO_'.$moduleDirNameUpper.'_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)");
31
+define('CO_'.$moduleDirNameUpper.'_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)");
32
+define('CO_'.$moduleDirNameUpper.'_IMAGEINFO', 'Server status');
33
+define('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): ');
34
+define('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): ');
35
+define('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): ');
36
+define('CO_'.$moduleDirNameUpper.'_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> ");
37
+define('CO_'.$moduleDirNameUpper.'_OFF', "<span style='font-weight: bold;'>OFF</span>");
38
+define('CO_'.$moduleDirNameUpper.'_ON', "<span style='font-weight: bold;'>ON</span>");
39
+define('CO_'.$moduleDirNameUpper.'_SERVERPATH', 'Server path to XOOPS root: ');
40
+define('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS', 'Server uploads status: ');
41
+define('CO_'.$moduleDirNameUpper.'_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>");
42
+define('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.');
43
+
44
+define('CO_'.$moduleDirNameUpper.'_PRINT', "<span style='font-weight: bold;'>Print</span>");
45
+define('CO_'.$moduleDirNameUpper.'_PDF', "<span style='font-weight: bold;'>Create PDF</span>");
46
+
47
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
48
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED1', "Update failed - couldn't add new fields");
49
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
50
+define('CO_'.$moduleDirNameUpper.'_ERROR_COLUMN', 'Could not create column in database : %s');
51
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)');
52
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
53
+define('CO_'.$moduleDirNameUpper.'_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module');
54
+
55
+define('CO_'.$moduleDirNameUpper.'_FOLDERS_DELETED_OK', 'Upload Folders have been deleted');
56 56
 
57 57
 // Error Msgs
58
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH', 'Could not delete %s directory');
59
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_REMOVE', 'Could not delete %s');
60
-define('CO_' . $moduleDirNameUpper . '_ERROR_NO_PLUGIN', 'Could not load plugin');
58
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH', 'Could not delete %s directory');
59
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_REMOVE', 'Could not delete %s');
60
+define('CO_'.$moduleDirNameUpper.'_ERROR_NO_PLUGIN', 'Could not load plugin');
61 61
 
62 62
 //Help
63
-define('CO_' . $moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__, 2)));
64
-define('CO_' . $moduleDirNameUpper . '_HELP_HEADER', __DIR__ . '/help/helpheader.tpl');
65
-define('CO_' . $moduleDirNameUpper . '_BACK_2_ADMIN', 'Back to Administration of ');
66
-define('CO_' . $moduleDirNameUpper . '_OVERVIEW', 'Overview');
63
+define('CO_'.$moduleDirNameUpper.'_DIRNAME', basename(dirname(__DIR__, 2)));
64
+define('CO_'.$moduleDirNameUpper.'_HELP_HEADER', __DIR__.'/help/helpheader.tpl');
65
+define('CO_'.$moduleDirNameUpper.'_BACK_2_ADMIN', 'Back to Administration of ');
66
+define('CO_'.$moduleDirNameUpper.'_OVERVIEW', 'Overview');
67 67
 
68 68
 //define('CO_' . $moduleDirNameUpper . '_HELP_DIR', __DIR__);
69 69
 
70 70
 //help multi-page
71
-define('CO_' . $moduleDirNameUpper . '_DISCLAIMER', 'Disclaimer');
72
-define('CO_' . $moduleDirNameUpper . '_LICENSE', 'License');
73
-define('CO_' . $moduleDirNameUpper . '_SUPPORT', 'Support');
71
+define('CO_'.$moduleDirNameUpper.'_DISCLAIMER', 'Disclaimer');
72
+define('CO_'.$moduleDirNameUpper.'_LICENSE', 'License');
73
+define('CO_'.$moduleDirNameUpper.'_SUPPORT', 'Support');
74 74
 
75 75
 //Sample Data
76
-define('CO_' . $moduleDirNameUpper . '_' . 'ADD_SAMPLEDATA', 'Import Sample Data (will delete ALL current data)');
77
-define('CO_' . $moduleDirNameUpper . '_' . 'SAMPLEDATA_SUCCESS', 'Sample Date uploaded successfully');
78
-define('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA', 'Export Tables to YAML');
79
-define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON', 'Show Sample Button?');
80
-define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC', 'If yes, the "Add Sample Data" button will be visible to the Admin. It is Yes as a default for first installation.');
81
-define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA', 'Export DB Schema to YAML');
82
-define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_SUCCESS', 'Export DB Schema to YAML was a success');
83
-define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_ERROR', 'ERROR: Export of DB Schema to YAML failed');
84
-define('CO_' . $moduleDirNameUpper . '_' . 'ADD_SAMPLEDATA_OK', 'Are you sure to Import Sample Data? (It will delete ALL current data)');
85
-define('CO_' . $moduleDirNameUpper . '_' . 'HIDE_SAMPLEDATA_BUTTONS', 'Hide the Import buttons)');
86
-define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLEDATA_BUTTONS', 'Show the Import buttons)');
87
-define('CO_' . $moduleDirNameUpper . '_' . 'CONFIRM', 'Confirm');
76
+define('CO_'.$moduleDirNameUpper.'_'.'ADD_SAMPLEDATA', 'Import Sample Data (will delete ALL current data)');
77
+define('CO_'.$moduleDirNameUpper.'_'.'SAMPLEDATA_SUCCESS', 'Sample Date uploaded successfully');
78
+define('CO_'.$moduleDirNameUpper.'_'.'SAVE_SAMPLEDATA', 'Export Tables to YAML');
79
+define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON', 'Show Sample Button?');
80
+define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON_DESC', 'If yes, the "Add Sample Data" button will be visible to the Admin. It is Yes as a default for first installation.');
81
+define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA', 'Export DB Schema to YAML');
82
+define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA_SUCCESS', 'Export DB Schema to YAML was a success');
83
+define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA_ERROR', 'ERROR: Export of DB Schema to YAML failed');
84
+define('CO_'.$moduleDirNameUpper.'_'.'ADD_SAMPLEDATA_OK', 'Are you sure to Import Sample Data? (It will delete ALL current data)');
85
+define('CO_'.$moduleDirNameUpper.'_'.'HIDE_SAMPLEDATA_BUTTONS', 'Hide the Import buttons)');
86
+define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLEDATA_BUTTONS', 'Show the Import buttons)');
87
+define('CO_'.$moduleDirNameUpper.'_'.'CONFIRM', 'Confirm');
88 88
 
89 89
 //letter choice
90
-define('CO_' . $moduleDirNameUpper . '_' . 'BROWSETOTOPIC', "<span style='font-weight: bold;'>Browse items alphabetically</span>");
91
-define('CO_' . $moduleDirNameUpper . '_' . 'OTHER', 'Other');
92
-define('CO_' . $moduleDirNameUpper . '_' . 'ALL', 'All');
90
+define('CO_'.$moduleDirNameUpper.'_'.'BROWSETOTOPIC', "<span style='font-weight: bold;'>Browse items alphabetically</span>");
91
+define('CO_'.$moduleDirNameUpper.'_'.'OTHER', 'Other');
92
+define('CO_'.$moduleDirNameUpper.'_'.'ALL', 'All');
93 93
 
94 94
 // block defines
95
-define('CO_' . $moduleDirNameUpper . '_' . 'ACCESSRIGHTS', 'Access Rights');
96
-define('CO_' . $moduleDirNameUpper . '_' . 'ACTION', 'Action');
97
-define('CO_' . $moduleDirNameUpper . '_' . 'ACTIVERIGHTS', 'Active Rights');
98
-define('CO_' . $moduleDirNameUpper . '_' . 'BADMIN', 'Block Administration');
99
-define('CO_' . $moduleDirNameUpper . '_' . 'BLKDESC', 'Description');
100
-define('CO_' . $moduleDirNameUpper . '_' . 'CBCENTER', 'Center Middle');
101
-define('CO_' . $moduleDirNameUpper . '_' . 'CBLEFT', 'Center Left');
102
-define('CO_' . $moduleDirNameUpper . '_' . 'CBRIGHT', 'Center Right');
103
-define('CO_' . $moduleDirNameUpper . '_' . 'SBLEFT', 'Left');
104
-define('CO_' . $moduleDirNameUpper . '_' . 'SBRIGHT', 'Right');
105
-define('CO_' . $moduleDirNameUpper . '_' . 'SIDE', 'Alignment');
106
-define('CO_' . $moduleDirNameUpper . '_' . 'TITLE', 'Title');
107
-define('CO_' . $moduleDirNameUpper . '_' . 'VISIBLE', 'Visible');
108
-define('CO_' . $moduleDirNameUpper . '_' . 'VISIBLEIN', 'Visible In');
109
-define('CO_' . $moduleDirNameUpper . '_' . 'WEIGHT', 'Weight');
110
-
111
-define('CO_' . $moduleDirNameUpper . '_' . 'PERMISSIONS', 'Permissions');
112
-define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS', 'Blocks Admin');
113
-define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_DESC', 'Blocks/Group Admin');
114
-
115
-define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_MANAGMENT', 'Manage');
116
-define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_ADDBLOCK', 'Add a new block');
117
-define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_EDITBLOCK', 'Edit a block');
118
-define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_CLONEBLOCK', 'Clone a block');
95
+define('CO_'.$moduleDirNameUpper.'_'.'ACCESSRIGHTS', 'Access Rights');
96
+define('CO_'.$moduleDirNameUpper.'_'.'ACTION', 'Action');
97
+define('CO_'.$moduleDirNameUpper.'_'.'ACTIVERIGHTS', 'Active Rights');
98
+define('CO_'.$moduleDirNameUpper.'_'.'BADMIN', 'Block Administration');
99
+define('CO_'.$moduleDirNameUpper.'_'.'BLKDESC', 'Description');
100
+define('CO_'.$moduleDirNameUpper.'_'.'CBCENTER', 'Center Middle');
101
+define('CO_'.$moduleDirNameUpper.'_'.'CBLEFT', 'Center Left');
102
+define('CO_'.$moduleDirNameUpper.'_'.'CBRIGHT', 'Center Right');
103
+define('CO_'.$moduleDirNameUpper.'_'.'SBLEFT', 'Left');
104
+define('CO_'.$moduleDirNameUpper.'_'.'SBRIGHT', 'Right');
105
+define('CO_'.$moduleDirNameUpper.'_'.'SIDE', 'Alignment');
106
+define('CO_'.$moduleDirNameUpper.'_'.'TITLE', 'Title');
107
+define('CO_'.$moduleDirNameUpper.'_'.'VISIBLE', 'Visible');
108
+define('CO_'.$moduleDirNameUpper.'_'.'VISIBLEIN', 'Visible In');
109
+define('CO_'.$moduleDirNameUpper.'_'.'WEIGHT', 'Weight');
110
+
111
+define('CO_'.$moduleDirNameUpper.'_'.'PERMISSIONS', 'Permissions');
112
+define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS', 'Blocks Admin');
113
+define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_DESC', 'Blocks/Group Admin');
114
+
115
+define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_MANAGMENT', 'Manage');
116
+define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_ADDBLOCK', 'Add a new block');
117
+define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_EDITBLOCK', 'Edit a block');
118
+define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_CLONEBLOCK', 'Clone a block');
119 119
 
120 120
 //myblocksadmin
121
-define('CO_' . $moduleDirNameUpper . '_' . 'AGDS', 'Admin Groups');
122
-define('CO_' . $moduleDirNameUpper . '_' . 'BCACHETIME', 'Cache Time');
123
-define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_ADMIN', 'Blocks Admin');
121
+define('CO_'.$moduleDirNameUpper.'_'.'AGDS', 'Admin Groups');
122
+define('CO_'.$moduleDirNameUpper.'_'.'BCACHETIME', 'Cache Time');
123
+define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_ADMIN', 'Blocks Admin');
124 124
 
125 125
 //Template Admin
126
-define('CO_' . $moduleDirNameUpper . '_' . 'TPLSETS', 'Template Management');
127
-define('CO_' . $moduleDirNameUpper . '_' . 'GENERATE', 'Generate');
128
-define('CO_' . $moduleDirNameUpper . '_' . 'FILENAME', 'File Name');
126
+define('CO_'.$moduleDirNameUpper.'_'.'TPLSETS', 'Template Management');
127
+define('CO_'.$moduleDirNameUpper.'_'.'GENERATE', 'Generate');
128
+define('CO_'.$moduleDirNameUpper.'_'.'FILENAME', 'File Name');
129 129
 
130 130
 //Menu
131
-define('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_MIGRATE', 'Migrate');
132
-define('CO_' . $moduleDirNameUpper . '_' . 'FOLDER_YES', 'Folder "%s" exist');
133
-define('CO_' . $moduleDirNameUpper . '_' . 'FOLDER_NO', 'Folder "%s" does not exist. Create the specified folder with CHMOD 777.');
134
-define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS', 'Show Development Tools Button?');
135
-define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS_DESC', 'If yes, the "Migrate" Tab and other Development tools will be visible to the Admin.');
136
-define('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_FEEDBACK', 'Feedback');
137
-define('CO_' . $moduleDirNameUpper . '_' . 'MIGRATE_OK', 'Database migrated to current schema.');
138
-define('CO_' . $moduleDirNameUpper . '_' . 'MIGRATE_WARNING', 'Warning! This is intended for developers only. Confirm write schema file from current database.');
139
-define('CO_' . $moduleDirNameUpper . '_' . 'MIGRATE_SCHEMA_OK', 'Current schema file written');
131
+define('CO_'.$moduleDirNameUpper.'_'.'ADMENU_MIGRATE', 'Migrate');
132
+define('CO_'.$moduleDirNameUpper.'_'.'FOLDER_YES', 'Folder "%s" exist');
133
+define('CO_'.$moduleDirNameUpper.'_'.'FOLDER_NO', 'Folder "%s" does not exist. Create the specified folder with CHMOD 777.');
134
+define('CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS', 'Show Development Tools Button?');
135
+define('CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS_DESC', 'If yes, the "Migrate" Tab and other Development tools will be visible to the Admin.');
136
+define('CO_'.$moduleDirNameUpper.'_'.'ADMENU_FEEDBACK', 'Feedback');
137
+define('CO_'.$moduleDirNameUpper.'_'.'MIGRATE_OK', 'Database migrated to current schema.');
138
+define('CO_'.$moduleDirNameUpper.'_'.'MIGRATE_WARNING', 'Warning! This is intended for developers only. Confirm write schema file from current database.');
139
+define('CO_'.$moduleDirNameUpper.'_'.'MIGRATE_SCHEMA_OK', 'Current schema file written');
140 140
 
141 141
 //Latest Version Check
142
-define('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION', 'New Version: ');
142
+define('CO_'.$moduleDirNameUpper.'_'.'NEW_VERSION', 'New Version: ');
143 143
 
144 144
 //DirectoryChecker
145
-define('CO_' . $moduleDirNameUpper . '_' . 'AVAILABLE', "<span style='color: green;'>Available</span>");
146
-define('CO_' . $moduleDirNameUpper . '_' . 'NOTAVAILABLE', "<span style='color: red;'>Not available</span>");
147
-define('CO_' . $moduleDirNameUpper . '_' . 'NOTWRITABLE', "<span style='color: red;'>Should have permission ( %d ), but it has ( %d )</span>");
148
-define('CO_' . $moduleDirNameUpper . '_' . 'CREATETHEDIR', 'Create it');
149
-define('CO_' . $moduleDirNameUpper . '_' . 'SETMPERM', 'Set the permission');
150
-define('CO_' . $moduleDirNameUpper . '_' . 'DIRCREATED', 'The directory has been created');
151
-define('CO_' . $moduleDirNameUpper . '_' . 'DIRNOTCREATED', 'The directory cannot be created');
152
-define('CO_' . $moduleDirNameUpper . '_' . 'PERMSET', 'The permission has been set');
153
-define('CO_' . $moduleDirNameUpper . '_' . 'PERMNOTSET', 'The permission cannot be set');
145
+define('CO_'.$moduleDirNameUpper.'_'.'AVAILABLE', "<span style='color: green;'>Available</span>");
146
+define('CO_'.$moduleDirNameUpper.'_'.'NOTAVAILABLE', "<span style='color: red;'>Not available</span>");
147
+define('CO_'.$moduleDirNameUpper.'_'.'NOTWRITABLE', "<span style='color: red;'>Should have permission ( %d ), but it has ( %d )</span>");
148
+define('CO_'.$moduleDirNameUpper.'_'.'CREATETHEDIR', 'Create it');
149
+define('CO_'.$moduleDirNameUpper.'_'.'SETMPERM', 'Set the permission');
150
+define('CO_'.$moduleDirNameUpper.'_'.'DIRCREATED', 'The directory has been created');
151
+define('CO_'.$moduleDirNameUpper.'_'.'DIRNOTCREATED', 'The directory cannot be created');
152
+define('CO_'.$moduleDirNameUpper.'_'.'PERMSET', 'The permission has been set');
153
+define('CO_'.$moduleDirNameUpper.'_'.'PERMNOTSET', 'The permission cannot be set');
154 154
 
155 155
 //FileChecker
156 156
 //define('CO_' . $moduleDirNameUpper . '_' . 'AVAILABLE', "<span style='color: green;'>Available</span>");
@@ -160,36 +160,36 @@  discard block
 block discarded – undo
160 160
 //define('CO_' . $moduleDirNameUpper . '_' . 'CREATETHEFILE', 'Create it');
161 161
 //define('CO_' . $moduleDirNameUpper . '_' . 'SETMPERM', 'Set the permission');
162 162
 
163
-define('CO_' . $moduleDirNameUpper . '_' . 'FILECOPIED', 'The file has been copied');
164
-define('CO_' . $moduleDirNameUpper . '_' . 'FILENOTCOPIED', 'The file cannot be copied');
163
+define('CO_'.$moduleDirNameUpper.'_'.'FILECOPIED', 'The file has been copied');
164
+define('CO_'.$moduleDirNameUpper.'_'.'FILENOTCOPIED', 'The file cannot be copied');
165 165
 
166 166
 //define('CO_' . $moduleDirNameUpper . '_' . 'PERMSET', 'The permission has been set');
167 167
 //define('CO_' . $moduleDirNameUpper . '_' . 'PERMNOTSET', 'The permission cannot be set');
168 168
 
169 169
 //image config
170
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH', 'Image Display Width');
171
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH_DSC', 'Display width for image');
172
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT', 'Image Display Height');
173
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT_DSC', 'Display height for image');
174
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG', '<span style="color: #FF0000; font-size: Small;  font-weight: bold;">--- EXTERNAL Image configuration ---</span> ');
175
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG_DSC', '');
176
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH', 'Image Upload path');
177
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH_DSC', 'Path for uploading images');
178
-
179
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_FILE_SIZE', 'Image File Size (in Bytes)');
180
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_FILE_SIZE_DSC', 'The maximum file size of the image file (in Bytes)');
170
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_WIDTH', 'Image Display Width');
171
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_WIDTH_DSC', 'Display width for image');
172
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_HEIGHT', 'Image Display Height');
173
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_HEIGHT_DSC', 'Display height for image');
174
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_CONFIG', '<span style="color: #FF0000; font-size: Small;  font-weight: bold;">--- EXTERNAL Image configuration ---</span> ');
175
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_CONFIG_DSC', '');
176
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_UPLOAD_PATH', 'Image Upload path');
177
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_UPLOAD_PATH_DSC', 'Path for uploading images');
178
+
179
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_FILE_SIZE', 'Image File Size (in Bytes)');
180
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_FILE_SIZE_DSC', 'The maximum file size of the image file (in Bytes)');
181 181
 
182 182
 //Preferences
183
-define('CO_' . $moduleDirNameUpper . '_' . 'TRUNCATE_LENGTH', 'Number of Characters to truncate to the long text field');
184
-define('CO_' . $moduleDirNameUpper . '_' . 'TRUNCATE_LENGTH_DESC', 'Set the maximum number of characters to truncate the long text fields');
183
+define('CO_'.$moduleDirNameUpper.'_'.'TRUNCATE_LENGTH', 'Number of Characters to truncate to the long text field');
184
+define('CO_'.$moduleDirNameUpper.'_'.'TRUNCATE_LENGTH_DESC', 'Set the maximum number of characters to truncate the long text fields');
185 185
 
186 186
 //Module Stats
187
-define('CO_' . $moduleDirNameUpper . '_' . 'STATS_SUMMARY', 'Module Statistics');
188
-define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_CATEGORIES', 'Categories:');
189
-define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_ITEMS', 'Items');
190
-define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_OFFLINE', 'Offline');
191
-define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_PUBLISHED', 'Published');
192
-define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_REJECTED', 'Rejected');
193
-define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_SUBMITTED', 'Submitted');
187
+define('CO_'.$moduleDirNameUpper.'_'.'STATS_SUMMARY', 'Module Statistics');
188
+define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_CATEGORIES', 'Categories:');
189
+define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_ITEMS', 'Items');
190
+define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_OFFLINE', 'Offline');
191
+define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_PUBLISHED', 'Published');
192
+define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_REJECTED', 'Rejected');
193
+define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_SUBMITTED', 'Submitted');
194 194
 
195 195
 /**#@-*/
Please login to merge, or discard this patch.
language/english/modinfo.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
 define('_MI_CHESS', 'Chess');
18 18
 define('_MI_CHESS_DES', 'Allows users to play chess games against each other.');
19 19
 define(
20
-    '_MI_CHESS_CREDITS',
21
-    '
20
+	'_MI_CHESS_CREDITS',
21
+	'
22 22
 	Jacques Masscrier and Pierre François Gagnon (french language pack).
23 23
 	<br>
24 24
 	CXR Rating System used by permission of <a target="_blank" href="http://chess-express.com/">Chess Express Ratings, Inc.</a>
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
 define('_MI_CHESS_MAX_ITEMS_DES', 'Applies to games, challenges and players.');
70 70
 define('_MI_CHESS_RATING_SYSTEM', 'Player rating system');
71 71
 define(
72
-    '_MI_CHESS_RATING_SYSTEM_DES',
73
-    '
72
+	'_MI_CHESS_RATING_SYSTEM_DES',
73
+	'
74 74
 	Available rating systems:
75 75
 	<br><br>
76 76
 	&nbsp;&nbsp;' . _MI_CHESS_RATING_SYSTEM_CXR . '    - Adaptation of the ELO rating system, used by permission of <a target="_blank" href="http://chess-express.com/">Chess Express Ratings, Inc.</a>
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 );
86 86
 define('_MI_CHESS_INITIAL_RATING', 'Initial player rating');
87 87
 define(
88
-    '_MI_CHESS_INITIAL_RATING_DES',
89
-    '
88
+	'_MI_CHESS_INITIAL_RATING_DES',
89
+	'
90 90
 	If the "' . _MI_CHESS_RATING_SYSTEM_CXR . '" rating system is selected, this value should be between 800 and 2000.
91 91
 	<br><br>
92 92
 	Applies only if a player rating system is selected.
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
 );
97 97
 define('_MI_CHESS_ALLOW_UNRATED', 'Allow unrated games?');
98 98
 define(
99
-    '_MI_CHESS_ALLOW_UNRATED_DES',
100
-    '
99
+	'_MI_CHESS_ALLOW_UNRATED_DES',
100
+	'
101 101
 	When offering a challenge, may the player exclude the game from use in rating calculations?
102 102
 	<br><br>
103 103
 	Applies only if a player rating system is selected.
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -73,25 +73,25 @@  discard block
 block discarded – undo
73 73
     '
74 74
 	Available rating systems:
75 75
 	<br><br>
76
-	&nbsp;&nbsp;' . _MI_CHESS_RATING_SYSTEM_CXR . '    - Adaptation of the ELO rating system, used by permission of <a target="_blank" href="http://chess-express.com/">Chess Express Ratings, Inc.</a>
76
+	&nbsp;&nbsp;' . _MI_CHESS_RATING_SYSTEM_CXR.'    - Adaptation of the ELO rating system, used by permission of <a target="_blank" href="http://chess-express.com/">Chess Express Ratings, Inc.</a>
77 77
 	<br><br>
78
-	&nbsp;&nbsp;' . _MI_CHESS_RATING_SYSTEM_LINEAR . ' - A very simple system that adds (subtracts) a fixed number of points for a win (loss).
78
+	&nbsp;&nbsp;' . _MI_CHESS_RATING_SYSTEM_LINEAR.' - A very simple system that adds (subtracts) a fixed number of points for a win (loss).
79 79
 	<br><br>
80
-	Select "' . _MI_CHESS_RATING_SYSTEM_NONE . '" to disable the rating feature.
80
+	Select "' . _MI_CHESS_RATING_SYSTEM_NONE.'" to disable the rating feature.
81 81
 	<br><br>
82 82
 	After changing this setting, you should rebuild the player ratings data from Main Menu >> Chess >>
83
-	' . _MI_CHESS_SMNAME4 . '.
83
+	' . _MI_CHESS_SMNAME4.'.
84 84
 '
85 85
 );
86 86
 define('_MI_CHESS_INITIAL_RATING', 'Initial player rating');
87 87
 define(
88 88
     '_MI_CHESS_INITIAL_RATING_DES',
89 89
     '
90
-	If the "' . _MI_CHESS_RATING_SYSTEM_CXR . '" rating system is selected, this value should be between 800 and 2000.
90
+	If the "' . _MI_CHESS_RATING_SYSTEM_CXR.'" rating system is selected, this value should be between 800 and 2000.
91 91
 	<br><br>
92 92
 	Applies only if a player rating system is selected.
93 93
 	<br><br>
94
-	If you change this value, you should rebuild the player ratings data from Main Menu >> Chess >> ' . _MI_CHESS_SMNAME4 . '.
94
+	If you change this value, you should rebuild the player ratings data from Main Menu >> Chess >> ' . _MI_CHESS_SMNAME4.'.
95 95
 '
96 96
 );
97 97
 define('_MI_CHESS_ALLOW_UNRATED', 'Allow unrated games?');
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
 //Help
172 172
 define('_MI_CHESS_DIRNAME', basename(dirname(__DIR__, 2)));
173
-define('_MI_CHESS_HELP_HEADER', __DIR__ . '/help/helpheader.tpl');
173
+define('_MI_CHESS_HELP_HEADER', __DIR__.'/help/helpheader.tpl');
174 174
 define('_MI_CHESS_BACK_2_ADMIN', 'Back to Administration of ');
175 175
 define('_MI_CHESS_OVERVIEW', 'Overview');
176 176
 
Please login to merge, or discard this patch.
preloads/core.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@
 block discarded – undo
22 22
  */
23 23
 class ChessCorePreload extends \XoopsPreloadItem
24 24
 {
25
-    // to add PSR-4 autoloader
26
-    /**
27
-     * @param $args
28
-     */
29
-    public static function eventCoreIncludeCommonEnd($args)
30
-    {
31
-        require __DIR__ . '/autoloader.php';
32
-    }
25
+	// to add PSR-4 autoloader
26
+	/**
27
+	 * @param $args
28
+	 */
29
+	public static function eventCoreIncludeCommonEnd($args)
30
+	{
31
+		require __DIR__ . '/autoloader.php';
32
+	}
33 33
 }
Please login to merge, or discard this patch.
include/notification.inc.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
 // but not when viewing the notifications page via notifications.php.
41 41
 global $xoopsConfig;
42 42
 if (file_exists(XOOPS_ROOT_PATH . "/modules/chess/language/{$xoopsConfig['language']}/main.php")) {
43
-    require_once XOOPS_ROOT_PATH . "/modules/chess/language/{$xoopsConfig['language']}/main.php";
43
+	require_once XOOPS_ROOT_PATH . "/modules/chess/language/{$xoopsConfig['language']}/main.php";
44 44
 } else {
45
-    require_once XOOPS_ROOT_PATH . '/modules/chess/language/english/main.php';
45
+	require_once XOOPS_ROOT_PATH . '/modules/chess/language/english/main.php';
46 46
 }
47 47
 /**#@-*/
48 48
 
@@ -57,57 +57,57 @@  discard block
 block discarded – undo
57 57
  */
58 58
 function chess_notify_item_info($category, $item_id)
59 59
 {
60
-    if ('global' == $category) {
61
-        $item['name'] = 'Chess';
60
+	if ('global' == $category) {
61
+		$item['name'] = 'Chess';
62 62
 
63
-        $item['url'] = XOOPS_URL . '/modules/chess/';
63
+		$item['url'] = XOOPS_URL . '/modules/chess/';
64 64
 
65
-        return $item;
66
-    } elseif ('game' == $category) {
67
-        global $xoopsDB;
65
+		return $item;
66
+	} elseif ('game' == $category) {
67
+		global $xoopsDB;
68 68
 
69
-        $table = $xoopsDB->prefix('chess_games');
69
+		$table = $xoopsDB->prefix('chess_games');
70 70
 
71
-        $result = $xoopsDB->query(
72
-            trim(
73
-                "
71
+		$result = $xoopsDB->query(
72
+			trim(
73
+				"
74 74
 			SELECT white_uid, black_uid, UNIX_TIMESTAMP(start_date) AS start_date
75 75
 			FROM   $table
76 76
 			WHERE  game_id = '$item_id'
77 77
 		"
78
-            )
79
-        );
78
+			)
79
+		);
80 80
 
81
-        $gamedata = $xoopsDB->fetchArray($result);
81
+		$gamedata = $xoopsDB->fetchArray($result);
82 82
 
83
-        $xoopsDB->freeRecordSet($result);
83
+		$xoopsDB->freeRecordSet($result);
84 84
 
85
-        if (false !== $gamedata) {
86
-            // get mapping of user IDs to usernames
85
+		if (false !== $gamedata) {
86
+			// get mapping of user IDs to usernames
87 87
 
88
-            $criteria = new \Criteria('uid', "({$gamedata['white_uid']}, {$gamedata['black_uid']})", 'IN');
88
+			$criteria = new \Criteria('uid', "({$gamedata['white_uid']}, {$gamedata['black_uid']})", 'IN');
89 89
 
90
-            $memberHandler = xoops_getHandler('member');
90
+			$memberHandler = xoops_getHandler('member');
91 91
 
92
-            $usernames = $memberHandler->getUserList($criteria);
92
+			$usernames = $memberHandler->getUserList($criteria);
93 93
 
94
-            $username_white = $usernames[$gamedata['white_uid']] ?? _MD_CHESS_NA;
94
+			$username_white = $usernames[$gamedata['white_uid']] ?? _MD_CHESS_NA;
95 95
 
96
-            $username_black = $usernames[$gamedata['black_uid']] ?? _MD_CHESS_NA;
96
+			$username_black = $usernames[$gamedata['black_uid']] ?? _MD_CHESS_NA;
97 97
 
98
-            $date = $gamedata['start_date'] ? date('Y.m.d', $gamedata['start_date']) : _MD_CHESS_NA;
99
-        } else {
100
-            $username_white = _MD_CHESS_NA;
98
+			$date = $gamedata['start_date'] ? date('Y.m.d', $gamedata['start_date']) : _MD_CHESS_NA;
99
+		} else {
100
+			$username_white = _MD_CHESS_NA;
101 101
 
102
-            $username_black = _MD_CHESS_NA;
102
+			$username_black = _MD_CHESS_NA;
103 103
 
104
-            $date = _MD_CHESS_NA;
105
-        }
104
+			$date = _MD_CHESS_NA;
105
+		}
106 106
 
107
-        $item['name'] = "$username_white " . _MD_CHESS_LABEL_VS . " $username_black ($date)";
107
+		$item['name'] = "$username_white " . _MD_CHESS_LABEL_VS . " $username_black ($date)";
108 108
 
109
-        $item['url'] = XOOPS_URL . '/modules/chess/game.php?game_id=' . $item_id;
109
+		$item['url'] = XOOPS_URL . '/modules/chess/game.php?game_id=' . $item_id;
110 110
 
111
-        return $item;
112
-    }
111
+		return $item;
112
+	}
113 113
 }
Please login to merge, or discard this patch.
include/functions.php 1 patch
Indentation   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
  */
41 41
 function chess_sanitize($text, $allowed_characters = 'A-Za-z0-9')
42 42
 {
43
-    $char_class = preg_replace('/(\.\\\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:\#)/', '\\${1}', $allowed_characters);
44
-    //$char_class = preg_quote($allowed_characters, '/');
45
-    return preg_replace("/[^$char_class]/i", '_', $text);
43
+	$char_class = preg_replace('/(\.\\\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:\#)/', '\\${1}', $allowed_characters);
44
+	//$char_class = preg_quote($allowed_characters, '/');
45
+	return preg_replace("/[^$char_class]/i", '_', $text);
46 46
 }
47 47
 
48 48
 /**
@@ -53,29 +53,29 @@  discard block
 block discarded – undo
53 53
  */
54 54
 function chess_moduleConfig($option)
55 55
 {
56
-    global $xoopsModule, $xoopsModuleConfig;
56
+	global $xoopsModule, $xoopsModuleConfig;
57 57
 
58
-    $value = null;
58
+	$value = null;
59 59
 
60
-    if (is_object($xoopsModule) && 'chess' == $xoopsModule->getVar('dirname') && isset($xoopsModuleConfig[$option])) {
61
-        $value = $xoopsModuleConfig[$option];
62
-    } else { // for use within a block
63
-        $moduleHandler = xoops_getHandler('module');
60
+	if (is_object($xoopsModule) && 'chess' == $xoopsModule->getVar('dirname') && isset($xoopsModuleConfig[$option])) {
61
+		$value = $xoopsModuleConfig[$option];
62
+	} else { // for use within a block
63
+		$moduleHandler = xoops_getHandler('module');
64 64
 
65
-        $module = $moduleHandler->getByDirname('chess');
65
+		$module = $moduleHandler->getByDirname('chess');
66 66
 
67
-        $configHandler = xoops_getHandler('config');
67
+		$configHandler = xoops_getHandler('config');
68 68
 
69
-        $moduleConfig = $configHandler->getConfigsByCat(0, $module->getVar('mid'));
69
+		$moduleConfig = $configHandler->getConfigsByCat(0, $module->getVar('mid'));
70 70
 
71
-        if (isset($moduleConfig[$option])) {
72
-            $value = $moduleConfig[$option];
73
-        } else {
74
-            trigger_error("configuration option '$option' not found", E_USER_ERROR);
75
-        }
76
-    }
71
+		if (isset($moduleConfig[$option])) {
72
+			$value = $moduleConfig[$option];
73
+		} else {
74
+			trigger_error("configuration option '$option' not found", E_USER_ERROR);
75
+		}
76
+	}
77 77
 
78
-    return $value;
78
+	return $value;
79 79
 }
80 80
 
81 81
 /**
@@ -86,29 +86,29 @@  discard block
 block discarded – undo
86 86
  */
87 87
 function chess_can_play($uid = null)
88 88
 {
89
-    global $xoopsUser;
89
+	global $xoopsUser;
90 90
 
91
-    if (isset($uid)) {
92
-        $memberHandler = xoops_getHandler('member');
91
+	if (isset($uid)) {
92
+		$memberHandler = xoops_getHandler('member');
93 93
 
94
-        $user = $memberHandler->getUser($uid);
95
-    } elseif (is_object($xoopsUser)) {
96
-        $user = $xoopsUser;
97
-    } else {
98
-        $user = null;
99
-    }
94
+		$user = $memberHandler->getUser($uid);
95
+	} elseif (is_object($xoopsUser)) {
96
+		$user = $xoopsUser;
97
+	} else {
98
+		$user = null;
99
+	}
100 100
 
101
-    $groups_play = chess_moduleConfig('groups_play');
101
+	$groups_play = chess_moduleConfig('groups_play');
102 102
 
103
-    $can_play = false;
103
+	$can_play = false;
104 104
 
105
-    if (in_array(XOOPS_GROUP_ANONYMOUS, $groups_play)) {
106
-        $can_play = true;
107
-    } elseif (is_object($user)) {
108
-        $can_play = count(array_intersect($user->getGroups(), $groups_play)) > 0;
109
-    }
105
+	if (in_array(XOOPS_GROUP_ANONYMOUS, $groups_play)) {
106
+		$can_play = true;
107
+	} elseif (is_object($user)) {
108
+		$can_play = count(array_intersect($user->getGroups(), $groups_play)) > 0;
109
+	}
110 110
 
111
-    return $can_play;
111
+	return $can_play;
112 112
 }
113 113
 
114 114
 /**
@@ -119,29 +119,29 @@  discard block
 block discarded – undo
119 119
  */
120 120
 function chess_can_delete($uid = null)
121 121
 {
122
-    global $xoopsUser;
122
+	global $xoopsUser;
123 123
 
124
-    if (isset($uid)) {
125
-        $memberHandler = xoops_getHandler('member');
124
+	if (isset($uid)) {
125
+		$memberHandler = xoops_getHandler('member');
126 126
 
127
-        $user = $memberHandler->getUser($uid);
128
-    } elseif (is_object($xoopsUser)) {
129
-        $user = $xoopsUser;
130
-    } else {
131
-        $user = null;
132
-    }
127
+		$user = $memberHandler->getUser($uid);
128
+	} elseif (is_object($xoopsUser)) {
129
+		$user = $xoopsUser;
130
+	} else {
131
+		$user = null;
132
+	}
133 133
 
134
-    $groups_delete = chess_moduleConfig('groups_delete');
134
+	$groups_delete = chess_moduleConfig('groups_delete');
135 135
 
136
-    $can_delete = false;
136
+	$can_delete = false;
137 137
 
138
-    if (in_array(XOOPS_GROUP_ANONYMOUS, $groups_delete)) {
139
-        $can_delete = true;
140
-    } elseif (is_object($user)) {
141
-        $can_delete = count(array_intersect($user->getGroups(), $groups_delete)) > 0;
142
-    }
138
+	if (in_array(XOOPS_GROUP_ANONYMOUS, $groups_delete)) {
139
+		$can_delete = true;
140
+	} elseif (is_object($user)) {
141
+		$can_delete = count(array_intersect($user->getGroups(), $groups_delete)) > 0;
142
+	}
143 143
 
144
-    return $can_delete;
144
+	return $can_delete;
145 145
 }
146 146
 
147 147
 /**
@@ -156,19 +156,19 @@  discard block
 block discarded – undo
156 156
  */
157 157
 function chess_to_pgn_string($data)
158 158
 {
159
-    #var_dump('chess_to_pgn_string, data=', $data);#*#DEBUG#
159
+	#var_dump('chess_to_pgn_string, data=', $data);#*#DEBUG#
160 160
 
161
-    if ('0000-00-00 00:00:00' == $data['datetime']) {
162
-        $datetime = '????.??.?? ??:??:??';
163
-    } else {
164
-        $datetime = str_replace('-', '.', $data['datetime']);
165
-    }
161
+	if ('0000-00-00 00:00:00' == $data['datetime']) {
162
+		$datetime = '????.??.?? ??:??:??';
163
+	} else {
164
+		$datetime = str_replace('-', '.', $data['datetime']);
165
+	}
166 166
 
167
-    [$date, $time] = explode(' ', $datetime);
167
+	[$date, $time] = explode(' ', $datetime);
168 168
 
169
-    $movetext = wordwrap($data['movetext'], 75);
169
+	$movetext = wordwrap($data['movetext'], 75);
170 170
 
171
-    $rtn = <<<END
171
+	$rtn = <<<END
172 172
 [Event "{$data['event']}"]
173 173
 [Site "{$data['site']}"]
174 174
 [Date "$date"]
@@ -180,13 +180,13 @@  discard block
 block discarded – undo
180 180
 
181 181
 END;
182 182
 
183
-    if ($data['setup'] && $data['fen']) {
184
-        $rtn .= "[Setup \"1\"]\n[FEN \"{$data['fen']}\"]\n";
185
-    }
183
+	if ($data['setup'] && $data['fen']) {
184
+		$rtn .= "[Setup \"1\"]\n[FEN \"{$data['fen']}\"]\n";
185
+	}
186 186
 
187
-    $rtn .= "\n$movetext\n";
187
+	$rtn .= "\n$movetext\n";
188 188
 
189
-    return $rtn;
189
+	return $rtn;
190 190
 }
191 191
 
192 192
 /**
@@ -197,19 +197,19 @@  discard block
 block discarded – undo
197 197
  */
198 198
 function chess_uname_to_uid($uname)
199 199
 {
200
-    $criteria = new \CriteriaCompo();
200
+	$criteria = new \CriteriaCompo();
201 201
 
202
-    $criteria->add(new \Criteria('uname', MyTextSanitizer::addSlashes($uname)));
202
+	$criteria->add(new \Criteria('uname', MyTextSanitizer::addSlashes($uname)));
203 203
 
204
-    $criteria->setLimit(1);
204
+	$criteria->setLimit(1);
205 205
 
206
-    $memberHandler = xoops_getHandler('member');
206
+	$memberHandler = xoops_getHandler('member');
207 207
 
208
-    $users = $memberHandler->getUserList($criteria);
208
+	$users = $memberHandler->getUserList($criteria);
209 209
 
210
-    $uids = array_keys($users);
210
+	$uids = array_keys($users);
211 211
 
212
-    return $uids[0] ?? 0;
212
+	return $uids[0] ?? 0;
213 213
 }
214 214
 
215 215
 /*** #*#DEBUG# testing something
Please login to merge, or discard this patch.
include/onuninstall.php 2 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
  */
30 30
 function xoops_module_pre_uninstall_chess(\XoopsModule $module)
31 31
 {
32
-    // Do some synchronization if needed
32
+	// Do some synchronization if needed
33 33
 
34
-    return true;
34
+	return true;
35 35
 }
36 36
 
37 37
 /**
@@ -42,50 +42,50 @@  discard block
 block discarded – undo
42 42
  */
43 43
 function xoops_module_uninstall_chess(\XoopsModule $module)
44 44
 {
45
-    require __DIR__ . '/common.php';
45
+	require __DIR__ . '/common.php';
46 46
 
47
-    $moduleDirName = basename(dirname(__DIR__));
47
+	$moduleDirName = basename(dirname(__DIR__));
48 48
 
49
-    $moduleDirNameUpper = mb_strtoupper($moduleDirName);
49
+	$moduleDirNameUpper = mb_strtoupper($moduleDirName);
50 50
 
51
-    $helper = Chess\Helper::getInstance();
51
+	$helper = Chess\Helper::getInstance();
52 52
 
53
-    $utility = new Chess\Utility();
54
-    //    $configurator = new Chess\Common\Configurator();
53
+	$utility = new Chess\Utility();
54
+	//    $configurator = new Chess\Common\Configurator();
55 55
 
56
-    // Load language files
56
+	// Load language files
57 57
 
58
-    $helper->loadLanguage('admin');
58
+	$helper->loadLanguage('admin');
59 59
 
60
-    $helper->loadLanguage('common');
60
+	$helper->loadLanguage('common');
61 61
 
62
-    $success = true;
62
+	$success = true;
63 63
 
64
-    //------------------------------------------------------------------
64
+	//------------------------------------------------------------------
65 65
 
66
-    // Remove uploads folder (and all subfolders) if they exist
66
+	// Remove uploads folder (and all subfolders) if they exist
67 67
 
68
-    //------------------------------------------------------------------
68
+	//------------------------------------------------------------------
69 69
 
70
-    $old_directories = [$GLOBALS['xoops']->path("uploads/{$moduleDirName}")];
70
+	$old_directories = [$GLOBALS['xoops']->path("uploads/{$moduleDirName}")];
71 71
 
72
-    foreach ($old_directories as $old_dir) {
73
-        $dirInfo = new SplFileInfo($old_dir);
72
+	foreach ($old_directories as $old_dir) {
73
+		$dirInfo = new SplFileInfo($old_dir);
74 74
 
75
-        if ($dirInfo->isDir()) {
76
-            // The directory exists so delete it
75
+		if ($dirInfo->isDir()) {
76
+			// The directory exists so delete it
77 77
 
78
-            if (false === $utility::rrmdir($old_dir)) {
79
-                $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH'), $old_dir));
78
+			if (false === $utility::rrmdir($old_dir)) {
79
+				$module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH'), $old_dir));
80 80
 
81
-                $success = false;
82
-            }
83
-        }
81
+				$success = false;
82
+			}
83
+		}
84 84
 
85
-        unset($dirInfo);
86
-    }
85
+		unset($dirInfo);
86
+	}
87 87
 
88
-    /*
88
+	/*
89 89
     //------------ START ----------------
90 90
     //------------------------------------------------------------------
91 91
     // Remove xsitemap.xml from XOOPS root folder if it exists
@@ -99,6 +99,6 @@  discard block
 block discarded – undo
99 99
 //    return $success && $delOk; // use this if you're using this routine
100 100
 */
101 101
 
102
-    return $success;
103
-    //------------ END  ----------------
102
+	return $success;
103
+	//------------ END  ----------------
104 104
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
  */
43 43
 function xoops_module_uninstall_chess(\XoopsModule $module)
44 44
 {
45
-    require __DIR__ . '/common.php';
45
+    require __DIR__.'/common.php';
46 46
 
47 47
     $moduleDirName = basename(dirname(__DIR__));
48 48
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             // The directory exists so delete it
77 77
 
78 78
             if (false === $utility::rrmdir($old_dir)) {
79
-                $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH'), $old_dir));
79
+                $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH'), $old_dir));
80 80
 
81 81
                 $success = false;
82 82
             }
Please login to merge, or discard this patch.
include/onupdate.php 2 patches
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
 use XoopsModules\Chess;
22 22
 
23 23
 if ((!defined('XOOPS_ROOT_PATH')) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser)
24
-    || !$GLOBALS['xoopsUser']->isAdmin()) {
25
-    exit('Restricted access' . PHP_EOL);
24
+	|| !$GLOBALS['xoopsUser']->isAdmin()) {
25
+	exit('Restricted access' . PHP_EOL);
26 26
 }
27 27
 
28 28
 /**
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
  */
33 33
 function tableExists($tablename)
34 34
 {
35
-    $result = $GLOBALS['xoopsDB']->queryF("SHOW TABLES LIKE '$tablename'");
35
+	$result = $GLOBALS['xoopsDB']->queryF("SHOW TABLES LIKE '$tablename'");
36 36
 
37
-    return $GLOBALS['xoopsDB']->getRowsNum($result) > 0;
37
+	return $GLOBALS['xoopsDB']->getRowsNum($result) > 0;
38 38
 }
39 39
 
40 40
 /**
@@ -44,25 +44,25 @@  discard block
 block discarded – undo
44 44
  */
45 45
 function xoops_module_pre_update_chess(\XoopsModule $module)
46 46
 {
47
-    $moduleDirName = basename(dirname(__DIR__));
47
+	$moduleDirName = basename(dirname(__DIR__));
48 48
 
49
-    /** @var Chess\Helper $helper */
49
+	/** @var Chess\Helper $helper */
50 50
 
51
-    /** @var Chess\Utility $utility */
51
+	/** @var Chess\Utility $utility */
52 52
 
53
-    $helper = Chess\Helper::getInstance();
53
+	$helper = Chess\Helper::getInstance();
54 54
 
55
-    $utility = new Chess\Utility();
55
+	$utility = new Chess\Utility();
56 56
 
57
-    $xoopsSuccess = $utility::checkVerXoops($module);
57
+	$xoopsSuccess = $utility::checkVerXoops($module);
58 58
 
59
-    $phpSuccess = $utility::checkVerPhp($module);
59
+	$phpSuccess = $utility::checkVerPhp($module);
60 60
 
61
-    $migrator = new \XoopsModules\Chess\Common\Migrate();
61
+	$migrator = new \XoopsModules\Chess\Common\Migrate();
62 62
 
63
-    $migrator->synchronizeSchema();
63
+	$migrator->synchronizeSchema();
64 64
 
65
-    return $xoopsSuccess && $phpSuccess;
65
+	return $xoopsSuccess && $phpSuccess;
66 66
 }
67 67
 
68 68
 /**
@@ -74,114 +74,114 @@  discard block
 block discarded – undo
74 74
  */
75 75
 function xoops_module_update_chess(\XoopsModule $module, $previousVersion = null)
76 76
 {
77
-    $moduleDirName = basename(dirname(__DIR__));
77
+	$moduleDirName = basename(dirname(__DIR__));
78 78
 
79
-    $moduleDirNameUpper = mb_strtoupper($moduleDirName);
79
+	$moduleDirNameUpper = mb_strtoupper($moduleDirName);
80 80
 
81
-    /** @var Chess\Helper $helper */
81
+	/** @var Chess\Helper $helper */
82 82
 
83
-    /** @var Chess\Utility $utility */
83
+	/** @var Chess\Utility $utility */
84 84
 
85
-    /** @var Chess\Common\Configurator $configurator */
85
+	/** @var Chess\Common\Configurator $configurator */
86 86
 
87
-    $helper = Chess\Helper::getInstance();
87
+	$helper = Chess\Helper::getInstance();
88 88
 
89
-    $utility = new Chess\Utility();
89
+	$utility = new Chess\Utility();
90 90
 
91
-    $configurator = new Chess\Common\Configurator();
91
+	$configurator = new Chess\Common\Configurator();
92 92
 
93
-    $helper->loadLanguage('common');
93
+	$helper->loadLanguage('common');
94 94
 
95
-    if ($previousVersion < 201) {
95
+	if ($previousVersion < 201) {
96 96
 
97
-        //delete old HTML templates
97
+		//delete old HTML templates
98 98
 
99
-        if (count($configurator->templateFolders) > 0) {
100
-            foreach ($configurator->templateFolders as $folder) {
101
-                $templateFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $folder);
99
+		if (count($configurator->templateFolders) > 0) {
100
+			foreach ($configurator->templateFolders as $folder) {
101
+				$templateFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $folder);
102 102
 
103
-                if (is_dir($templateFolder)) {
104
-                    $templateList = array_diff(scandir($templateFolder, SCANDIR_SORT_NONE), ['..', '.']);
103
+				if (is_dir($templateFolder)) {
104
+					$templateList = array_diff(scandir($templateFolder, SCANDIR_SORT_NONE), ['..', '.']);
105 105
 
106
-                    foreach ($templateList as $k => $v) {
107
-                        $fileInfo = new SplFileInfo($templateFolder . $v);
106
+					foreach ($templateList as $k => $v) {
107
+						$fileInfo = new SplFileInfo($templateFolder . $v);
108 108
 
109
-                        if ('html' === $fileInfo->getExtension() && 'index.html' !== $fileInfo->getFilename()) {
110
-                            if (file_exists($templateFolder . $v)) {
111
-                                unlink($templateFolder . $v);
112
-                            }
113
-                        }
114
-                    }
115
-                }
116
-            }
117
-        }
109
+						if ('html' === $fileInfo->getExtension() && 'index.html' !== $fileInfo->getFilename()) {
110
+							if (file_exists($templateFolder . $v)) {
111
+								unlink($templateFolder . $v);
112
+							}
113
+						}
114
+					}
115
+				}
116
+			}
117
+		}
118 118
 
119
-        //  ---  DELETE OLD FILES ---------------
119
+		//  ---  DELETE OLD FILES ---------------
120 120
 
121
-        if (count($configurator->oldFiles) > 0) {
122
-            //    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
121
+		if (count($configurator->oldFiles) > 0) {
122
+			//    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
123 123
 
124
-            foreach (array_keys($configurator->oldFiles) as $i) {
125
-                $tempFile = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFiles[$i]);
124
+			foreach (array_keys($configurator->oldFiles) as $i) {
125
+				$tempFile = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFiles[$i]);
126 126
 
127
-                if (is_file($tempFile)) {
128
-                    unlink($tempFile);
129
-                }
130
-            }
131
-        }
127
+				if (is_file($tempFile)) {
128
+					unlink($tempFile);
129
+				}
130
+			}
131
+		}
132 132
 
133
-        //  ---  DELETE OLD FOLDERS ---------------
133
+		//  ---  DELETE OLD FOLDERS ---------------
134 134
 
135
-        xoops_load('XoopsFile');
135
+		xoops_load('XoopsFile');
136 136
 
137
-        if (count($configurator->oldFolders) > 0) {
138
-            //    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
137
+		if (count($configurator->oldFolders) > 0) {
138
+			//    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
139 139
 
140
-            foreach (array_keys($configurator->oldFolders) as $i) {
141
-                $tempFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFolders[$i]);
140
+			foreach (array_keys($configurator->oldFolders) as $i) {
141
+				$tempFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFolders[$i]);
142 142
 
143
-                /** @var XoopsObjectHandler $folderHandler */
143
+				/** @var XoopsObjectHandler $folderHandler */
144 144
 
145
-                $folderHandler = \XoopsFile::getHandler('folder', $tempFolder);
145
+				$folderHandler = \XoopsFile::getHandler('folder', $tempFolder);
146 146
 
147
-                $folderHandler->delete($tempFolder);
148
-            }
149
-        }
147
+				$folderHandler->delete($tempFolder);
148
+			}
149
+		}
150 150
 
151
-        //  ---  CREATE UPLOAD FOLDERS ---------------
151
+		//  ---  CREATE UPLOAD FOLDERS ---------------
152 152
 
153
-        if (count($configurator->uploadFolders) > 0) {
154
-            //    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
153
+		if (count($configurator->uploadFolders) > 0) {
154
+			//    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
155 155
 
156
-            foreach (array_keys($configurator->uploadFolders) as $i) {
157
-                $utility::createFolder($configurator->uploadFolders[$i]);
158
-            }
159
-        }
156
+			foreach (array_keys($configurator->uploadFolders) as $i) {
157
+				$utility::createFolder($configurator->uploadFolders[$i]);
158
+			}
159
+		}
160 160
 
161
-        //  ---  COPY blank.png FILES ---------------
161
+		//  ---  COPY blank.png FILES ---------------
162 162
 
163
-        if (count($configurator->copyBlankFiles) > 0) {
164
-            $file = dirname(__DIR__) . '/assets/images/blank.png';
163
+		if (count($configurator->copyBlankFiles) > 0) {
164
+			$file = dirname(__DIR__) . '/assets/images/blank.png';
165 165
 
166
-            foreach (array_keys($configurator->copyBlankFiles) as $i) {
167
-                $dest = $configurator->copyBlankFiles[$i] . '/blank.png';
166
+			foreach (array_keys($configurator->copyBlankFiles) as $i) {
167
+				$dest = $configurator->copyBlankFiles[$i] . '/blank.png';
168 168
 
169
-                $utility::copyFile($file, $dest);
170
-            }
171
-        }
169
+				$utility::copyFile($file, $dest);
170
+			}
171
+		}
172 172
 
173
-        //delete .html entries from the tpl table
173
+		//delete .html entries from the tpl table
174 174
 
175
-        $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'";
175
+		$sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'";
176 176
 
177
-        $GLOBALS['xoopsDB']->queryF($sql);
177
+		$GLOBALS['xoopsDB']->queryF($sql);
178 178
 
179
-        /** @var XoopsGroupPermHandler $gpermHandler */
179
+		/** @var XoopsGroupPermHandler $gpermHandler */
180 180
 
181
-        $gpermHandler = xoops_getHandler('groupperm');
181
+		$gpermHandler = xoops_getHandler('groupperm');
182 182
 
183
-        return $gpermHandler->deleteByModule($module->getVar('mid'), 'item_read');
184
-    }
183
+		return $gpermHandler->deleteByModule($module->getVar('mid'), 'item_read');
184
+	}
185 185
 
186
-    return true;
186
+	return true;
187 187
 }
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 if ((!defined('XOOPS_ROOT_PATH')) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser)
24 24
     || !$GLOBALS['xoopsUser']->isAdmin()) {
25
-    exit('Restricted access' . PHP_EOL);
25
+    exit('Restricted access'.PHP_EOL);
26 26
 }
27 27
 
28 28
 /**
@@ -98,17 +98,17 @@  discard block
 block discarded – undo
98 98
 
99 99
         if (count($configurator->templateFolders) > 0) {
100 100
             foreach ($configurator->templateFolders as $folder) {
101
-                $templateFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $folder);
101
+                $templateFolder = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$folder);
102 102
 
103 103
                 if (is_dir($templateFolder)) {
104 104
                     $templateList = array_diff(scandir($templateFolder, SCANDIR_SORT_NONE), ['..', '.']);
105 105
 
106 106
                     foreach ($templateList as $k => $v) {
107
-                        $fileInfo = new SplFileInfo($templateFolder . $v);
107
+                        $fileInfo = new SplFileInfo($templateFolder.$v);
108 108
 
109 109
                         if ('html' === $fileInfo->getExtension() && 'index.html' !== $fileInfo->getFilename()) {
110
-                            if (file_exists($templateFolder . $v)) {
111
-                                unlink($templateFolder . $v);
110
+                            if (file_exists($templateFolder.$v)) {
111
+                                unlink($templateFolder.$v);
112 112
                             }
113 113
                         }
114 114
                     }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             //    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
123 123
 
124 124
             foreach (array_keys($configurator->oldFiles) as $i) {
125
-                $tempFile = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFiles[$i]);
125
+                $tempFile = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator->oldFiles[$i]);
126 126
 
127 127
                 if (is_file($tempFile)) {
128 128
                     unlink($tempFile);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             //    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
139 139
 
140 140
             foreach (array_keys($configurator->oldFolders) as $i) {
141
-                $tempFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFolders[$i]);
141
+                $tempFolder = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator->oldFolders[$i]);
142 142
 
143 143
                 /** @var XoopsObjectHandler $folderHandler */
144 144
 
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
         //  ---  COPY blank.png FILES ---------------
162 162
 
163 163
         if (count($configurator->copyBlankFiles) > 0) {
164
-            $file = dirname(__DIR__) . '/assets/images/blank.png';
164
+            $file = dirname(__DIR__).'/assets/images/blank.png';
165 165
 
166 166
             foreach (array_keys($configurator->copyBlankFiles) as $i) {
167
-                $dest = $configurator->copyBlankFiles[$i] . '/blank.png';
167
+                $dest = $configurator->copyBlankFiles[$i].'/blank.png';
168 168
 
169 169
                 $utility::copyFile($file, $dest);
170 170
             }
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 
173 173
         //delete .html entries from the tpl table
174 174
 
175
-        $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'";
175
+        $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('tplfile')." WHERE `tpl_module` = '".$module->getVar('dirname', 'n')."' AND `tpl_file` LIKE '%.html%'";
176 176
 
177 177
         $GLOBALS['xoopsDB']->queryF($sql);
178 178
 
Please login to merge, or discard this patch.
include/oninstall.php 2 patches
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -26,29 +26,29 @@  discard block
 block discarded – undo
26 26
  */
27 27
 function xoops_module_pre_install_chess(\XoopsModule $module)
28 28
 {
29
-    //    require  dirname(__DIR__) . '/preloads/autoloader.php';
29
+	//    require  dirname(__DIR__) . '/preloads/autoloader.php';
30 30
 
31
-    require __DIR__ . '/common.php';
31
+	require __DIR__ . '/common.php';
32 32
 
33
-    $utility = new \XoopsModules\Chess\Utility();
33
+	$utility = new \XoopsModules\Chess\Utility();
34 34
 
35
-    //check for minimum XOOPS version
35
+	//check for minimum XOOPS version
36 36
 
37
-    $xoopsSuccess = $utility::checkVerXoops($module);
37
+	$xoopsSuccess = $utility::checkVerXoops($module);
38 38
 
39
-    // check for minimum PHP version
39
+	// check for minimum PHP version
40 40
 
41
-    $phpSuccess = $utility::checkVerPhp($module);
41
+	$phpSuccess = $utility::checkVerPhp($module);
42 42
 
43
-    if ($xoopsSuccess && $phpSuccess) {
44
-        $moduleTables = &$module->getInfo('tables');
43
+	if ($xoopsSuccess && $phpSuccess) {
44
+		$moduleTables = &$module->getInfo('tables');
45 45
 
46
-        foreach ($moduleTables as $table) {
47
-            $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' . $GLOBALS['xoopsDB']->prefix($table) . ';');
48
-        }
49
-    }
46
+		foreach ($moduleTables as $table) {
47
+			$GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' . $GLOBALS['xoopsDB']->prefix($table) . ';');
48
+		}
49
+	}
50 50
 
51
-    return $xoopsSuccess && $phpSuccess;
51
+	return $xoopsSuccess && $phpSuccess;
52 52
 }
53 53
 
54 54
 /**
@@ -59,71 +59,71 @@  discard block
 block discarded – undo
59 59
  */
60 60
 function xoops_module_install_chess(\XoopsModule $module)
61 61
 {
62
-    require_once dirname(__DIR__) . '/preloads/autoloader.php';
62
+	require_once dirname(__DIR__) . '/preloads/autoloader.php';
63 63
 
64
-    $moduleDirName = basename(dirname(__DIR__));
64
+	$moduleDirName = basename(dirname(__DIR__));
65 65
 
66
-    /** @var \XoopsModules\Chess\Helper $helper */
66
+	/** @var \XoopsModules\Chess\Helper $helper */
67 67
 
68
-    /** @var \XoopsModules\Chess\Utility $utility */
68
+	/** @var \XoopsModules\Chess\Utility $utility */
69 69
 
70
-    /** @var \XoopsModules\Chess\Common\Configurator $configurator */
70
+	/** @var \XoopsModules\Chess\Common\Configurator $configurator */
71 71
 
72
-    $helper = \XoopsModules\Chess\Helper::getInstance();
72
+	$helper = \XoopsModules\Chess\Helper::getInstance();
73 73
 
74
-    $utility = new \XoopsModules\Chess\Utility();
74
+	$utility = new \XoopsModules\Chess\Utility();
75 75
 
76
-    $configurator = new \XoopsModules\Chess\Common\Configurator();
76
+	$configurator = new \XoopsModules\Chess\Common\Configurator();
77 77
 
78
-    // Load language files
78
+	// Load language files
79 79
 
80
-    $helper->loadLanguage('admin');
80
+	$helper->loadLanguage('admin');
81 81
 
82
-    $helper->loadLanguage('modinfo');
82
+	$helper->loadLanguage('modinfo');
83 83
 
84
-    // default Permission Settings ----------------------
84
+	// default Permission Settings ----------------------
85 85
 
86
-    $moduleId = $module->getVar('mid');
86
+	$moduleId = $module->getVar('mid');
87 87
 
88
-    //$moduleName = $module->getVar('name');
88
+	//$moduleName = $module->getVar('name');
89 89
 
90
-    $grouppermHandler = xoops_getHandler('groupperm');
90
+	$grouppermHandler = xoops_getHandler('groupperm');
91 91
 
92
-    // access rights ------------------------------------------
92
+	// access rights ------------------------------------------
93 93
 
94
-    $grouppermHandler->addRight($moduleDirName . '_approve', 1, XOOPS_GROUP_ADMIN, $moduleId);
94
+	$grouppermHandler->addRight($moduleDirName . '_approve', 1, XOOPS_GROUP_ADMIN, $moduleId);
95 95
 
96
-    $grouppermHandler->addRight($moduleDirName . '_submit', 1, XOOPS_GROUP_ADMIN, $moduleId);
96
+	$grouppermHandler->addRight($moduleDirName . '_submit', 1, XOOPS_GROUP_ADMIN, $moduleId);
97 97
 
98
-    $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ADMIN, $moduleId);
98
+	$grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ADMIN, $moduleId);
99 99
 
100
-    $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_USERS, $moduleId);
100
+	$grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_USERS, $moduleId);
101 101
 
102
-    $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ANONYMOUS, $moduleId);
102
+	$grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ANONYMOUS, $moduleId);
103 103
 
104
-    //  ---  CREATE FOLDERS ---------------
104
+	//  ---  CREATE FOLDERS ---------------
105 105
 
106
-    if (count($configurator->uploadFolders) > 0) {
107
-        //    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
106
+	if (count($configurator->uploadFolders) > 0) {
107
+		//    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
108 108
 
109
-        foreach (array_keys($configurator->uploadFolders) as $i) {
110
-            $utility::createFolder($configurator->uploadFolders[$i]);
111
-        }
112
-    }
109
+		foreach (array_keys($configurator->uploadFolders) as $i) {
110
+			$utility::createFolder($configurator->uploadFolders[$i]);
111
+		}
112
+	}
113 113
 
114
-    //  ---  COPY blank.png FILES ---------------
114
+	//  ---  COPY blank.png FILES ---------------
115 115
 
116
-    if (count($configurator->copyBlankFiles) > 0) {
117
-        $file = dirname(__DIR__) . '/assets/images/blank.png';
116
+	if (count($configurator->copyBlankFiles) > 0) {
117
+		$file = dirname(__DIR__) . '/assets/images/blank.png';
118 118
 
119
-        foreach (array_keys($configurator->copyBlankFiles) as $i) {
120
-            $dest = $configurator->copyBlankFiles[$i] . '/blank.png';
119
+		foreach (array_keys($configurator->copyBlankFiles) as $i) {
120
+			$dest = $configurator->copyBlankFiles[$i] . '/blank.png';
121 121
 
122
-            $utility::copyFile($file, $dest);
123
-        }
124
-    }
122
+			$utility::copyFile($file, $dest);
123
+		}
124
+	}
125 125
 
126
-    /*
126
+	/*
127 127
         //  ---  COPY test folder files ---------------
128 128
     if (count($configurator->copyTestFolders) > 0) {
129 129
         //        $file =  dirname(__DIR__) . '/testdata/images/';
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
     }
136 136
     */
137 137
 
138
-    //delete .html entries from the tpl table
138
+	//delete .html entries from the tpl table
139 139
 
140
-    $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'";
140
+	$sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'";
141 141
 
142
-    $GLOBALS['xoopsDB']->queryF($sql);
142
+	$GLOBALS['xoopsDB']->queryF($sql);
143 143
 
144
-    return true;
144
+	return true;
145 145
 }
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 {
29 29
     //    require  dirname(__DIR__) . '/preloads/autoloader.php';
30 30
 
31
-    require __DIR__ . '/common.php';
31
+    require __DIR__.'/common.php';
32 32
 
33 33
     $utility = new \XoopsModules\Chess\Utility();
34 34
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $moduleTables = &$module->getInfo('tables');
45 45
 
46 46
         foreach ($moduleTables as $table) {
47
-            $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' . $GLOBALS['xoopsDB']->prefix($table) . ';');
47
+            $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS '.$GLOBALS['xoopsDB']->prefix($table).';');
48 48
         }
49 49
     }
50 50
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
  */
60 60
 function xoops_module_install_chess(\XoopsModule $module)
61 61
 {
62
-    require_once dirname(__DIR__) . '/preloads/autoloader.php';
62
+    require_once dirname(__DIR__).'/preloads/autoloader.php';
63 63
 
64 64
     $moduleDirName = basename(dirname(__DIR__));
65 65
 
@@ -91,15 +91,15 @@  discard block
 block discarded – undo
91 91
 
92 92
     // access rights ------------------------------------------
93 93
 
94
-    $grouppermHandler->addRight($moduleDirName . '_approve', 1, XOOPS_GROUP_ADMIN, $moduleId);
94
+    $grouppermHandler->addRight($moduleDirName.'_approve', 1, XOOPS_GROUP_ADMIN, $moduleId);
95 95
 
96
-    $grouppermHandler->addRight($moduleDirName . '_submit', 1, XOOPS_GROUP_ADMIN, $moduleId);
96
+    $grouppermHandler->addRight($moduleDirName.'_submit', 1, XOOPS_GROUP_ADMIN, $moduleId);
97 97
 
98
-    $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ADMIN, $moduleId);
98
+    $grouppermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_ADMIN, $moduleId);
99 99
 
100
-    $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_USERS, $moduleId);
100
+    $grouppermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_USERS, $moduleId);
101 101
 
102
-    $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ANONYMOUS, $moduleId);
102
+    $grouppermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_ANONYMOUS, $moduleId);
103 103
 
104 104
     //  ---  CREATE FOLDERS ---------------
105 105
 
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
     //  ---  COPY blank.png FILES ---------------
115 115
 
116 116
     if (count($configurator->copyBlankFiles) > 0) {
117
-        $file = dirname(__DIR__) . '/assets/images/blank.png';
117
+        $file = dirname(__DIR__).'/assets/images/blank.png';
118 118
 
119 119
         foreach (array_keys($configurator->copyBlankFiles) as $i) {
120
-            $dest = $configurator->copyBlankFiles[$i] . '/blank.png';
120
+            $dest = $configurator->copyBlankFiles[$i].'/blank.png';
121 121
 
122 122
             $utility::copyFile($file, $dest);
123 123
         }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
     //delete .html entries from the tpl table
139 139
 
140
-    $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'";
140
+    $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('tplfile')." WHERE `tpl_module` = '".$module->getVar('dirname', 'n')."' AND `tpl_file` LIKE '%.html%'";
141 141
 
142 142
     $GLOBALS['xoopsDB']->queryF($sql);
143 143
 
Please login to merge, or discard this patch.
config/paths.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,15 +4,15 @@
 block discarded – undo
4 4
 $moduleDirNameUpper = mb_strtoupper($moduleDirName);
5 5
 
6 6
 return (object)[
7
-    'name'          => mb_strtoupper($moduleDirName) . ' PathConfigurator',
8
-    'paths'         => [
9
-        'dirname'    => $moduleDirName,
10
-        'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
11
-        'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
12
-        'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
13
-        'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
14
-        'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
15
-    ],
16
-    'uploadFolders' => [
17
-    ],
7
+	'name'          => mb_strtoupper($moduleDirName) . ' PathConfigurator',
8
+	'paths'         => [
9
+		'dirname'    => $moduleDirName,
10
+		'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
11
+		'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
12
+		'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
13
+		'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
14
+		'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
15
+	],
16
+	'uploadFolders' => [
17
+	],
18 18
 ];
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,15 +3,15 @@
 block discarded – undo
3 3
 $moduleDirName      = basename(dirname(__DIR__));
4 4
 $moduleDirNameUpper = mb_strtoupper($moduleDirName);
5 5
 
6
-return (object)[
7
-    'name'          => mb_strtoupper($moduleDirName) . ' PathConfigurator',
6
+return (object) [
7
+    'name'          => mb_strtoupper($moduleDirName).' PathConfigurator',
8 8
     'paths'         => [
9 9
         'dirname'    => $moduleDirName,
10
-        'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
11
-        'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
12
-        'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
13
-        'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
14
-        'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
10
+        'admin'      => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin',
11
+        'modPath'    => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName,
12
+        'modUrl'     => XOOPS_URL.'/modules/'.$moduleDirName,
13
+        'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
14
+        'uploadUrl'  => XOOPS_UPLOAD_URL.'/'.$moduleDirName,
15 15
     ],
16 16
     'uploadFolders' => [
17 17
     ],
Please login to merge, or discard this patch.