]> source.dussan.org Git - nextcloud-server.git/commitdiff
Shorten index name of calendar changes table 12447/head
authorJoas Schilling <coding@schilljs.com>
Wed, 14 Nov 2018 08:39:14 +0000 (09:39 +0100)
committerJoas Schilling <coding@schilljs.com>
Wed, 14 Nov 2018 09:14:23 +0000 (10:14 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
24 files changed:
apps/admin_audit/composer/composer/ClassLoader.php
apps/comments/composer/composer/ClassLoader.php
apps/dav/appinfo/info.xml
apps/dav/composer/composer/autoload_classmap.php
apps/dav/composer/composer/autoload_static.php
apps/dav/lib/Migration/Version1006Date20180628111625.php
apps/dav/lib/Migration/Version1008Date20181114084440.php [new file with mode: 0644]
apps/encryption/composer/composer/ClassLoader.php
apps/federatedfilesharing/composer/composer/ClassLoader.php
apps/federation/composer/composer/ClassLoader.php
apps/files/composer/composer/ClassLoader.php
apps/files_sharing/composer/composer/ClassLoader.php
apps/files_trashbin/composer/composer/ClassLoader.php
apps/files_versions/composer/composer/ClassLoader.php
apps/lookup_server_connector/composer/composer/ClassLoader.php
apps/oauth2/composer/composer/ClassLoader.php
apps/provisioning_api/composer/composer/ClassLoader.php
apps/sharebymail/composer/composer/ClassLoader.php
apps/systemtags/composer/composer/ClassLoader.php
apps/testing/composer/composer/ClassLoader.php
apps/twofactor_backupcodes/composer/composer/ClassLoader.php
apps/updatenotification/composer/composer/ClassLoader.php
apps/user_ldap/composer/composer/ClassLoader.php
lib/composer/composer/ClassLoader.php

index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index d8d5305fcbd17e52166b0afdee78efff83daa415..c39b917c7412ef980ca424adf958ec0455d909e9 100644 (file)
@@ -5,7 +5,7 @@
        <name>WebDAV</name>
        <summary>WebDAV endpoint</summary>
        <description>WebDAV endpoint</description>
-       <version>1.7.3</version>
+       <version>1.8.0</version>
        <licence>agpl</licence>
        <author>owncloud.org</author>
        <namespace>DAV</namespace>
index ca1aec10241043228e9d5035311574b489ed8fe4..e935f24e641f82f2f18730833b0cfb2ebd80712a 100644 (file)
@@ -167,6 +167,7 @@ return array(
     'OCA\\DAV\\Migration\\Version1008Date20181105104833' => $baseDir . '/../lib/Migration/Version1008Date20181105104833.php',
     'OCA\\DAV\\Migration\\Version1008Date20181105110300' => $baseDir . '/../lib/Migration/Version1008Date20181105110300.php',
     'OCA\\DAV\\Migration\\Version1008Date20181105112049' => $baseDir . '/../lib/Migration/Version1008Date20181105112049.php',
+    'OCA\\DAV\\Migration\\Version1008Date20181114084440' => $baseDir . '/../lib/Migration/Version1008Date20181114084440.php',
     'OCA\\DAV\\RootCollection' => $baseDir . '/../lib/RootCollection.php',
     'OCA\\DAV\\Server' => $baseDir . '/../lib/Server.php',
     'OCA\\DAV\\Settings\\CalDAVSettings' => $baseDir . '/../lib/Settings/CalDAVSettings.php',
index 2e4e35653d2dd1c0a2b742d86ff72652f499df68..b0ecb09a64248fc3ac6b2b3a6ebf542c59cd0a5b 100644 (file)
@@ -182,6 +182,7 @@ class ComposerStaticInitDAV
         'OCA\\DAV\\Migration\\Version1008Date20181105104833' => __DIR__ . '/..' . '/../lib/Migration/Version1008Date20181105104833.php',
         'OCA\\DAV\\Migration\\Version1008Date20181105110300' => __DIR__ . '/..' . '/../lib/Migration/Version1008Date20181105110300.php',
         'OCA\\DAV\\Migration\\Version1008Date20181105112049' => __DIR__ . '/..' . '/../lib/Migration/Version1008Date20181105112049.php',
+        'OCA\\DAV\\Migration\\Version1008Date20181114084440' => __DIR__ . '/..' . '/../lib/Migration/Version1008Date20181114084440.php',
         'OCA\\DAV\\RootCollection' => __DIR__ . '/..' . '/../lib/RootCollection.php',
         'OCA\\DAV\\Server' => __DIR__ . '/..' . '/../lib/Server.php',
         'OCA\\DAV\\Settings\\CalDAVSettings' => __DIR__ . '/..' . '/../lib/Settings/CalDAVSettings.php',
index 8113b4c69bff8ebca0ea8a388418c2325c89356f..d3e49ca227dfcb9b92facb7602baa7687514d248 100644 (file)
@@ -51,7 +51,7 @@ class Version1006Date20180628111625 extends SimpleMigrationStep {
                        if ($calendarChangesTable->hasIndex('calendarid_synctoken')) {
                                $calendarChangesTable->dropIndex('calendarid_synctoken');
                        }
-                       $calendarChangesTable->addIndex(['calendarid', 'calendartype', 'synctoken'], 'calendarid_calendartype_synctoken');
+                       $calendarChangesTable->addIndex(['calendarid', 'calendartype', 'synctoken'], 'calid_type_synctoken');
                }
 
                if ($schema->hasTable('calendarobjects')) {
diff --git a/apps/dav/lib/Migration/Version1008Date20181114084440.php b/apps/dav/lib/Migration/Version1008Date20181114084440.php
new file mode 100644 (file)
index 0000000..a7ac166
--- /dev/null
@@ -0,0 +1,59 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2018, Joas Schilling <coding@schilljs.com>
+ *
+ * @author Joas Schilling <coding@schilljs.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\DAV\Migration;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\SimpleMigrationStep;
+use OCP\Migration\IOutput;
+
+class Version1008Date20181114084440 extends SimpleMigrationStep {
+
+
+       /**
+        * @param IOutput $output
+        * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+        * @param array $options
+        * @return null|ISchemaWrapper
+        */
+       public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
+               /** @var ISchemaWrapper $schema */
+               $schema = $schemaClosure();
+
+               if ($schema->hasTable('calendarchanges')) {
+                       $calendarChangesTable = $schema->getTable('calendarchanges');
+                       if ($calendarChangesTable->hasIndex('calendarid_calendartype_synctoken')) {
+                               $calendarChangesTable->dropIndex('calendarid_calendartype_synctoken');
+                       }
+
+                       if (!$calendarChangesTable->hasIndex('calid_type_synctoken')) {
+                               $calendarChangesTable->addIndex(['calendarid', 'calendartype', 'synctoken'], 'calid_type_synctoken');
+                       }
+               }
+
+               return $schema;
+       }
+}
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**
index 95f7e0978bad11efb1f75f5049b0c2ac7ae1939b..fce8549f0781bafdc7da2301b84d048286757445 100644 (file)
@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**