| Revision 15211,
1.1 KB
checked in by Alexander Trofimov, 12 months ago
(diff) |
|
Code cleaning:
- converting new lines to \n
- deleting spaces at the end of every line
- converting all tabs to 4 spaces
- automated script for future cleaning was added
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * @package Dolphin Core |
|---|
| 4 | * @copyright Copyright (c) BoonEx Pty Limited - http://www.boonex.com/ |
|---|
| 5 | * @license CC-BY - http://creativecommons.org/licenses/by/3.0/ |
|---|
| 6 | */ |
|---|
| 7 | |
|---|
| 8 | require_once('./inc/header.inc.php'); |
|---|
| 9 | require_once(BX_DIRECTORY_PATH_INC . "languages.inc.php"); |
|---|
| 10 | require_once(BX_DIRECTORY_PATH_INC . "params.inc.php"); |
|---|
| 11 | require_once(BX_DIRECTORY_PATH_INC . "design.inc.php"); |
|---|
| 12 | |
|---|
| 13 | $sSys = isset($_REQUEST['sys']) ? $_REQUEST['sys'] : ''; |
|---|
| 14 | $sAction = isset($_REQUEST['action']) && preg_match ('/^[A-Za-z_-]+$/', $_REQUEST['action']) ? $_REQUEST['action'] : ''; |
|---|
| 15 | $iId = (int)$_REQUEST['id']; |
|---|
| 16 | |
|---|
| 17 | bx_import ('BxTemplCmtsView'); |
|---|
| 18 | $aSystems =& BxDolCmts::getSystems (); |
|---|
| 19 | |
|---|
| 20 | if ($sSys && $sAction && $iId && isset($aSystems[$sSys])) { |
|---|
| 21 | |
|---|
| 22 | $oCmts = null; |
|---|
| 23 | if ($aSystems[$sSys]['class_name']) { |
|---|
| 24 | require_once (BX_DIRECTORY_PATH_ROOT . $aSystems[$sSys]['class_file']); |
|---|
| 25 | $sClassName = $aSystems[$sSys]['class_name']; |
|---|
| 26 | $oCmts = new $sClassName($sSys, $iId, true); |
|---|
| 27 | } else { |
|---|
| 28 | $oCmts = new BxTemplCmtsView($sSys, $iId, true); |
|---|
| 29 | } |
|---|
| 30 | |
|---|
| 31 | $sMethod = 'action' . $sAction; |
|---|
| 32 | echo $oCmts->$sMethod(); |
|---|
| 33 | |
|---|
| 34 | } |
|---|
| 35 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.