These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
0 ignored issues
–
show
|
|||
2 | /* |
||
3 | You may not change or alter any portion of this comment or credits |
||
4 | of supporting developers from this source code or any supporting source code |
||
5 | which is considered copyrighted (c) material of the original comment or credit authors. |
||
6 | |||
7 | This program is distributed in the hope that it will be useful, |
||
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||
10 | */ |
||
11 | /** |
||
12 | * contact module for xoops |
||
13 | * |
||
14 | * @copyright XOOPS Project (https://xoops.org) |
||
15 | * @license GPL 2.0 or later |
||
16 | * @package contact |
||
17 | * @since 1.0 |
||
18 | * @min_xoops 2.5.7 |
||
19 | * @author Goffy (xoops.wedega.com) - Email:<[email protected]> - Website:<http://xoops.wedega.com> |
||
20 | */ |
||
21 | defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
||
22 | if (!defined('CONTACT_MODULE_PATH')) { |
||
23 | define('CONTACT_DIRNAME', basename(dirname(__DIR__))); |
||
24 | define('CONTACT_PATH', XOOPS_ROOT_PATH.'/modules/'.CONTACT_DIRNAME); |
||
25 | define('CONTACT_URL', XOOPS_URL.'/modules/'.CONTACT_DIRNAME); |
||
26 | define('CONTACT_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.CONTACT_DIRNAME); |
||
27 | define('CONTACT_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.CONTACT_DIRNAME); |
||
28 | define('CONTACT_IMAGE_PATH', CONTACT_PATH.'/assets/images'); |
||
29 | define('CONTACT_IMAGE_URL', CONTACT_URL.'/assets/images/'); |
||
30 | define('CONTACT_ADMIN', CONTACT_URL . '/admin/index.php'); |
||
31 | } |
||
32 | // module information |
||
33 | $copyright = "<a href='http://xoops.wedega.com' title='WEDEGA Webdesign Gabor' target='_blank'> |
||
34 | <img src='". $local_logo."' alt='WEDEGA Webdesign Gabor' /></a>"; |
||
35 | |||
36 | require_once XOOPS_ROOT_PATH.'/class/xoopsrequest.php'; |
||
37 | require_once CONTACT_PATH.'/class/helper.php'; |
||
38 | require_once CONTACT_PATH.'/include/functions.php'; |
||
39 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.