Skip to content

Commit 2eff92f

Browse files
committed
Added check for -JEXEC
(and escape for phpcs)
1 parent 010f37a commit 2eff92f

File tree

20 files changed

+83
-32
lines changed

20 files changed

+83
-32
lines changed

src/administrator/components/com_ccm/src/Controller/CmsController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
*/
99

1010
namespace Joomla\Component\CCM\Administrator\Controller;
11+
12+
// phpcs:disable PSR1.Files.SideEffects
13+
\defined('_JEXEC') or die;
14+
// phpcs:enable PSR1.Files.SideEffects
15+
1116
use Joomla\CMS\MVC\Controller\FormController;
1217
class CmsController extends FormController
1318
{

src/administrator/components/com_ccm/src/Controller/CmssController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
namespace Joomla\Component\CCM\Administrator\Controller;
1111

12-
defined('_JEXEC') or die;
12+
// phpcs:disable PSR1.Files.SideEffects
13+
\defined('_JEXEC') or die;
14+
// phpcs:enable PSR1.Files.SideEffects
1315

1416
use Joomla\CMS\MVC\Controller\ListController;
1517
use Joomla\CMS\Router\Route as JRoute;

src/administrator/components/com_ccm/src/Controller/DisplayController.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
* @license GNU General Public License version 2 or later; see LICENSE.txt
88
*/
99

10-
// first file the Joomla! MVC checks after the component bootup
10+
1111
namespace Joomla\Component\CCM\Administrator\Controller;
12+
13+
// phpcs:disable PSR1.Files.SideEffects
14+
\defined('_JEXEC') or die;
15+
// phpcs:enable PSR1.Files.SideEffects
16+
1217
use Joomla\CMS\MVC\Controller\BaseController;
1318

1419
class DisplayController extends BaseController

src/administrator/components/com_ccm/src/Controller/MigrationController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
namespace Joomla\Component\CCM\Administrator\Controller;
1111

12+
// phpcs:disable PSR1.Files.SideEffects
13+
\defined('_JEXEC') or die;
14+
// phpcs:enable PSR1.Files.SideEffects
15+
1216
use Joomla\CMS\MVC\Controller\BaseController;
1317

1418
class MigrationController extends BaseController

src/administrator/components/com_ccm/src/Extension/CCMComponent.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
namespace Joomla\Component\CCM\Administrator\Extension;
1111

12-
defined('_JEXEC') or die;
12+
// phpcs:disable PSR1.Files.SideEffects
13+
\defined('_JEXEC') or die;
14+
// phpcs:enable PSR1.Files.SideEffects
1315

1416
use Joomla\CMS\Extension\BootableExtensionInterface;
1517
use Joomla\CMS\Extension\MVCComponent;

src/administrator/components/com_ccm/src/Fields/CcmField.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
*/
99

1010
namespace Joomla\Component\CCM\Administrator\Fields;
11+
12+
// phpcs:disable PSR1.Files.SideEffects
13+
\defined('_JEXEC') or die;
14+
// phpcs:enable PSR1.Files.SideEffects
15+
1116
use Joomla\CMS\Factory;
1217
use Joomla\CMS\Form\Field\ListField;
1318

14-
// content in wordpress & text in joomla
19+
// content in WordPress & text in Joomla
1520
// what if data is null (e.g. image), then I can't get its type
1621

17-
// prefixed the name of our field with our company name.
18-
// This helps prevent clashes with other field types defined by other developers.
1922
class CcmField extends ListField {
2023
// define a custom form field
2124
// the name of the type for our new field

src/administrator/components/com_ccm/src/Fields/CmsField.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
*/
99

1010
namespace Joomla\Component\CCM\Administrator\Fields;
11+
12+
// phpcs:disable PSR1.Files.SideEffects
13+
\defined('_JEXEC') or die;
14+
// phpcs:enable PSR1.Files.SideEffects
15+
1116
use Joomla\CMS\Form\Field\ListField;
1217

13-
// prefixed the name of our field with our company name.
14-
// This helps prevent clashes with other field types defined by other developers.
1518
class CmsField extends ListField { // this should be named CmsNameField
1619
// define a custom form field
1720
// the name of the type for our new field

src/administrator/components/com_ccm/src/Fields/CmsObjTypeField.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
*/
99

1010
namespace Joomla\Component\CCM\Administrator\Fields;
11+
12+
// phpcs:disable PSR1.Files.SideEffects
13+
\defined('_JEXEC') or die;
14+
// phpcs:enable PSR1.Files.SideEffects
15+
1116
use Joomla\CMS\Form\Field\ListField;
1217

13-
// prefixed the name of our field with our company name.
14-
// This helps prevent clashes with other field types defined by other developers.
1518
class CmsObjTypeField extends ListField {
1619
// define a custom form field
1720
// the name of the type for our new field

src/administrator/components/com_ccm/src/Helper/MigrationHelper.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
namespace Joomla\Component\CCM\Administrator\Helper;
1111

12+
// phpcs:disable PSR1.Files.SideEffects
13+
\defined('_JEXEC') or die;
14+
// phpcs:enable PSR1.Files.SideEffects
15+
1216
use Joomla\CMS\Http\HttpFactory;
1317

1418
/**

src/administrator/components/com_ccm/src/Model/CmsModel.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
use Joomla\CMS\Http\HttpFactory;
1414
use Joomla\CMS\MVC\Model\AdminModel;
1515

16+
// phpcs:disable PSR1.Files.SideEffects
1617
\defined('_JEXEC') or die;
18+
// phpcs:enable PSR1.Files.SideEffects
1719

1820
//cms type = wordpress, joomla, drupal, etc.
1921
//their APIs

0 commit comments

Comments
 (0)