Completed
Branch 1.4 (78c96b)
by Axel
22:13
created
src/themes/PrinterTheme/ZikulaPrinterTheme.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     {
44 44
         $text = preg_replace_callback(
45 45
             '/<a [^>]*href\s*=\s*\"?([^>\"]*)\"?[^>]*>(.*?)<\/a.*?>/i',
46
-            function ($matches) {
46
+            function($matches) {
47 47
                 // @todo - work out why some links need decoding twice (&amp;amp;....)
48 48
                 $this->links[] = html_entity_decode(html_entity_decode($matches[1]));
49 49
                 // return the replaced link
Please login to merge, or discard this patch.
src/config/config.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,21 +29,21 @@  discard block
 block discarded – undo
29 29
 // ----------------------------------------------------------------------
30 30
 // Logging Settings
31 31
 // ----------------------------------------------------------------------
32
-$ZConfig['Log']['log.apache_uname'] = 0;          // log username to apache logs: please see documentation.  Please check you country's local law covering the logging of personally identifiable user data before enabling.
32
+$ZConfig['Log']['log.apache_uname'] = 0; // log username to apache logs: please see documentation.  Please check you country's local law covering the logging of personally identifiable user data before enabling.
33 33
 
34 34
 // ----------------------------------------------------------------------
35 35
 // The following define some data layer settings
36 36
 // ----------------------------------------------------------------------
37
-$ZConfig['System']['Z_CONFIG_USE_OBJECT_ATTRIBUTION'] = 0;     // enable universal attribution layer, 0 to turn off
38
-$ZConfig['System']['Z_CONFIG_USE_OBJECT_CATEGORIZATION'] = 1;  // categorization/filtering services, 0 to turn off
39
-$ZConfig['System']['Z_CONFIG_USE_OBJECT_LOGGING'] = 0;         // object audit trail logging, 0 to turn off
40
-$ZConfig['System']['Z_CONFIG_USE_OBJECT_META'] = 0;            // meta-data services, 0 to turn off
37
+$ZConfig['System']['Z_CONFIG_USE_OBJECT_ATTRIBUTION'] = 0; // enable universal attribution layer, 0 to turn off
38
+$ZConfig['System']['Z_CONFIG_USE_OBJECT_CATEGORIZATION'] = 1; // categorization/filtering services, 0 to turn off
39
+$ZConfig['System']['Z_CONFIG_USE_OBJECT_LOGGING'] = 0; // object audit trail logging, 0 to turn off
40
+$ZConfig['System']['Z_CONFIG_USE_OBJECT_META'] = 0; // meta-data services, 0 to turn off
41 41
 
42 42
 // ----------------------------------------------------------------------
43 43
 // Database cache settings
44 44
 // ----------------------------------------------------------------------
45
-$ZConfig['System']['dbcache.enable'] = 1;             // 0 to disable, 1 to enable
46
-$ZConfig['System']['dbcache.type'] = 'Array';         // Memcache, Apc, Array, Db, Xcache (todo: Memcached, File)
45
+$ZConfig['System']['dbcache.enable'] = 1; // 0 to disable, 1 to enable
46
+$ZConfig['System']['dbcache.type'] = 'Array'; // Memcache, Apc, Array, Db, Xcache (todo: Memcached, File)
47 47
 
48 48
 // CACHE_SERVERS valid for Memcache/d only.
49 49
 // array of arrays: params according to the addServer methods at e.g.
@@ -58,5 +58,5 @@  discard block
 block discarded – undo
58 58
 
59 59
 // For pure Doctrine Queries only. Effective only when dbcache.enable = true and dbcache.cache_result = 1
60 60
 // http://docs.doctrine-project.org/projects/doctrine1/en/latest/en/manual/caching.html#result-cache
61
-$ZConfig['System']['dbcache.cache_result'] = 0;      // 1 to enable or 0 to disable.
61
+$ZConfig['System']['dbcache.cache_result'] = 0; // 1 to enable or 0 to disable.
62 62
 $ZConfig['System']['dbcache.cache_result_ttl'] = 30; // seconds, 3600 = 1 hour.
Please login to merge, or discard this patch.
src/system/ExtensionsModule/Api/AdminApi.php 2 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
         // add select and from params
162 162
         $qb->select('e')
163
-           ->from(self::EXTENSION_ENTITY, 'e');
163
+            ->from(self::EXTENSION_ENTITY, 'e');
164 164
 
165 165
         // filter by first letter of module
166 166
         if (isset($args['letter']) && !empty($args['letter'])) {
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         $numitems = (!isset($args['numitems']) || empty($args['numitems']) || $args['numitems'] < 0) ? 0 : (int)$args['numitems'];
209 209
         if ($numitems > 0) {
210 210
             $qb->setFirstResult($startnum)
211
-               ->setMaxResults($numitems);
211
+                ->setMaxResults($numitems);
212 212
         }
213 213
 
214 214
         // convert querybuilder instance into a Query object
@@ -396,11 +396,11 @@  discard block
 block discarded – undo
396 396
 
397 397
         // Delete any module variables that the module cleanup function might have missed
398 398
         $query = $this->entityManager->createQueryBuilder()
399
-                                     ->delete()
400
-                                     ->from('Zikula\ExtensionsModule\Entity\ExtensionVarEntity', 'v')
401
-                                     ->where('v.modname = :modname')
402
-                                     ->setParameter('modname', $modinfo['name'])
403
-                                     ->getQuery();
399
+                                        ->delete()
400
+                                        ->from('Zikula\ExtensionsModule\Entity\ExtensionVarEntity', 'v')
401
+                                        ->where('v.modname = :modname')
402
+                                        ->setParameter('modname', $modinfo['name'])
403
+                                        ->getQuery();
404 404
         $query->getResult();
405 405
 
406 406
         if (is_object($version)) {
@@ -421,11 +421,11 @@  discard block
 block discarded – undo
421 421
             if ($canDelete == 1 || $modinfo['state'] == ModUtil::STATE_NOTALLOWED || $modinfo['state'] == ModUtil::STATE_MISSING || $modinfo['state'] == ModUtil::STATE_INVALID) {
422 422
                 // remove the entry from the modules table
423 423
                 $query = $this->entityManager->createQueryBuilder()
424
-                                             ->delete()
425
-                                             ->from(self::EXTENSION_ENTITY, 'e')
426
-                                             ->where('e.id = :id')
427
-                                             ->setParameter('id', $args['id'])
428
-                                             ->getQuery();
424
+                                                ->delete()
425
+                                                ->from(self::EXTENSION_ENTITY, 'e')
426
+                                                ->where('e.id = :id')
427
+                                                ->setParameter('id', $args['id'])
428
+                                                ->getQuery();
429 429
                 $query->getResult();
430 430
             } else {
431 431
                 //set state as uninitialised
@@ -434,11 +434,11 @@  discard block
 block discarded – undo
434 434
         } else {
435 435
             // remove the entry from the modules table
436 436
             $query = $this->entityManager->createQueryBuilder()
437
-                                         ->delete()
438
-                                         ->from(self::EXTENSION_ENTITY, 'e')
439
-                                         ->where('e.id = :id')
440
-                                         ->setParameter('id', $args['id'])
441
-                                         ->getQuery();
437
+                                            ->delete()
438
+                                            ->from(self::EXTENSION_ENTITY, 'e')
439
+                                            ->where('e.id = :id')
440
+                                            ->setParameter('id', $args['id'])
441
+                                            ->getQuery();
442 442
             $query->getResult();
443 443
         }
444 444
 
@@ -748,22 +748,22 @@  discard block
 block discarded – undo
748 748
                     if (isset($dbmodinfo['name']) && in_array($dbmodinfo['name'], (array)$modinfo['oldnames'])) {
749 749
                         // migrate its modvars
750 750
                         $query = $this->entityManager->createQueryBuilder()
751
-                             ->update('Zikula\ExtensionsModule\Entity\ExtensionVarEntity', 'v')
752
-                             ->set('v.modname', ':modname')
753
-                             ->setParameter('modname', $modinfo['name'])
754
-                             ->where('v.modname = :dbname')
755
-                             ->setParameter('dbname', $dbname)
756
-                             ->getQuery();
751
+                                ->update('Zikula\ExtensionsModule\Entity\ExtensionVarEntity', 'v')
752
+                                ->set('v.modname', ':modname')
753
+                                ->setParameter('modname', $modinfo['name'])
754
+                                ->where('v.modname = :dbname')
755
+                                ->setParameter('dbname', $dbname)
756
+                                ->getQuery();
757 757
                         $query->execute();
758 758
 
759 759
                         // rename the module register
760 760
                         $query = $this->entityManager->createQueryBuilder()
761
-                             ->update(self::EXTENSION_ENTITY, 'e')
762
-                             ->set('e.name', ':modname')
763
-                             ->setParameter('modname', $modinfo['name'])
764
-                             ->where('e.id = :dbname')
765
-                             ->setParameter('dbname', $dbmodules[$dbname]['id'])
766
-                             ->getQuery();
761
+                                ->update(self::EXTENSION_ENTITY, 'e')
762
+                                ->set('e.name', ':modname')
763
+                                ->setParameter('modname', $modinfo['name'])
764
+                                ->where('e.id = :dbname')
765
+                                ->setParameter('dbname', $dbmodules[$dbname]['id'])
766
+                                ->getQuery();
767 767
                         $query->execute();
768 768
 
769 769
                         // replace the old module with the new one in the dbmodules array
@@ -1194,7 +1194,7 @@  discard block
 block discarded – undo
1194 1194
 
1195 1195
         // add select and from params
1196 1196
         $qb->select('COUNT(e.id)')
1197
-           ->from(self::EXTENSION_ENTITY, 'e');
1197
+            ->from(self::EXTENSION_ENTITY, 'e');
1198 1198
 
1199 1199
         // filter by first letter of module
1200 1200
         if (isset($args['letter']) && !empty($args['letter'])) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             throw new \InvalidArgumentException($this->__('Error! Module URL is a required field, please enter a unique name.'));
107 107
         }
108 108
 
109
-        $path = realpath($this->getContainer()->get('kernel')->getRootDir(). '/../' . DataUtil::formatForOS($args['url']));
109
+        $path = realpath($this->getContainer()->get('kernel')->getRootDir() . '/../' . DataUtil::formatForOS($args['url']));
110 110
         if (is_dir($path)) {
111 111
             throw new \InvalidArgumentException($this->__('You have attempted to select an invalid name (it is a subdirectory).'));
112 112
         }
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
             // Work out if admin-capable
525 525
             // @deprecated - author must declare in Core 2.0
526 526
             // e.g. "capabilities": {"admin": {"route": "zikulafoomodule_admin_index"} }
527
-            if (empty($moduleVersionArray['capabilities']['admin']) && file_exists($bundle->getPath().'/Controller/AdminController.php')) {
527
+            if (empty($moduleVersionArray['capabilities']['admin']) && file_exists($bundle->getPath() . '/Controller/AdminController.php')) {
528 528
                 $caps = $moduleVersionArray['capabilities'];
529 529
                 $caps['admin'] = ['url' => ModUtil::url($bundle->getName(), 'admin', 'index')];
530 530
                 $moduleVersionArray['capabilities'] = $caps;
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
             // Work out if user-capable
534 534
             // @deprecated - author must declare in Core 2.0
535 535
             // e.g. "capabilities": {"user": {"route": "zikulafoomodule_user_index"} }
536
-            if (empty($moduleVersionArray['capabilities']['user']) && file_exists($bundle->getPath().'/Controller/UserController.php')) {
536
+            if (empty($moduleVersionArray['capabilities']['user']) && file_exists($bundle->getPath() . '/Controller/UserController.php')) {
537 537
                 $caps = $moduleVersionArray['capabilities'];
538 538
                 $caps['user'] = ['url' => ModUtil::url($bundle->getName(), 'user', 'index')];
539 539
                 $moduleVersionArray['capabilities'] = $caps;
Please login to merge, or discard this patch.
system/ExtensionsModule/DependencyInjection/ZikulaExtensionsExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     public function load(array $configs, ContainerBuilder $container)
28 28
     {
29
-        $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__.'/../Resources/config')));
29
+        $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__ . '/../Resources/config')));
30 30
 
31 31
         $loader->load('services.yml');
32 32
     }
Please login to merge, or discard this patch.
src/system/ExtensionsModule/Controller/AdminController.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -286,11 +286,11 @@
 block discarded – undo
286 286
         }
287 287
 
288 288
         $this->view->assign('plugins', $plugins)
289
-                   ->assign('module', $module)
290
-                   ->assign('sort', $sort)
291
-                   ->assign('state', $state)
292
-                   ->assign('systemplugins', $systemplugins)
293
-                   ->assign('_type', ($systemplugins) ? 'system' : 'module');
289
+                    ->assign('module', $module)
290
+                    ->assign('sort', $sort)
291
+                    ->assign('state', $state)
292
+                    ->assign('systemplugins', $systemplugins)
293
+                    ->assign('_type', ($systemplugins) ? 'system' : 'module');
294 294
 
295 295
         // Return the output that has been generated by this function
296 296
         return new Response($this->view->fetch('Admin/viewPlugins.tpl'));
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -260,7 +260,7 @@
 block discarded – undo
260 260
                 ];
261 261
             }
262 262
 
263
-            $info =  [
263
+            $info = [
264 264
                 'instance'    => $instance,
265 265
                 'status'      => $status,
266 266
                 'statusclass' => $statusclass,
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
@@ -181,14 +181,14 @@
 block discarded – undo
181 181
             // Work out if admin-capable
182 182
             // @deprecated - author must declare in Core 2.0
183 183
             // e.g. "capabilities": {"admin": {"route": "zikulafoobundle_admin_index"} }
184
-            if (empty($bundleVersionArray['capabilities']['admin']) && file_exists($bundle->getPath().'/Controller/AdminController.php')) {
184
+            if (empty($bundleVersionArray['capabilities']['admin']) && file_exists($bundle->getPath() . '/Controller/AdminController.php')) {
185 185
                 $bundleVersionArray['capabilities']['admin'] = ['url' => \ModUtil::url($bundle->getName(), 'admin', 'index')];
186 186
             }
187 187
 
188 188
             // Work out if user-capable
189 189
             // @deprecated - author must declare in Core 2.0
190 190
             // e.g. "capabilities": {"user": {"route": "zikulafoobundle_user_index"} }
191
-            if (empty($bundleVersionArray['capabilities']['user']) && file_exists($bundle->getPath().'/Controller/UserController.php')) {
191
+            if (empty($bundleVersionArray['capabilities']['user']) && file_exists($bundle->getPath() . '/Controller/UserController.php')) {
192 192
                 $bundleVersionArray['capabilities']['user'] = ['url' => \ModUtil::url($bundle->getName(), 'user', 'index')];
193 193
             }
194 194
 
Please login to merge, or discard this patch.
src/system/ExtensionsModule/Helper/ExtensionDependencyHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@
 block discarded – undo
145 145
      * @param ExtensionDependencyEntity $dependency
146 146
      * @return bool
147 147
      */
148
-    private function bundleDependencySatisfied(ExtensionDependencyEntity &$dependency)
148
+    private function bundleDependencySatisfied(ExtensionDependencyEntity & $dependency)
149 149
     {
150 150
         if ($dependency->getModname() == "php") {
151 151
             // Do not use PHP_VERSION constant, because it might throw off
Please login to merge, or discard this patch.
src/system/SearchModule/Api/UserApi.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
     public function getallplugins($args)
278 278
     {
279 279
         // defaults
280
-        $loadAll = isset($args['loadall']) ? (bool) $args['loadall'] : false;
280
+        $loadAll = isset($args['loadall']) ? (bool)$args['loadall'] : false;
281 281
 
282 282
         // initialize the search plugins array
283 283
         $search_modules = [];
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 
383 383
         if (!empty($args['q'])) {
384 384
             $q = DataUtil::formatForStore($args['q']);
385
-            $q = str_replace('%', '\\%', $q);  // Don't allow user input % as wildcard
385
+            $q = str_replace('%', '\\%', $q); // Don't allow user input % as wildcard
386 386
             $where .= ' (';
387 387
             if ($args['searchtype'] !== 'EXACT') {
388 388
                 $searchwords = self::split_query($q);
Please login to merge, or discard this patch.
src/system/SearchModule/Entity/Repository/SearchResultRepository.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
         if ($sessionId != '') {
36 36
             $qb->where('s.sesid = :sid')
37
-               ->setParameter('sid', $sessionId);
37
+                ->setParameter('sid', $sessionId);
38 38
         }
39 39
 
40 40
         $query = $qb->getQuery();
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             $i = 1;
65 65
             foreach ($filters as $w_key => $w_value) {
66 66
                 $qb->andWhere($qb->expr()->eq('tbl.' . $w_key, '?' . $i))
67
-                   ->setParameter($i, $w_value);
67
+                    ->setParameter($i, $w_value);
68 68
                 $i++;
69 69
             }
70 70
         }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
         if ($sessionId != '') {
106 106
             $qb->orWhere('tbl.sesid = :sid')
107
-               ->setParameter('sid', $sessionId);
107
+                ->setParameter('sid', $sessionId);
108 108
         }
109 109
 
110 110
         $query = $qb->getQuery();
Please login to merge, or discard this patch.