mambax7 /
instruction
This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | use Xmf\Request; |
||
| 4 | |||
| 5 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
||
|
0 ignored issues
–
show
|
|||
| 6 | |||
| 7 | xoops_load('XoopsEditorHandler'); |
||
| 8 | $editorHandler = \XoopsEditorHandler::getInstance(); |
||
| 9 | $moduleDirName = basename(__DIR__); |
||
| 10 | $xoops_url = parse_url(XOOPS_URL); |
||
| 11 | |||
| 12 | $modversion = [ |
||
| 13 | 'version' => 1.07, |
||
| 14 | 'module_status' => 'RC1', |
||
| 15 | 'release_date' => '2017/10/04', |
||
| 16 | 'name' => _MI_INSTRUCTION_NAME, |
||
| 17 | 'description' => _MI_INSTRUCTION_DESC, |
||
| 18 | 'credits' => 'radio-hobby.org, www.shmel.org', |
||
| 19 | 'author' => 'andrey3761, Mamba, Aerograf', |
||
| 20 | 'nickname' => '', |
||
| 21 | 'help' => 'page=help', |
||
| 22 | 'license' => 'GNU GPL 2.0', |
||
| 23 | 'license_url' => 'www.gnu.org/licenses/gpl-2.0.html/', |
||
| 24 | 'official' => 0, |
||
| 25 | 'image' => 'assets/images/logoModule.png', |
||
| 26 | 'dirname' => $moduleDirName, |
||
| 27 | 'modicons16' => 'assets/images/icons/16', |
||
| 28 | 'modicons32' => 'assets/images/icons/32', |
||
| 29 | // О модуле |
||
| 30 | 'module_website_url' => 'radio-hobby.org', |
||
| 31 | 'module_website_name' => 'radio-hobby.org', |
||
| 32 | |||
| 33 | 'author_website_url' => 'radio-hobby.org', |
||
| 34 | 'author_website_name' => 'andrey3761', |
||
| 35 | 'min_php' => '5.5', |
||
| 36 | 'min_xoops' => '2.5.8', |
||
| 37 | 'min_admin' => '1.1', |
||
| 38 | 'min_db' => ['mysql' => '5.5'], |
||
| 39 | // Файл базы данных |
||
| 40 | 'sqlfile' => ['mysql' => 'sql/mysql.sql'], |
||
| 41 | // Таблицы |
||
| 42 | 'tables' => [ |
||
| 43 | $moduleDirName . '_cat', |
||
| 44 | $moduleDirName . '_instr', |
||
| 45 | $moduleDirName . '_page' |
||
| 46 | ], |
||
| 47 | // Имеет админку |
||
| 48 | 'hasAdmin' => 1, |
||
| 49 | 'adminindex' => 'admin/index.php', |
||
| 50 | 'adminmenu' => 'admin/menu.php', |
||
| 51 | 'system_menu' => 1, |
||
| 52 | // Меню |
||
| 53 | 'hasMain' => 1, |
||
| 54 | // Search |
||
| 55 | 'hasSearch' => 1, |
||
| 56 | 'search' => [ |
||
| 57 | 'file' => 'include/search.inc.php', |
||
| 58 | 'func' => $moduleDirName . '_search', |
||
| 59 | ], |
||
| 60 | ]; |
||
| 61 | // Help files |
||
| 62 | $modversion['helpsection'] = [ |
||
| 63 | ['name' => _MI_INSTRUCTION_HELP_OVERVIEW, 'link' => 'page=help'], |
||
| 64 | ['name' => _MI_INSTRUCTION_DISCLAIMER, 'link' => 'page=disclaimer'], |
||
| 65 | ['name' => _MI_INSTRUCTION_LICENSE, 'link' => 'page=license'], |
||
| 66 | ['name' => _MI_INSTRUCTION_SUPPORT, 'link' => 'page=support'], |
||
| 67 | ]; |
||
| 68 | |||
| 69 | // Comments |
||
| 70 | $modversion['hasComments'] = 1; |
||
| 71 | $modversion['comments']['itemName'] = 'id'; |
||
| 72 | $modversion['comments']['pageName'] = 'page.php'; |
||
| 73 | $modversion['comments']['callbackFile'] = 'include/comment_functions.php'; |
||
| 74 | $modversion['comments']['callback']['approve'] = $moduleDirName . '_com_approve'; |
||
| 75 | $modversion['comments']['callback']['update'] = $moduleDirName . '_com_update'; |
||
| 76 | |||
| 77 | // Templates |
||
| 78 | $modversion['templates'] = [ |
||
| 79 | [ |
||
| 80 | 'file' => 'admin/' . $moduleDirName . '_admin_index.tpl', |
||
| 81 | 'description' => '' |
||
| 82 | ], |
||
| 83 | [ |
||
| 84 | 'file' => 'admin/' . $moduleDirName . '_admin_cat.tpl', |
||
| 85 | 'description' => '' |
||
| 86 | ], |
||
| 87 | [ |
||
| 88 | 'file' => 'admin/' . $moduleDirName . '_admin_editcat.tpl', |
||
| 89 | 'description' => '' |
||
| 90 | ], |
||
| 91 | [ |
||
| 92 | 'file' => 'admin/' . $moduleDirName . '_admin_savecat.tpl', |
||
| 93 | 'description' => '' |
||
| 94 | ], |
||
| 95 | [ |
||
| 96 | 'file' => 'admin/' . $moduleDirName . '_admin_viewcat.tpl', |
||
| 97 | 'description' => '' |
||
| 98 | ], |
||
| 99 | [ |
||
| 100 | 'file' => 'admin/' . $moduleDirName . '_admin_instr.tpl', |
||
| 101 | 'description' => '' |
||
| 102 | ], |
||
| 103 | [ |
||
| 104 | 'file' => 'admin/' . $moduleDirName . '_admin_editinstr.tpl', |
||
| 105 | 'description' => '' |
||
| 106 | ], |
||
| 107 | [ |
||
| 108 | 'file' => 'admin/' . $moduleDirName . '_admin_saveinstr.tpl', |
||
| 109 | 'description' => '' |
||
| 110 | ], |
||
| 111 | [ |
||
| 112 | 'file' => 'admin/' . $moduleDirName . '_admin_viewinstr.tpl', |
||
| 113 | 'description' => '' |
||
| 114 | ], |
||
| 115 | [ |
||
| 116 | 'file' => 'admin/' . $moduleDirName . '_admin_editpage.tpl', |
||
| 117 | 'description' => '' |
||
| 118 | ], |
||
| 119 | [ |
||
| 120 | 'file' => 'admin/' . $moduleDirName . '_admin_savepage.tpl', |
||
| 121 | 'description' => '' |
||
| 122 | ], |
||
| 123 | [ |
||
| 124 | 'file' => 'admin/' . $moduleDirName . '_admin_perm.tpl', |
||
| 125 | 'description' => '' |
||
| 126 | ], |
||
| 127 | [ |
||
| 128 | 'file' => 'admin/' . $moduleDirName . '_admin_about.tpl', |
||
| 129 | 'description' => '' |
||
| 130 | ], |
||
| 131 | [ |
||
| 132 | 'file' => $moduleDirName . '_page.tpl', |
||
| 133 | 'description' => '' |
||
| 134 | ], |
||
| 135 | [ |
||
| 136 | 'file' => $moduleDirName . '_instr.tpl', |
||
| 137 | 'description' => '' |
||
| 138 | ], |
||
| 139 | [ |
||
| 140 | 'file' => $moduleDirName . '_index.tpl', |
||
| 141 | 'description' => '' |
||
| 142 | ], |
||
| 143 | [ |
||
| 144 | 'file' => $moduleDirName . '_editpage.tpl', |
||
| 145 | 'description' => '' |
||
| 146 | ], |
||
| 147 | [ |
||
| 148 | 'file' => $moduleDirName . '_savepage.tpl', |
||
| 149 | 'description' => '' |
||
| 150 | ], |
||
| 151 | ]; |
||
| 152 | // Конфигурация |
||
| 153 | $modversion['config'][] = [ |
||
| 154 | 'name' => 'form_options', |
||
| 155 | 'title' => '_MI_INSTRUCTION_FORM_OPTIONS', |
||
| 156 | 'description' => '_MI_INSTRUCTION_FORM_OPTIONS_DESC', |
||
| 157 | 'formtype' => 'select', |
||
| 158 | 'valuetype' => 'text', |
||
| 159 | 'default' => 'dhtml', |
||
| 160 | 'options' => array_flip($editorHandler->getList()) |
||
| 161 | ]; |
||
| 162 | $modversion['config'][] = [ |
||
| 163 | 'name' => 'perpageadmin', |
||
| 164 | 'title' => '_MI_INSTRUCTION_PERPAGEADMIN', |
||
| 165 | 'description' => '_MI_INSTRUCTION_PERPAGEADMINDSC', |
||
| 166 | 'formtype' => 'textbox', |
||
| 167 | 'valuetype' => 'int', |
||
| 168 | 'default' => 20 |
||
| 169 | ]; |
||
| 170 | $modversion['config'][] = [ |
||
| 171 | 'name' => 'perpagemain', |
||
| 172 | 'title' => '_MI_INSTRUCTION_PERPAGEMAIN', |
||
| 173 | 'description' => '_MI_INSTRUCTION_PERPAGEMAINDSC', |
||
| 174 | 'formtype' => 'textbox', |
||
| 175 | 'valuetype' => 'int', |
||
| 176 | 'default' => 20 |
||
| 177 | ]; |
||
| 178 | // Теги |
||
| 179 | $modversion['config'][] = [ |
||
| 180 | 'name' => 'usetag', |
||
| 181 | 'title' => '_MI_INSTRUCTION_USETAG', |
||
| 182 | 'description' => '_MI_INSTRUCTION_USETAGDSC', |
||
| 183 | 'formtype' => 'yesno', |
||
| 184 | 'valuetype' => 'int', |
||
| 185 | 'default' => 0 |
||
| 186 | ]; |
||
| 187 | // Оценки |
||
| 188 | $modversion['config'][] = [ |
||
| 189 | 'name' => 'userat', |
||
| 190 | 'title' => '_MI_INSTRUCTION_USERAT', |
||
| 191 | 'description' => '_MI_INSTRUCTION_USERATDSC', |
||
| 192 | 'formtype' => 'yesno', |
||
| 193 | 'valuetype' => 'int', |
||
| 194 | 'default' => 0 |
||
| 195 | ]; |
||
| 196 | |||
| 197 | // Блоки |
||
| 198 | // Блок последних страниц |
||
| 199 | $modversion['blocks'][] = [ |
||
| 200 | 'file' => 'instr_lastpage.php', |
||
| 201 | 'name' => _MI_INSTR_BLOCK_LASTPAGE, |
||
| 202 | 'description' => _MI_INSTR_BLOCK_LASTPAGE_DESC, |
||
| 203 | 'show_func' => 'b_instr_lastpage_show', |
||
| 204 | 'edit_func' => 'b_instr_lastpage_edit', |
||
| 205 | 'options' => '10|20', |
||
| 206 | 'template' => $moduleDirName . '_block_lastpage.tpl' |
||
| 207 | ]; |
||
| 208 | // Блок последних инструкций |
||
| 209 | $modversion['blocks'][] = [ |
||
| 210 | 'file' => 'instr_lastinstr.php', |
||
| 211 | 'name' => _MI_INSTR_BLOCK_LASTINSTR, |
||
| 212 | 'description' => _MI_INSTR_BLOCK_LASTINSTR_DESC, |
||
| 213 | 'show_func' => 'b_instr_lastinstr_show', |
||
| 214 | 'edit_func' => 'b_instr_lastinstr_edit', |
||
| 215 | 'options' => '10|20', |
||
| 216 | 'template' => $moduleDirName . '_block_lastinstr.tpl' |
||
| 217 | ]; |
||
| 218 | |||
| 219 | // Notification |
||
| 220 | $modversion['hasNotification'] = 0; |
||
| 221 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.