@@ -4,12 +4,12 @@ discard block |
||
| 4 | 4 | * @see http://www.php-fig.org/psr/psr-4/examples/ |
| 5 | 5 | */ |
| 6 | 6 | spl_autoload_register( |
| 7 | - static function ($class) { |
|
| 7 | + static function($class) { |
|
| 8 | 8 | // project-specific namespace prefix |
| 9 | - $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__))); |
|
| 9 | + $prefix = 'XoopsModules\\'.ucfirst(basename(dirname(__DIR__))); |
|
| 10 | 10 | |
| 11 | 11 | // base directory for the namespace prefix |
| 12 | - $baseDir = __DIR__ . '/../class/'; |
|
| 12 | + $baseDir = __DIR__.'/../class/'; |
|
| 13 | 13 | |
| 14 | 14 | // does the class use the namespace prefix? |
| 15 | 15 | $len = mb_strlen($prefix); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | // replace the namespace prefix with the base directory, replace namespace |
| 25 | 25 | // separators with directory separators in the relative class name, append |
| 26 | 26 | // with .php |
| 27 | - $file = $baseDir . str_replace('\\', '/', $relativeClass) . '.php'; |
|
| 27 | + $file = $baseDir.str_replace('\\', '/', $relativeClass).'.php'; |
|
| 28 | 28 | |
| 29 | 29 | // if the file exists, require it |
| 30 | 30 | if (file_exists($file)) { |
@@ -28,6 +28,6 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | public static function eventCoreIncludeCommonEnd($args) |
| 30 | 30 | { |
| 31 | - include __DIR__ . '/autoloader.php'; |
|
| 31 | + include __DIR__.'/autoloader.php'; |
|
| 32 | 32 | } |
| 33 | 33 | } |
@@ -21,129 +21,129 @@ discard block |
||
| 21 | 21 | $moduleDirName = basename(dirname(dirname(__DIR__))); |
| 22 | 22 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
| 23 | 23 | |
| 24 | -define('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS', 'GD library support: '); |
|
| 25 | -define('CO_' . $moduleDirNameUpper . '_GDLIBVERSION', 'GD Library version: '); |
|
| 26 | -define('CO_' . $moduleDirNameUpper . '_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)"); |
|
| 27 | -define('CO_' . $moduleDirNameUpper . '_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)"); |
|
| 28 | -define('CO_' . $moduleDirNameUpper . '_IMAGEINFO', 'Server status'); |
|
| 29 | -define('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): '); |
|
| 30 | -define('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): '); |
|
| 31 | -define('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): '); |
|
| 32 | -define('CO_' . $moduleDirNameUpper . '_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> "); |
|
| 33 | -define('CO_' . $moduleDirNameUpper . '_OFF', "<span style='font-weight: bold;'>OFF</span>"); |
|
| 34 | -define('CO_' . $moduleDirNameUpper . '_ON', "<span style='font-weight: bold;'>ON</span>"); |
|
| 35 | -define('CO_' . $moduleDirNameUpper . '_SERVERPATH', 'Server path to XOOPS root: '); |
|
| 36 | -define('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS', 'Server uploads status: '); |
|
| 37 | -define('CO_' . $moduleDirNameUpper . '_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>"); |
|
| 38 | -define('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.'); |
|
| 39 | - |
|
| 40 | -define('CO_' . $moduleDirNameUpper . '_PRINT', "<span style='font-weight: bold;'>Print</span>"); |
|
| 41 | -define('CO_' . $moduleDirNameUpper . '_PDF', "<span style='font-weight: bold;'>Create PDF</span>"); |
|
| 42 | - |
|
| 43 | -define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'"); |
|
| 44 | -define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED1', "Update failed - couldn't add new fields"); |
|
| 45 | -define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'"); |
|
| 46 | -define('CO_' . $moduleDirNameUpper . '_ERROR_COLUMN', 'Could not create column in database : %s'); |
|
| 47 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)'); |
|
| 48 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)'); |
|
| 49 | -define('CO_' . $moduleDirNameUpper . '_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module'); |
|
| 50 | - |
|
| 51 | -define('CO_' . $moduleDirNameUpper . '_FOLDERS_DELETED_OK', 'Upload Folders have been deleted'); |
|
| 24 | +define('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS', 'GD library support: '); |
|
| 25 | +define('CO_'.$moduleDirNameUpper.'_GDLIBVERSION', 'GD Library version: '); |
|
| 26 | +define('CO_'.$moduleDirNameUpper.'_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)"); |
|
| 27 | +define('CO_'.$moduleDirNameUpper.'_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)"); |
|
| 28 | +define('CO_'.$moduleDirNameUpper.'_IMAGEINFO', 'Server status'); |
|
| 29 | +define('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): '); |
|
| 30 | +define('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): '); |
|
| 31 | +define('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): '); |
|
| 32 | +define('CO_'.$moduleDirNameUpper.'_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> "); |
|
| 33 | +define('CO_'.$moduleDirNameUpper.'_OFF', "<span style='font-weight: bold;'>OFF</span>"); |
|
| 34 | +define('CO_'.$moduleDirNameUpper.'_ON', "<span style='font-weight: bold;'>ON</span>"); |
|
| 35 | +define('CO_'.$moduleDirNameUpper.'_SERVERPATH', 'Server path to XOOPS root: '); |
|
| 36 | +define('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS', 'Server uploads status: '); |
|
| 37 | +define('CO_'.$moduleDirNameUpper.'_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>"); |
|
| 38 | +define('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.'); |
|
| 39 | + |
|
| 40 | +define('CO_'.$moduleDirNameUpper.'_PRINT', "<span style='font-weight: bold;'>Print</span>"); |
|
| 41 | +define('CO_'.$moduleDirNameUpper.'_PDF', "<span style='font-weight: bold;'>Create PDF</span>"); |
|
| 42 | + |
|
| 43 | +define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'"); |
|
| 44 | +define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED1', "Update failed - couldn't add new fields"); |
|
| 45 | +define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'"); |
|
| 46 | +define('CO_'.$moduleDirNameUpper.'_ERROR_COLUMN', 'Could not create column in database : %s'); |
|
| 47 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)'); |
|
| 48 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)'); |
|
| 49 | +define('CO_'.$moduleDirNameUpper.'_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module'); |
|
| 50 | + |
|
| 51 | +define('CO_'.$moduleDirNameUpper.'_FOLDERS_DELETED_OK', 'Upload Folders have been deleted'); |
|
| 52 | 52 | |
| 53 | 53 | // Error Msgs |
| 54 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH', 'Could not delete %s directory'); |
|
| 55 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_REMOVE', 'Could not delete %s'); |
|
| 56 | -define('CO_' . $moduleDirNameUpper . '_ERROR_NO_PLUGIN', 'Could not load plugin'); |
|
| 54 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH', 'Could not delete %s directory'); |
|
| 55 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_REMOVE', 'Could not delete %s'); |
|
| 56 | +define('CO_'.$moduleDirNameUpper.'_ERROR_NO_PLUGIN', 'Could not load plugin'); |
|
| 57 | 57 | |
| 58 | 58 | //Help |
| 59 | -define('CO_' . $moduleDirNameUpper . '_DIRNAME', basename(dirname(dirname(__DIR__)))); |
|
| 60 | -define('CO_' . $moduleDirNameUpper . '_HELP_HEADER', __DIR__ . '/help/helpheader.tpl'); |
|
| 61 | -define('CO_' . $moduleDirNameUpper . '_BACK_2_ADMIN', 'Back to Administration of '); |
|
| 62 | -define('CO_' . $moduleDirNameUpper . '_OVERVIEW', 'Overview'); |
|
| 59 | +define('CO_'.$moduleDirNameUpper.'_DIRNAME', basename(dirname(dirname(__DIR__)))); |
|
| 60 | +define('CO_'.$moduleDirNameUpper.'_HELP_HEADER', __DIR__.'/help/helpheader.tpl'); |
|
| 61 | +define('CO_'.$moduleDirNameUpper.'_BACK_2_ADMIN', 'Back to Administration of '); |
|
| 62 | +define('CO_'.$moduleDirNameUpper.'_OVERVIEW', 'Overview'); |
|
| 63 | 63 | |
| 64 | 64 | //define('CO_' . $moduleDirNameUpper . '_HELP_DIR', __DIR__); |
| 65 | 65 | |
| 66 | 66 | //help multi-page |
| 67 | -define('CO_' . $moduleDirNameUpper . '_DISCLAIMER', 'Disclaimer'); |
|
| 68 | -define('CO_' . $moduleDirNameUpper . '_LICENSE', 'License'); |
|
| 69 | -define('CO_' . $moduleDirNameUpper . '_SUPPORT', 'Support'); |
|
| 67 | +define('CO_'.$moduleDirNameUpper.'_DISCLAIMER', 'Disclaimer'); |
|
| 68 | +define('CO_'.$moduleDirNameUpper.'_LICENSE', 'License'); |
|
| 69 | +define('CO_'.$moduleDirNameUpper.'_SUPPORT', 'Support'); |
|
| 70 | 70 | |
| 71 | 71 | //Sample Data |
| 72 | -define('CO_' . $moduleDirNameUpper . '_' . 'ADD_SAMPLEDATA', 'Import Sample Data (will delete ALL current data)'); |
|
| 73 | -define('CO_' . $moduleDirNameUpper . '_' . 'SAMPLEDATA_SUCCESS', 'Sample Date uploaded successfully'); |
|
| 74 | -define('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA', 'Export Tables to YAML'); |
|
| 75 | -define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON', 'Show Sample Button?'); |
|
| 76 | -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.'); |
|
| 77 | -define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA', 'Export DB Schema to YAML'); |
|
| 78 | -define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_SUCCESS', 'Export DB Schema to YAML was a success'); |
|
| 79 | -define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_ERROR', 'ERROR: Export of DB Schema to YAML failed'); |
|
| 80 | -define('CO_' . $moduleDirNameUpper . '_' . 'ADD_SAMPLEDATA_OK', 'Are you sure to Import Sample Data? (It will delete ALL current data)'); |
|
| 81 | -define('CO_' . $moduleDirNameUpper . '_' . 'HIDE_SAMPLEDATA_BUTTONS', 'Hide the Import buttons)'); |
|
| 82 | -define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLEDATA_BUTTONS', 'Show the Import buttons)'); |
|
| 83 | -define('CO_' . $moduleDirNameUpper . '_' . 'CONFIRM', 'Confirm'); |
|
| 72 | +define('CO_'.$moduleDirNameUpper.'_'.'ADD_SAMPLEDATA', 'Import Sample Data (will delete ALL current data)'); |
|
| 73 | +define('CO_'.$moduleDirNameUpper.'_'.'SAMPLEDATA_SUCCESS', 'Sample Date uploaded successfully'); |
|
| 74 | +define('CO_'.$moduleDirNameUpper.'_'.'SAVE_SAMPLEDATA', 'Export Tables to YAML'); |
|
| 75 | +define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON', 'Show Sample Button?'); |
|
| 76 | +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.'); |
|
| 77 | +define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA', 'Export DB Schema to YAML'); |
|
| 78 | +define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA_SUCCESS', 'Export DB Schema to YAML was a success'); |
|
| 79 | +define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA_ERROR', 'ERROR: Export of DB Schema to YAML failed'); |
|
| 80 | +define('CO_'.$moduleDirNameUpper.'_'.'ADD_SAMPLEDATA_OK', 'Are you sure to Import Sample Data? (It will delete ALL current data)'); |
|
| 81 | +define('CO_'.$moduleDirNameUpper.'_'.'HIDE_SAMPLEDATA_BUTTONS', 'Hide the Import buttons)'); |
|
| 82 | +define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLEDATA_BUTTONS', 'Show the Import buttons)'); |
|
| 83 | +define('CO_'.$moduleDirNameUpper.'_'.'CONFIRM', 'Confirm'); |
|
| 84 | 84 | |
| 85 | 85 | //letter choice |
| 86 | -define('CO_' . $moduleDirNameUpper . '_' . 'BROWSETOTOPIC', "<span style='font-weight: bold;'>Browse items alphabetically</span>"); |
|
| 87 | -define('CO_' . $moduleDirNameUpper . '_' . 'OTHER', 'Other'); |
|
| 88 | -define('CO_' . $moduleDirNameUpper . '_' . 'ALL', 'All'); |
|
| 86 | +define('CO_'.$moduleDirNameUpper.'_'.'BROWSETOTOPIC', "<span style='font-weight: bold;'>Browse items alphabetically</span>"); |
|
| 87 | +define('CO_'.$moduleDirNameUpper.'_'.'OTHER', 'Other'); |
|
| 88 | +define('CO_'.$moduleDirNameUpper.'_'.'ALL', 'All'); |
|
| 89 | 89 | |
| 90 | 90 | // block defines |
| 91 | -define('CO_' . $moduleDirNameUpper . '_' . 'ACCESSRIGHTS', 'Access Rights'); |
|
| 92 | -define('CO_' . $moduleDirNameUpper . '_' . 'ACTION', 'Action'); |
|
| 93 | -define('CO_' . $moduleDirNameUpper . '_' . 'ACTIVERIGHTS', 'Active Rights'); |
|
| 94 | -define('CO_' . $moduleDirNameUpper . '_' . 'BADMIN', 'Block Administration'); |
|
| 95 | -define('CO_' . $moduleDirNameUpper . '_' . 'BLKDESC', 'Description'); |
|
| 96 | -define('CO_' . $moduleDirNameUpper . '_' . 'CBCENTER', 'Center Middle'); |
|
| 97 | -define('CO_' . $moduleDirNameUpper . '_' . 'CBLEFT', 'Center Left'); |
|
| 98 | -define('CO_' . $moduleDirNameUpper . '_' . 'CBRIGHT', 'Center Right'); |
|
| 99 | -define('CO_' . $moduleDirNameUpper . '_' . 'SBLEFT', 'Left'); |
|
| 100 | -define('CO_' . $moduleDirNameUpper . '_' . 'SBRIGHT', 'Right'); |
|
| 101 | -define('CO_' . $moduleDirNameUpper . '_' . 'SIDE', 'Alignment'); |
|
| 102 | -define('CO_' . $moduleDirNameUpper . '_' . 'TITLE', 'Title'); |
|
| 103 | -define('CO_' . $moduleDirNameUpper . '_' . 'VISIBLE', 'Visible'); |
|
| 104 | -define('CO_' . $moduleDirNameUpper . '_' . 'VISIBLEIN', 'Visible In'); |
|
| 105 | -define('CO_' . $moduleDirNameUpper . '_' . 'WEIGHT', 'Weight'); |
|
| 106 | - |
|
| 107 | -define('CO_' . $moduleDirNameUpper . '_' . 'PERMISSIONS', 'Permissions'); |
|
| 108 | -define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS', 'Blocks Admin'); |
|
| 109 | -define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_DESC', 'Blocks/Group Admin'); |
|
| 110 | - |
|
| 111 | -define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_MANAGMENT', 'Manage'); |
|
| 112 | -define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_ADDBLOCK', 'Add a new block'); |
|
| 113 | -define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_EDITBLOCK', 'Edit a block'); |
|
| 114 | -define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_CLONEBLOCK', 'Clone a block'); |
|
| 91 | +define('CO_'.$moduleDirNameUpper.'_'.'ACCESSRIGHTS', 'Access Rights'); |
|
| 92 | +define('CO_'.$moduleDirNameUpper.'_'.'ACTION', 'Action'); |
|
| 93 | +define('CO_'.$moduleDirNameUpper.'_'.'ACTIVERIGHTS', 'Active Rights'); |
|
| 94 | +define('CO_'.$moduleDirNameUpper.'_'.'BADMIN', 'Block Administration'); |
|
| 95 | +define('CO_'.$moduleDirNameUpper.'_'.'BLKDESC', 'Description'); |
|
| 96 | +define('CO_'.$moduleDirNameUpper.'_'.'CBCENTER', 'Center Middle'); |
|
| 97 | +define('CO_'.$moduleDirNameUpper.'_'.'CBLEFT', 'Center Left'); |
|
| 98 | +define('CO_'.$moduleDirNameUpper.'_'.'CBRIGHT', 'Center Right'); |
|
| 99 | +define('CO_'.$moduleDirNameUpper.'_'.'SBLEFT', 'Left'); |
|
| 100 | +define('CO_'.$moduleDirNameUpper.'_'.'SBRIGHT', 'Right'); |
|
| 101 | +define('CO_'.$moduleDirNameUpper.'_'.'SIDE', 'Alignment'); |
|
| 102 | +define('CO_'.$moduleDirNameUpper.'_'.'TITLE', 'Title'); |
|
| 103 | +define('CO_'.$moduleDirNameUpper.'_'.'VISIBLE', 'Visible'); |
|
| 104 | +define('CO_'.$moduleDirNameUpper.'_'.'VISIBLEIN', 'Visible In'); |
|
| 105 | +define('CO_'.$moduleDirNameUpper.'_'.'WEIGHT', 'Weight'); |
|
| 106 | + |
|
| 107 | +define('CO_'.$moduleDirNameUpper.'_'.'PERMISSIONS', 'Permissions'); |
|
| 108 | +define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS', 'Blocks Admin'); |
|
| 109 | +define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_DESC', 'Blocks/Group Admin'); |
|
| 110 | + |
|
| 111 | +define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_MANAGMENT', 'Manage'); |
|
| 112 | +define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_ADDBLOCK', 'Add a new block'); |
|
| 113 | +define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_EDITBLOCK', 'Edit a block'); |
|
| 114 | +define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_CLONEBLOCK', 'Clone a block'); |
|
| 115 | 115 | |
| 116 | 116 | //myblocksadmin |
| 117 | -define('CO_' . $moduleDirNameUpper . '_' . 'AGDS', 'Admin Groups'); |
|
| 118 | -define('CO_' . $moduleDirNameUpper . '_' . 'BCACHETIME', 'Cache Time'); |
|
| 119 | -define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_ADMIN', 'Blocks Admin'); |
|
| 117 | +define('CO_'.$moduleDirNameUpper.'_'.'AGDS', 'Admin Groups'); |
|
| 118 | +define('CO_'.$moduleDirNameUpper.'_'.'BCACHETIME', 'Cache Time'); |
|
| 119 | +define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_ADMIN', 'Blocks Admin'); |
|
| 120 | 120 | |
| 121 | 121 | //Template Admin |
| 122 | -define('CO_' . $moduleDirNameUpper . '_' . 'TPLSETS', 'Template Management'); |
|
| 123 | -define('CO_' . $moduleDirNameUpper . '_' . 'GENERATE', 'Generate'); |
|
| 124 | -define('CO_' . $moduleDirNameUpper . '_' . 'FILENAME', 'File Name'); |
|
| 122 | +define('CO_'.$moduleDirNameUpper.'_'.'TPLSETS', 'Template Management'); |
|
| 123 | +define('CO_'.$moduleDirNameUpper.'_'.'GENERATE', 'Generate'); |
|
| 124 | +define('CO_'.$moduleDirNameUpper.'_'.'FILENAME', 'File Name'); |
|
| 125 | 125 | |
| 126 | 126 | //Menu |
| 127 | -define('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_MIGRATE', 'Migrate'); |
|
| 128 | -define('CO_' . $moduleDirNameUpper . '_' . 'FOLDER_YES', 'Folder "%s" exist'); |
|
| 129 | -define('CO_' . $moduleDirNameUpper . '_' . 'FOLDER_NO', 'Folder "%s" does not exist. Create the specified folder with CHMOD 777.'); |
|
| 130 | -define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS', 'Show Development Tools Button?'); |
|
| 131 | -define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS_DESC', 'If yes, the "Migrate" Tab and other Development tools will be visible to the Admin.'); |
|
| 132 | -define('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_FEEDBACK', 'Feedback'); |
|
| 127 | +define('CO_'.$moduleDirNameUpper.'_'.'ADMENU_MIGRATE', 'Migrate'); |
|
| 128 | +define('CO_'.$moduleDirNameUpper.'_'.'FOLDER_YES', 'Folder "%s" exist'); |
|
| 129 | +define('CO_'.$moduleDirNameUpper.'_'.'FOLDER_NO', 'Folder "%s" does not exist. Create the specified folder with CHMOD 777.'); |
|
| 130 | +define('CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS', 'Show Development Tools Button?'); |
|
| 131 | +define('CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS_DESC', 'If yes, the "Migrate" Tab and other Development tools will be visible to the Admin.'); |
|
| 132 | +define('CO_'.$moduleDirNameUpper.'_'.'ADMENU_FEEDBACK', 'Feedback'); |
|
| 133 | 133 | |
| 134 | 134 | //Latest Version Check |
| 135 | -define('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION', 'New Version: '); |
|
| 135 | +define('CO_'.$moduleDirNameUpper.'_'.'NEW_VERSION', 'New Version: '); |
|
| 136 | 136 | |
| 137 | 137 | //DirectoryChecker |
| 138 | -define('CO_' . $moduleDirNameUpper . '_' . 'AVAILABLE', "<span style='color: green;'>Available</span>"); |
|
| 139 | -define('CO_' . $moduleDirNameUpper . '_' . 'NOTAVAILABLE', "<span style='color: red;'>Not available</span>"); |
|
| 140 | -define('CO_' . $moduleDirNameUpper . '_' . 'NOTWRITABLE', "<span style='color: red;'>Should have permission ( %d ), but it has ( %d )</span>"); |
|
| 141 | -define('CO_' . $moduleDirNameUpper . '_' . 'CREATETHEDIR', 'Create it'); |
|
| 142 | -define('CO_' . $moduleDirNameUpper . '_' . 'SETMPERM', 'Set the permission'); |
|
| 143 | -define('CO_' . $moduleDirNameUpper . '_' . 'DIRCREATED', 'The directory has been created'); |
|
| 144 | -define('CO_' . $moduleDirNameUpper . '_' . 'DIRNOTCREATED', 'The directory cannot be created'); |
|
| 145 | -define('CO_' . $moduleDirNameUpper . '_' . 'PERMSET', 'The permission has been set'); |
|
| 146 | -define('CO_' . $moduleDirNameUpper . '_' . 'PERMNOTSET', 'The permission cannot be set'); |
|
| 138 | +define('CO_'.$moduleDirNameUpper.'_'.'AVAILABLE', "<span style='color: green;'>Available</span>"); |
|
| 139 | +define('CO_'.$moduleDirNameUpper.'_'.'NOTAVAILABLE', "<span style='color: red;'>Not available</span>"); |
|
| 140 | +define('CO_'.$moduleDirNameUpper.'_'.'NOTWRITABLE', "<span style='color: red;'>Should have permission ( %d ), but it has ( %d )</span>"); |
|
| 141 | +define('CO_'.$moduleDirNameUpper.'_'.'CREATETHEDIR', 'Create it'); |
|
| 142 | +define('CO_'.$moduleDirNameUpper.'_'.'SETMPERM', 'Set the permission'); |
|
| 143 | +define('CO_'.$moduleDirNameUpper.'_'.'DIRCREATED', 'The directory has been created'); |
|
| 144 | +define('CO_'.$moduleDirNameUpper.'_'.'DIRNOTCREATED', 'The directory cannot be created'); |
|
| 145 | +define('CO_'.$moduleDirNameUpper.'_'.'PERMSET', 'The permission has been set'); |
|
| 146 | +define('CO_'.$moduleDirNameUpper.'_'.'PERMNOTSET', 'The permission cannot be set'); |
|
| 147 | 147 | |
| 148 | 148 | //FileChecker |
| 149 | 149 | //define('CO_' . $moduleDirNameUpper . '_' . 'AVAILABLE', "<span style='color: green;'>Available</span>"); |
@@ -153,31 +153,31 @@ discard block |
||
| 153 | 153 | //define('CO_' . $moduleDirNameUpper . '_' . 'CREATETHEFILE', 'Create it'); |
| 154 | 154 | //define('CO_' . $moduleDirNameUpper . '_' . 'SETMPERM', 'Set the permission'); |
| 155 | 155 | |
| 156 | -define('CO_' . $moduleDirNameUpper . '_' . 'FILECOPIED', 'The file has been copied'); |
|
| 157 | -define('CO_' . $moduleDirNameUpper . '_' . 'FILENOTCOPIED', 'The file cannot be copied'); |
|
| 156 | +define('CO_'.$moduleDirNameUpper.'_'.'FILECOPIED', 'The file has been copied'); |
|
| 157 | +define('CO_'.$moduleDirNameUpper.'_'.'FILENOTCOPIED', 'The file cannot be copied'); |
|
| 158 | 158 | |
| 159 | 159 | //define('CO_' . $moduleDirNameUpper . '_' . 'PERMSET', 'The permission has been set'); |
| 160 | 160 | //define('CO_' . $moduleDirNameUpper . '_' . 'PERMNOTSET', 'The permission cannot be set'); |
| 161 | 161 | |
| 162 | 162 | //image config |
| 163 | -define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH', 'Image Display Width'); |
|
| 164 | -define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH_DSC', 'Display width for image'); |
|
| 165 | -define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT', 'Image Display Height'); |
|
| 166 | -define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT_DSC', 'Display height for image'); |
|
| 167 | -define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG', '<span style="color: #FF0000; font-size: Small; font-weight: bold;">--- EXTERNAL Image configuration ---</span> '); |
|
| 168 | -define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG_DSC', ''); |
|
| 169 | -define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH', 'Image Upload path'); |
|
| 170 | -define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH_DSC', 'Path for uploading images'); |
|
| 163 | +define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_WIDTH', 'Image Display Width'); |
|
| 164 | +define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_WIDTH_DSC', 'Display width for image'); |
|
| 165 | +define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_HEIGHT', 'Image Display Height'); |
|
| 166 | +define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_HEIGHT_DSC', 'Display height for image'); |
|
| 167 | +define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_CONFIG', '<span style="color: #FF0000; font-size: Small; font-weight: bold;">--- EXTERNAL Image configuration ---</span> '); |
|
| 168 | +define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_CONFIG_DSC', ''); |
|
| 169 | +define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_UPLOAD_PATH', 'Image Upload path'); |
|
| 170 | +define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_UPLOAD_PATH_DSC', 'Path for uploading images'); |
|
| 171 | 171 | |
| 172 | 172 | //Preferences |
| 173 | -define('CO_' . $moduleDirNameUpper . '_' . 'TRUNCATE_LENGTH', 'Number of Characters to truncate to the long text field'); |
|
| 174 | -define('CO_' . $moduleDirNameUpper . '_' . 'TRUNCATE_LENGTH_DESC', 'Set the maximum number of characters to truncate the long text fields'); |
|
| 173 | +define('CO_'.$moduleDirNameUpper.'_'.'TRUNCATE_LENGTH', 'Number of Characters to truncate to the long text field'); |
|
| 174 | +define('CO_'.$moduleDirNameUpper.'_'.'TRUNCATE_LENGTH_DESC', 'Set the maximum number of characters to truncate the long text fields'); |
|
| 175 | 175 | |
| 176 | 176 | //Module Stats |
| 177 | -define('CO_' . $moduleDirNameUpper . '_' . 'STATS_SUMMARY', 'Module Statistics'); |
|
| 178 | -define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_CATEGORIES', 'Categories:'); |
|
| 179 | -define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_ITEMS', 'Items'); |
|
| 180 | -define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_OFFLINE', 'Offline'); |
|
| 181 | -define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_PUBLISHED', 'Published'); |
|
| 182 | -define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_REJECTED', 'Rejected'); |
|
| 183 | -define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_SUBMITTED', 'Submitted'); |
|
| 177 | +define('CO_'.$moduleDirNameUpper.'_'.'STATS_SUMMARY', 'Module Statistics'); |
|
| 178 | +define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_CATEGORIES', 'Categories:'); |
|
| 179 | +define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_ITEMS', 'Items'); |
|
| 180 | +define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_OFFLINE', 'Offline'); |
|
| 181 | +define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_PUBLISHED', 'Published'); |
|
| 182 | +define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_REJECTED', 'Rejected'); |
|
| 183 | +define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_SUBMITTED', 'Submitted'); |
|
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | //Help |
| 36 | 36 | define('_MI_GROUPS_DIRNAME', basename(dirname(dirname(__DIR__)))); |
| 37 | -define('_MI_GROUPS_HELP_HEADER', __DIR__ . '/help/helpheader.tpl'); |
|
| 37 | +define('_MI_GROUPS_HELP_HEADER', __DIR__.'/help/helpheader.tpl'); |
|
| 38 | 38 | define('_MI_GROUPS_BACK_2_ADMIN', 'Back to Administration of '); |
| 39 | 39 | define('_MI_GROUPS_OVERVIEW', 'Overview'); |
| 40 | 40 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * @since |
| 17 | 17 | * @author XOOPS Development Team |
| 18 | 18 | */ |
| 19 | -include dirname(__DIR__) . '/preloads/autoloader.php'; |
|
| 19 | +include dirname(__DIR__).'/preloads/autoloader.php'; |
|
| 20 | 20 | |
| 21 | 21 | $moduleDirName = basename(dirname(__DIR__)); |
| 22 | 22 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName |
@@ -42,33 +42,33 @@ discard block |
||
| 42 | 42 | $pathModIcon32 = $helper->getModule()->getInfo('modicons32'); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | -if (!defined($moduleDirNameUpper . '_CONSTANTS_DEFINED')) { |
|
| 46 | - define($moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__))); |
|
| 47 | - define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/'); |
|
| 48 | - define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/'); |
|
| 49 | - define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . $moduleDirName . '/'); |
|
| 50 | - define($moduleDirNameUpper . '_IMAGE_URL', constant($moduleDirNameUpper . '_URL') . '/assets/images/'); |
|
| 51 | - define($moduleDirNameUpper . '_IMAGE_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/assets/images'); |
|
| 52 | - define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin/'); |
|
| 53 | - define($moduleDirNameUpper . '_ADMIN_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/admin/'); |
|
| 54 | - define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php'); |
|
| 45 | +if (!defined($moduleDirNameUpper.'_CONSTANTS_DEFINED')) { |
|
| 46 | + define($moduleDirNameUpper.'_DIRNAME', basename(dirname(__DIR__))); |
|
| 47 | + define($moduleDirNameUpper.'_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/'); |
|
| 48 | + define($moduleDirNameUpper.'_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/'); |
|
| 49 | + define($moduleDirNameUpper.'_URL', XOOPS_URL.'/modules/'.$moduleDirName.'/'); |
|
| 50 | + define($moduleDirNameUpper.'_IMAGE_URL', constant($moduleDirNameUpper.'_URL').'/assets/images/'); |
|
| 51 | + define($moduleDirNameUpper.'_IMAGE_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/assets/images'); |
|
| 52 | + define($moduleDirNameUpper.'_ADMIN_URL', constant($moduleDirNameUpper.'_URL').'/admin/'); |
|
| 53 | + define($moduleDirNameUpper.'_ADMIN_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/admin/'); |
|
| 54 | + define($moduleDirNameUpper.'_ADMIN', constant($moduleDirNameUpper.'_URL').'/admin/index.php'); |
|
| 55 | 55 | // define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png'); |
| 56 | - define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash |
|
| 57 | - define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash |
|
| 58 | - define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', $pathIcon32 . '/xoopsmicrobutton.gif'); |
|
| 59 | - define($moduleDirNameUpper . '_CONSTANTS_DEFINED', 1); |
|
| 56 | + define($moduleDirNameUpper.'_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.$moduleDirName); // WITHOUT Trailing slash |
|
| 57 | + define($moduleDirNameUpper.'_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.$moduleDirName); // WITHOUT Trailing slash |
|
| 58 | + define($moduleDirNameUpper.'_AUTHOR_LOGOIMG', $pathIcon32.'/xoopsmicrobutton.gif'); |
|
| 59 | + define($moduleDirNameUpper.'_CONSTANTS_DEFINED', 1); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | $icons = [ |
| 63 | - 'edit' => "<img src='" . $pathIcon16 . "/edit.png' alt=" . _EDIT . "' align='middle'>", |
|
| 64 | - 'delete' => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _DELETE . "' align='middle'>", |
|
| 65 | - 'clone' => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _CLONE . "' align='middle'>", |
|
| 66 | - 'preview' => "<img src='" . $pathIcon16 . "/view.png' alt='" . _PREVIEW . "' align='middle'>", |
|
| 67 | - 'print' => "<img src='" . $pathIcon16 . "/printer.png' alt='" . _CLONE . "' align='middle'>", |
|
| 68 | - 'pdf' => "<img src='" . $pathIcon16 . "/pdf.png' alt='" . _CLONE . "' align='middle'>", |
|
| 69 | - 'add' => "<img src='" . $pathIcon16 . "/add.png' alt='" . _ADD . "' align='middle'>", |
|
| 70 | - '0' => "<img src='" . $pathIcon16 . "/0.png' alt='" . 0 . "' align='middle'>", |
|
| 71 | - '1' => "<img src='" . $pathIcon16 . "/1.png' alt='" . 1 . "' align='middle'>", |
|
| 63 | + 'edit' => "<img src='".$pathIcon16."/edit.png' alt="._EDIT."' align='middle'>", |
|
| 64 | + 'delete' => "<img src='".$pathIcon16."/delete.png' alt='"._DELETE."' align='middle'>", |
|
| 65 | + 'clone' => "<img src='".$pathIcon16."/editcopy.png' alt='"._CLONE."' align='middle'>", |
|
| 66 | + 'preview' => "<img src='".$pathIcon16."/view.png' alt='"._PREVIEW."' align='middle'>", |
|
| 67 | + 'print' => "<img src='".$pathIcon16."/printer.png' alt='"._CLONE."' align='middle'>", |
|
| 68 | + 'pdf' => "<img src='".$pathIcon16."/pdf.png' alt='"._CLONE."' align='middle'>", |
|
| 69 | + 'add' => "<img src='".$pathIcon16."/add.png' alt='"._ADD."' align='middle'>", |
|
| 70 | + '0' => "<img src='".$pathIcon16."/0.png' alt='".0."' align='middle'>", |
|
| 71 | + '1' => "<img src='".$pathIcon16."/1.png' alt='".1."' align='middle'>", |
|
| 72 | 72 | ]; |
| 73 | 73 | |
| 74 | 74 | $debug = false; |
@@ -81,12 +81,12 @@ discard block |
||
| 81 | 81 | $GLOBALS['xoopsTpl'] = new \XoopsTpl(); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | -$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL . '/modules/' . $moduleDirName); |
|
| 84 | +$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL.'/modules/'.$moduleDirName); |
|
| 85 | 85 | // Local icons path |
| 86 | 86 | if (is_object($helper->getModule())) { |
| 87 | 87 | $pathModIcon16 = $helper->getModule()->getInfo('modicons16'); |
| 88 | 88 | $pathModIcon32 = $helper->getModule()->getInfo('modicons32'); |
| 89 | 89 | |
| 90 | - $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . $pathModIcon16); |
|
| 90 | + $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL.'/modules/'.$moduleDirName.'/'.$pathModIcon16); |
|
| 91 | 91 | $GLOBALS['xoopsTpl']->assign('pathModIcon32', $pathModIcon32); |
| 92 | 92 | } |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | { |
| 73 | 73 | $ret = false; |
| 74 | 74 | |
| 75 | - $class = __NAMESPACE__ . '\\' . $name . 'Handler'; |
|
| 75 | + $class = __NAMESPACE__.'\\'.$name.'Handler'; |
|
| 76 | 76 | if (!class_exists($class)) { |
| 77 | 77 | throw new \RuntimeException("Class '$class' not found"); |
| 78 | 78 | } |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | require $GLOBALS['xoops']->path('class/template.php'); |
| 73 | 73 | $breadcrumbTpl = new \XoopsTpl(); |
| 74 | 74 | $breadcrumbTpl->assign('breadcrumb', $this->bread); |
| 75 | - $html = $breadcrumbTpl->fetch('db:' . $this->dirname . '_common_breadcrumb.tpl'); |
|
| 75 | + $html = $breadcrumbTpl->fetch('db:'.$this->dirname.'_common_breadcrumb.tpl'); |
|
| 76 | 76 | unset($breadcrumbTpl); |
| 77 | 77 | |
| 78 | 78 | return $html; |
@@ -36,19 +36,19 @@ discard block |
||
| 36 | 36 | // $query = $GLOBALS['xoopsDB']->query($sql); |
| 37 | 37 | // list($meta) = $GLOBALS['xoopsDB']->fetchRow($query); |
| 38 | 38 | $html .= '<fieldset>'; |
| 39 | - $html .= "<legend style='font-weight: bold; color: #900;'>" . constant('CO_' . $moduleDirNameUpper . '_IMAGEINFO') . '</legend>'; |
|
| 39 | + $html .= "<legend style='font-weight: bold; color: #900;'>".constant('CO_'.$moduleDirNameUpper.'_IMAGEINFO').'</legend>'; |
|
| 40 | 40 | $html .= "<div style='padding: 8px;'>"; |
| 41 | 41 | // $html .= '<div>' . constant('CO_' . $moduleDirNameUpper . '_METAVERSION') . $meta . "</div>"; |
| 42 | 42 | // $html .= "<br>"; |
| 43 | 43 | // $html .= "<br>"; |
| 44 | - $html .= '<div>' . constant('CO_' . $moduleDirNameUpper . '_SPHPINI') . '</div>'; |
|
| 44 | + $html .= '<div>'.constant('CO_'.$moduleDirNameUpper.'_SPHPINI').'</div>'; |
|
| 45 | 45 | $html .= '<ul>'; |
| 46 | 46 | |
| 47 | - $gdlib = function_exists('gd_info') ? '<span style="color: #008000;">' . constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: #ff0000;">' . constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>'; |
|
| 48 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib; |
|
| 47 | + $gdlib = function_exists('gd_info') ? '<span style="color: #008000;">'.constant('CO_'.$moduleDirNameUpper.'_GDON').'</span>' : '<span style="color: #ff0000;">'.constant('CO_'.$moduleDirNameUpper.'_GDOFF').'</span>'; |
|
| 48 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS').$gdlib; |
|
| 49 | 49 | if (function_exists('gd_info')) { |
| 50 | 50 | if (true === ($gdlib = gd_info())) { |
| 51 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>'; |
|
| 51 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_GDLIBVERSION').'<b>'.$gdlib['GD Version'].'</b>'; |
|
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | |
@@ -58,18 +58,18 @@ discard block |
||
| 58 | 58 | // $registerglobals = (!ini_get('register_globals')) ? "<span style=\"color: #008000;\">" . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>' : "<span style=\"color: #ff0000;\">" . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>'; |
| 59 | 59 | // $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals; |
| 60 | 60 | |
| 61 | - $downloads = ini_get('file_uploads') ? '<span style="color: #008000;">' . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: #ff0000;">' . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>'; |
|
| 62 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads; |
|
| 61 | + $downloads = ini_get('file_uploads') ? '<span style="color: #008000;">'.constant('CO_'.$moduleDirNameUpper.'_ON').'</span>' : '<span style="color: #ff0000;">'.constant('CO_'.$moduleDirNameUpper.'_OFF').'</span>'; |
|
| 62 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS').$downloads; |
|
| 63 | 63 | |
| 64 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: #0000ff;">' . ini_get('upload_max_filesize') . '</span></b>'; |
|
| 65 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: #0000ff;">' . ini_get('post_max_size') . '</span></b>'; |
|
| 66 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT') . ' <b><span style="color: #0000ff;">' . ini_get('memory_limit') . '</span></b>'; |
|
| 64 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE').' <b><span style="color: #0000ff;">'.ini_get('upload_max_filesize').'</span></b>'; |
|
| 65 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE').' <b><span style="color: #0000ff;">'.ini_get('post_max_size').'</span></b>'; |
|
| 66 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT').' <b><span style="color: #0000ff;">'.ini_get('memory_limit').'</span></b>'; |
|
| 67 | 67 | $html .= '</ul>'; |
| 68 | 68 | $html .= '<ul>'; |
| 69 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERPATH') . ' <b>' . XOOPS_ROOT_PATH . '</b>'; |
|
| 69 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_SERVERPATH').' <b>'.XOOPS_ROOT_PATH.'</b>'; |
|
| 70 | 70 | $html .= '</ul>'; |
| 71 | 71 | $html .= '<br>'; |
| 72 | - $html .= constant('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC') . ''; |
|
| 72 | + $html .= constant('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC').''; |
|
| 73 | 73 | $html .= '</div>'; |
| 74 | 74 | $html .= '</fieldset><br>'; |
| 75 | 75 | |
@@ -50,11 +50,11 @@ discard block |
||
| 50 | 50 | { |
| 51 | 51 | if ($considerHtml) { |
| 52 | 52 | // if the plain text is shorter than the maximum length, return the whole text |
| 53 | - if (mb_strlen(preg_replace('/<.*?' . '>/', '', $text)) <= $length) { |
|
| 53 | + if (mb_strlen(preg_replace('/<.*?'.'>/', '', $text)) <= $length) { |
|
| 54 | 54 | return $text; |
| 55 | 55 | } |
| 56 | 56 | // splits all html-tags to scanable lines |
| 57 | - preg_match_all('/(<.+?' . '>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER); |
|
| 57 | + preg_match_all('/(<.+?'.'>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER); |
|
| 58 | 58 | $total_length = mb_strlen($ending); |
| 59 | 59 | $open_tags = []; |
| 60 | 60 | $truncate = ''; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | unset($open_tags[$pos]); |
| 73 | 73 | } |
| 74 | 74 | // if tag is an opening tag |
| 75 | - } elseif (preg_match('/^<\s*([^\s>!]+).*?' . '>$/s', $line_matchings[1], $tag_matchings)) { |
|
| 75 | + } elseif (preg_match('/^<\s*([^\s>!]+).*?'.'>$/s', $line_matchings[1], $tag_matchings)) { |
|
| 76 | 76 | // add tag to the beginning of $open_tags list |
| 77 | 77 | array_unshift($open_tags, mb_strtolower($tag_matchings[1])); |
| 78 | 78 | } |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | if ($considerHtml) { |
| 131 | 131 | // close all unclosed html-tags |
| 132 | 132 | foreach ($open_tags as $tag) { |
| 133 | - $truncate .= '</' . $tag . '>'; |
|
| 133 | + $truncate .= '</'.$tag.'>'; |
|
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | |