Completed
Pull Request — master (#3788)
by Craig
01:31
created
src/system/BlocksModule/Api/AdminApi.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -411,11 +411,11 @@
 block discarded – undo
411 411
 
412 412
         // delete placements of the position to be deleted
413 413
         $query = $this->entityManager->createQueryBuilder()
414
-                                     ->delete()
415
-                                     ->from('ZikulaBlocksModule:BlockPlacementEntity', 'p')
416
-                                     ->where('p.pid = :pid')
417
-                                     ->setParameter('pid', $position['pid'])
418
-                                     ->getQuery();
414
+                                        ->delete()
415
+                                        ->from('ZikulaBlocksModule:BlockPlacementEntity', 'p')
416
+                                        ->where('p.pid = :pid')
417
+                                        ->setParameter('pid', $position['pid'])
418
+                                        ->getQuery();
419 419
 
420 420
         $query->getResult();
421 421
 
Please login to merge, or discard this patch.
src/system/BlocksModule/Twig/Extension/BlocksExtension.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,8 @@
 block discarded – undo
153 153
             $blockProperties['title'] = $block->getTitle();
154 154
             $blockProperties['position'] = $positionName;
155 155
             $content = $blockInstance->display($blockProperties);
156
-        } elseif ($blockInstance instanceof \Zikula_Controller_AbstractBlock) { // @todo remove at Core-2.0
156
+        } elseif ($blockInstance instanceof \Zikula_Controller_AbstractBlock) {
157
+// @todo remove at Core-2.0
157 158
             if (!\ModUtil::available($block->getModule()->getName())) {
158 159
                 return '';
159 160
             }
Please login to merge, or discard this patch.
src/system/BlocksModule/Block/PendingContentBlock.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,8 @@
 block discarded – undo
36 36
             /** @var \Zikula\Common\Collection\Container $collection */
37 37
             $module = $collection->getName();
38 38
             foreach ($collection as $item) {
39
-                if ($item instanceof \Zikula_Provider_AggregateItem) { // @todo remove at Core-2.0
39
+                if ($item instanceof \Zikula_Provider_AggregateItem) {
40
+// @todo remove at Core-2.0
40 41
                     $link = \ModUtil::url($module, $item->getController(), $item->getMethod(), $item->getArgs());
41 42
                 } elseif ($item instanceof PendingContentCollectible) {
42 43
                     $link = $this->get('router')->generate($item->getRoute(), $item->getArgs());
Please login to merge, or discard this patch.
src/system/ExtensionsModule/Helper/BundleSyncHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -184,14 +184,14 @@
 block discarded – undo
184 184
             // Work out if admin-capable
185 185
             // @deprecated - author must declare in Core 2.0
186 186
             // e.g. "capabilities": {"admin": {"route": "zikulafoobundle_admin_index"} }
187
-            if (empty($bundleVersionArray['capabilities']['admin']) && file_exists($bundle->getPath().'/Controller/AdminController.php')) {
187
+            if (empty($bundleVersionArray['capabilities']['admin']) && file_exists($bundle->getPath() . '/Controller/AdminController.php')) {
188 188
                 $bundleVersionArray['capabilities']['admin'] = ['url' => \ModUtil::url($bundle->getName(), 'admin', 'index')];
189 189
             }
190 190
 
191 191
             // Work out if user-capable
192 192
             // @deprecated - author must declare in Core 2.0
193 193
             // e.g. "capabilities": {"user": {"route": "zikulafoobundle_user_index"} }
194
-            if (empty($bundleVersionArray['capabilities']['user']) && file_exists($bundle->getPath().'/Controller/UserController.php')) {
194
+            if (empty($bundleVersionArray['capabilities']['user']) && file_exists($bundle->getPath() . '/Controller/UserController.php')) {
195 195
                 $bundleVersionArray['capabilities']['user'] = ['url' => \ModUtil::url($bundle->getName(), 'user', 'index')];
196 196
             }
197 197
             $bundleVersionArray['capabilities'] = serialize($bundleVersionArray['capabilities']);
Please login to merge, or discard this patch.
src/system/ExtensionsModule/Helper/ExtensionHelper.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -277,7 +277,8 @@
 block discarded – undo
277 277
     {
278 278
         $className = $bundle->getInstallerClass();
279 279
         $reflectionInstaller = new \ReflectionClass($className);
280
-        if ($reflectionInstaller->isSubclassOf('Zikula_AbstractInstaller')) { // @deprecated remove at Core-2.0
280
+        if ($reflectionInstaller->isSubclassOf('Zikula_AbstractInstaller')) {
281
+// @deprecated remove at Core-2.0
281 282
             return $reflectionInstaller->newInstanceArgs([$this->container, $bundle]);
282 283
         } elseif (!$reflectionInstaller->isSubclassOf('\Zikula\Core\ExtensionInstallerInterface')) {
283 284
             throw new \RuntimeException($this->translator->__f("%s must implement ExtensionInstallerInterface", ['%s' => $className]));
Please login to merge, or discard this patch.
src/system/SecurityCenterModule/SecurityCenterModuleInstaller.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $this->setSystemVar('sessionstoretofile', Constant::SESSION_STORAGE_FILE);
57 57
         $this->setSystemVar('sessionsavepath', '');
58 58
         $this->setSystemVar('gc_probability', 100);
59
-        $this->setSystemVar('sessioncsrftokenonetime', 1);  // 1 means use same token for entire session
59
+        $this->setSystemVar('sessioncsrftokenonetime', 1); // 1 means use same token for entire session
60 60
         $this->setSystemVar('anonymoussessions', 1); // @deprecated
61 61
         $this->setSystemVar('sessionrandregenerate', 1);
62 62
         $this->setSystemVar('sessionregenerate', 1);
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
         $this->setSystemVar('useids', 0);
80 80
         $this->setSystemVar('idsmail', 0);
81 81
         $this->setSystemVar('idsrulepath', 'system/SecurityCenterModule/Resources/config/phpids_zikula_default.xml');
82
-        $this->setSystemVar('idssoftblock', 1);                // do not block requests, but warn for debugging
83
-        $this->setSystemVar('idsfilter', 'xml');               // filter type
84
-        $this->setSystemVar('idsimpactthresholdone', 1);       // db logging
85
-        $this->setSystemVar('idsimpactthresholdtwo', 10);      // mail admin
86
-        $this->setSystemVar('idsimpactthresholdthree', 25);    // block request
87
-        $this->setSystemVar('idsimpactthresholdfour', 75);     // kick user, destroy session
88
-        $this->setSystemVar('idsimpactmode', 1);               // per request per default
82
+        $this->setSystemVar('idssoftblock', 1); // do not block requests, but warn for debugging
83
+        $this->setSystemVar('idsfilter', 'xml'); // filter type
84
+        $this->setSystemVar('idsimpactthresholdone', 1); // db logging
85
+        $this->setSystemVar('idsimpactthresholdtwo', 10); // mail admin
86
+        $this->setSystemVar('idsimpactthresholdthree', 25); // block request
87
+        $this->setSystemVar('idsimpactthresholdfour', 75); // kick user, destroy session
88
+        $this->setSystemVar('idsimpactmode', 1); // per request per default
89 89
         $this->setSystemVar('idshtmlfields', ['POST.__wysiwyg']);
90 90
         $this->setSystemVar('idsjsonfields', ['POST.__jsondata']);
91 91
         $this->setSystemVar('idsexceptions', [
Please login to merge, or discard this patch.
src/system/ThemeModule/Controller/AdminController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -79,15 +79,15 @@  discard block
 block discarded – undo
79 79
         $theme = ThemeUtil::getTheme($themeinfo['name']);
80 80
         $ostemp = CacheUtil::getLocalDir();
81 81
         if ($theme) {
82
-            $themePath = $theme->getRelativePath().'/Resources/config';
83
-            $zpath  = $ostemp.'/Theme_Config/'.DataUtil::formatForOS($themeinfo['directory']);
82
+            $themePath = $theme->getRelativePath() . '/Resources/config';
83
+            $zpath  = $ostemp . '/Theme_Config/' . DataUtil::formatForOS($themeinfo['directory']);
84 84
             $tpath  = $themePath;
85 85
         } else {
86
-            $zpath  = $ostemp.'/Theme_Config/'.DataUtil::formatForOS($themeinfo['directory']);
87
-            $tpath  = 'themes/'.DataUtil::formatForOS($themeinfo['directory']).'/templates/config';
86
+            $zpath  = $ostemp . '/Theme_Config/' . DataUtil::formatForOS($themeinfo['directory']);
87
+            $tpath  = 'themes/' . DataUtil::formatForOS($themeinfo['directory']) . '/templates/config';
88 88
         }
89 89
         // check if we can edit the theme and, if not, create the running config
90
-        if (!is_writable($tpath.'/pageconfigurations.ini')) {
90
+        if (!is_writable($tpath . '/pageconfigurations.ini')) {
91 91
             if (!file_exists($zpath) || is_writable($zpath)) {
92 92
                 ModUtil::apiFunc('ZikulaThemeModule', 'admin', 'createrunningconfig', ['themename' => $themeinfo['name']]);
93 93
 
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
         $newfilters = [];
768 768
         foreach ($filters as $filter) {
769 769
             foreach ($legacyView->plugins_dir as $plugindir) {
770
-                if (file_exists($plugindir .'/'. $ostype .'.'. DataUtil::formatForOS($filter) .'.php')) {
770
+                if (file_exists($plugindir . '/' . $ostype . '.' . DataUtil::formatForOS($filter) . '.php')) {
771 771
                     $newfilters[] = $filter;
772 772
                     break;
773 773
                 }
@@ -1304,9 +1304,9 @@  discard block
 block discarded – undo
1304 1304
                 $themedir = $themearr['directory'];
1305 1305
                 $res = $theme->clear_cache(null, $cacheid, null, null, $themedir);
1306 1306
                 if ($res) {
1307
-                    $this->addFlash('status', $this->__('Done! Deleted theme engine cached templates.').' '.$cacheid.', '.$themedir);
1307
+                    $this->addFlash('status', $this->__('Done! Deleted theme engine cached templates.') . ' ' . $cacheid . ', ' . $themedir);
1308 1308
                 } else {
1309
-                    $this->addFlash('error', $this->__('Error! Failed to clear theme engine cached templates.').' '.$cacheid.', '.$themedir);
1309
+                    $this->addFlash('error', $this->__('Error! Failed to clear theme engine cached templates.') . ' ' . $cacheid . ', ' . $themedir);
1310 1310
                 }
1311 1311
             }
1312 1312
         } else {
@@ -1504,8 +1504,8 @@  discard block
 block discarded – undo
1504 1504
      */
1505 1505
     private function checkIfMainThemeFileExists($themeinfo)
1506 1506
     {
1507
-        $mainThemeFile = 'themes/' . DataUtil::formatForOS($themeinfo['directory']). '/' . $themeinfo['name'] . '.php';
1508
-        $mainThemeFileLegacy = 'themes/'.DataUtil::formatForOS($themeinfo['directory']).'/version.php';
1507
+        $mainThemeFile = 'themes/' . DataUtil::formatForOS($themeinfo['directory']) . '/' . $themeinfo['name'] . '.php';
1508
+        $mainThemeFileLegacy = 'themes/' . DataUtil::formatForOS($themeinfo['directory']) . '/version.php';
1509 1509
         if (!file_exists($mainThemeFile) && !file_exists($mainThemeFileLegacy)) {
1510 1510
             throw new \InvalidArgumentException($this->__('Main theme file not found!'));
1511 1511
         }
Please login to merge, or discard this patch.
src/system/ThemeModule/Controller/ThemeController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
 
116 116
         $form = $this->createFormBuilder(['themeName' => $themeName, 'resetuserselected' => true])
117 117
             ->add('themeName', 'Symfony\Component\Form\Extension\Core\Type\HiddenType')
118
-            ->add('resetuserselected', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', [ // @todo remove at Core-2.0
118
+            ->add('resetuserselected', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', [// @todo remove at Core-2.0
119 119
                 'label' => $this->__('Override users\' theme settings'),
120 120
                 'required' => false,
121 121
             ])
Please login to merge, or discard this patch.
src/system/ThemeModule/Controller/UserController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,9 +73,9 @@
 block discarded – undo
73 73
         $currentthemepic = null;
74 74
         foreach ($allthemes as $key => $themeinfo) {
75 75
             $themename = $themeinfo['name'];
76
-            if (file_exists($themepic = 'themes/'.DataUtil::formatForOS($themeinfo['directory']).'/Resources/public/images/preview_medium.png')) {
76
+            if (file_exists($themepic = 'themes/' . DataUtil::formatForOS($themeinfo['directory']) . '/Resources/public/images/preview_medium.png')) {
77 77
                 $themeinfo['previewImage'] = $themepic;
78
-                $themeinfo['largeImage'] = 'themes/'.DataUtil::formatForOS($themeinfo['directory']).'/Resources/public/images/preview_large.png';
78
+                $themeinfo['largeImage'] = 'themes/' . DataUtil::formatForOS($themeinfo['directory']) . '/Resources/public/images/preview_large.png';
79 79
             } else {
80 80
                 $themeinfo['previewImage'] = 'system/ThemeModule/Resources/public/images/preview_medium.png';
81 81
                 $themeinfo['largeImage'] = 'system/ThemeModule/Resources/public/images/preview_large.png';
Please login to merge, or discard this patch.