Passed
Push — master ( 057e88...ab9207 )
by Morris
10:06 queued 10s
created
lib/private/Template/JSResourceLocator.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,26 +71,26 @@
 block discarded – undo
71 71
 		}
72 72
 
73 73
 		$app = substr($script, 0, strpos($script, '/'));
74
-		$script = substr($script, strpos($script, '/')+1);
74
+		$script = substr($script, strpos($script, '/') + 1);
75 75
 		$app_path = \OC_App::getAppPath($app);
76 76
 		$app_url = \OC_App::getAppWebPath($app);
77 77
 
78 78
 		// missing translations files fill be ignored
79 79
 		if (strpos($script, 'l10n/') === 0) {
80
-			$this->appendIfExist($app_path, $script . '.js', $app_url);
80
+			$this->appendIfExist($app_path, $script.'.js', $app_url);
81 81
 			return;
82 82
 		}
83 83
 
84 84
 		if ($app_path === false && $app_url === false) {
85 85
 			$this->logger->error('Could not find resource {resource} to load', [
86
-				'resource' => $app . '/' . $script . '.js',
86
+				'resource' => $app.'/'.$script.'.js',
87 87
 				'app' => 'jsresourceloader',
88 88
 			]);
89 89
 			return;
90 90
 		}
91 91
 
92 92
 		if (!$this->cacheAndAppendCombineJsonIfExist($app_path, $script.'.json', $app)) {
93
-			$this->append($app_path, $script . '.js', $app_url);
93
+			$this->append($app_path, $script.'.js', $app_url);
94 94
 		}
95 95
 	}
96 96
 
Please login to merge, or discard this patch.
Indentation   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -28,103 +28,103 @@
 block discarded – undo
28 28
 
29 29
 class JSResourceLocator extends ResourceLocator {
30 30
 
31
-	/** @var JSCombiner */
32
-	protected $jsCombiner;
33
-
34
-	public function __construct(\OCP\ILogger $logger, $theme, array $core_map, array $party_map, JSCombiner $JSCombiner) {
35
-		parent::__construct($logger, $theme, $core_map, $party_map);
36
-
37
-		$this->jsCombiner = $JSCombiner;
38
-	}
39
-
40
-	/**
41
-	 * @param string $script
42
-	 */
43
-	public function doFind($script) {
44
-		$theme_dir = 'themes/'.$this->theme.'/';
45
-		if (strpos($script, '3rdparty') === 0
46
-			&& $this->appendIfExist($this->thirdpartyroot, $script.'.js')) {
47
-			return;
48
-		}
49
-
50
-		if (strpos($script, '/l10n/') !== false) {
51
-			// For language files we try to load them all, so themes can overwrite
52
-			// single l10n strings without having to translate all of them.
53
-			$found = 0;
54
-			$found += $this->appendIfExist($this->serverroot, 'core/'.$script.'.js');
55
-			$found += $this->appendIfExist($this->serverroot, $theme_dir.'core/'.$script.'.js');
56
-			$found += $this->appendIfExist($this->serverroot, $script.'.js');
57
-			$found += $this->appendIfExist($this->serverroot, $theme_dir.$script.'.js');
58
-			$found += $this->appendIfExist($this->serverroot, 'apps/'.$script.'.js');
59
-			$found += $this->appendIfExist($this->serverroot, $theme_dir.'apps/'.$script.'.js');
60
-
61
-			if ($found) {
62
-				return;
63
-			}
64
-		} else if ($this->appendIfExist($this->serverroot, $theme_dir.'apps/'.$script.'.js')
65
-			|| $this->appendIfExist($this->serverroot, $theme_dir.$script.'.js')
66
-			|| $this->appendIfExist($this->serverroot, $script.'.js')
67
-			|| $this->cacheAndAppendCombineJsonIfExist($this->serverroot, $script.'.json')
68
-			|| $this->appendIfExist($this->serverroot, $theme_dir.'core/'.$script.'.js')
69
-			|| $this->appendIfExist($this->serverroot, 'core/'.$script.'.js')
70
-			|| $this->cacheAndAppendCombineJsonIfExist($this->serverroot, 'core/'.$script.'.json')
71
-		) {
72
-			return;
73
-		}
74
-
75
-		$app = substr($script, 0, strpos($script, '/'));
76
-		$script = substr($script, strpos($script, '/')+1);
77
-		$app_path = \OC_App::getAppPath($app);
78
-		$app_url = \OC_App::getAppWebPath($app);
79
-
80
-		if ($app_path !== false) {
81
-			// Account for the possibility of having symlinks in app path. Only
82
-			// do this if $app_path is set, because an empty argument to realpath
83
-			// gets turned into cwd.
84
-			$app_path = realpath($app_path);
85
-		}
86
-
87
-		// missing translations files fill be ignored
88
-		if (strpos($script, 'l10n/') === 0) {
89
-			$this->appendIfExist($app_path, $script . '.js', $app_url);
90
-			return;
91
-		}
92
-
93
-		if ($app_path === false && $app_url === false) {
94
-			$this->logger->error('Could not find resource {resource} to load', [
95
-				'resource' => $app . '/' . $script . '.js',
96
-				'app' => 'jsresourceloader',
97
-			]);
98
-			return;
99
-		}
100
-
101
-		if (!$this->cacheAndAppendCombineJsonIfExist($app_path, $script.'.json', $app)) {
102
-			$this->append($app_path, $script . '.js', $app_url);
103
-		}
104
-	}
105
-
106
-	/**
107
-	 * @param string $script
108
-	 */
109
-	public function doFindTheme($script) {
110
-	}
111
-
112
-	protected function cacheAndAppendCombineJsonIfExist($root, $file, $app = 'core') {
113
-		if (is_file($root.'/'.$file)) {
114
-			if ($this->jsCombiner->process($root, $file, $app)) {
115
-				$this->append($this->serverroot, $this->jsCombiner->getCachedJS($app, $file), false, false);
116
-			} else {
117
-				// Add all the files from the json
118
-				$files = $this->jsCombiner->getContent($root, $file);
119
-				$app_url = \OC_App::getAppWebPath($app);
120
-
121
-				foreach ($files as $jsFile) {
122
-					$this->append($root, $jsFile, $app_url);
123
-				}
124
-			}
125
-			return true;
126
-		}
127
-
128
-		return false;
129
-	}
31
+    /** @var JSCombiner */
32
+    protected $jsCombiner;
33
+
34
+    public function __construct(\OCP\ILogger $logger, $theme, array $core_map, array $party_map, JSCombiner $JSCombiner) {
35
+        parent::__construct($logger, $theme, $core_map, $party_map);
36
+
37
+        $this->jsCombiner = $JSCombiner;
38
+    }
39
+
40
+    /**
41
+     * @param string $script
42
+     */
43
+    public function doFind($script) {
44
+        $theme_dir = 'themes/'.$this->theme.'/';
45
+        if (strpos($script, '3rdparty') === 0
46
+            && $this->appendIfExist($this->thirdpartyroot, $script.'.js')) {
47
+            return;
48
+        }
49
+
50
+        if (strpos($script, '/l10n/') !== false) {
51
+            // For language files we try to load them all, so themes can overwrite
52
+            // single l10n strings without having to translate all of them.
53
+            $found = 0;
54
+            $found += $this->appendIfExist($this->serverroot, 'core/'.$script.'.js');
55
+            $found += $this->appendIfExist($this->serverroot, $theme_dir.'core/'.$script.'.js');
56
+            $found += $this->appendIfExist($this->serverroot, $script.'.js');
57
+            $found += $this->appendIfExist($this->serverroot, $theme_dir.$script.'.js');
58
+            $found += $this->appendIfExist($this->serverroot, 'apps/'.$script.'.js');
59
+            $found += $this->appendIfExist($this->serverroot, $theme_dir.'apps/'.$script.'.js');
60
+
61
+            if ($found) {
62
+                return;
63
+            }
64
+        } else if ($this->appendIfExist($this->serverroot, $theme_dir.'apps/'.$script.'.js')
65
+            || $this->appendIfExist($this->serverroot, $theme_dir.$script.'.js')
66
+            || $this->appendIfExist($this->serverroot, $script.'.js')
67
+            || $this->cacheAndAppendCombineJsonIfExist($this->serverroot, $script.'.json')
68
+            || $this->appendIfExist($this->serverroot, $theme_dir.'core/'.$script.'.js')
69
+            || $this->appendIfExist($this->serverroot, 'core/'.$script.'.js')
70
+            || $this->cacheAndAppendCombineJsonIfExist($this->serverroot, 'core/'.$script.'.json')
71
+        ) {
72
+            return;
73
+        }
74
+
75
+        $app = substr($script, 0, strpos($script, '/'));
76
+        $script = substr($script, strpos($script, '/')+1);
77
+        $app_path = \OC_App::getAppPath($app);
78
+        $app_url = \OC_App::getAppWebPath($app);
79
+
80
+        if ($app_path !== false) {
81
+            // Account for the possibility of having symlinks in app path. Only
82
+            // do this if $app_path is set, because an empty argument to realpath
83
+            // gets turned into cwd.
84
+            $app_path = realpath($app_path);
85
+        }
86
+
87
+        // missing translations files fill be ignored
88
+        if (strpos($script, 'l10n/') === 0) {
89
+            $this->appendIfExist($app_path, $script . '.js', $app_url);
90
+            return;
91
+        }
92
+
93
+        if ($app_path === false && $app_url === false) {
94
+            $this->logger->error('Could not find resource {resource} to load', [
95
+                'resource' => $app . '/' . $script . '.js',
96
+                'app' => 'jsresourceloader',
97
+            ]);
98
+            return;
99
+        }
100
+
101
+        if (!$this->cacheAndAppendCombineJsonIfExist($app_path, $script.'.json', $app)) {
102
+            $this->append($app_path, $script . '.js', $app_url);
103
+        }
104
+    }
105
+
106
+    /**
107
+     * @param string $script
108
+     */
109
+    public function doFindTheme($script) {
110
+    }
111
+
112
+    protected function cacheAndAppendCombineJsonIfExist($root, $file, $app = 'core') {
113
+        if (is_file($root.'/'.$file)) {
114
+            if ($this->jsCombiner->process($root, $file, $app)) {
115
+                $this->append($this->serverroot, $this->jsCombiner->getCachedJS($app, $file), false, false);
116
+            } else {
117
+                // Add all the files from the json
118
+                $files = $this->jsCombiner->getContent($root, $file);
119
+                $app_url = \OC_App::getAppWebPath($app);
120
+
121
+                foreach ($files as $jsFile) {
122
+                    $this->append($root, $jsFile, $app_url);
123
+                }
124
+            }
125
+            return true;
126
+        }
127
+
128
+        return false;
129
+    }
130 130
 }
Please login to merge, or discard this patch.
lib/private/GlobalScale/Config.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -27,45 +27,45 @@
 block discarded – undo
27 27
 
28 28
 class Config implements \OCP\GlobalScale\IConfig {
29 29
 
30
-	/** @var IConfig */
31
-	private $config;
30
+    /** @var IConfig */
31
+    private $config;
32 32
 
33
-	/**
34
-	 * Config constructor.
35
-	 *
36
-	 * @param IConfig $config
37
-	 */
38
-	public function __construct(IConfig $config) {
39
-		$this->config = $config;
40
-	}
33
+    /**
34
+     * Config constructor.
35
+     *
36
+     * @param IConfig $config
37
+     */
38
+    public function __construct(IConfig $config) {
39
+        $this->config = $config;
40
+    }
41 41
 
42
-	/**
43
-	 * check if global scale is enabled
44
-	 *
45
-	 * @since 12.0.1
46
-	 * @return bool
47
-	 */
48
-	public function isGlobalScaleEnabled() {
49
-		$enabled = $this->config->getSystemValue('gs.enabled', false);
50
-		return $enabled !== false;
51
-	}
42
+    /**
43
+     * check if global scale is enabled
44
+     *
45
+     * @since 12.0.1
46
+     * @return bool
47
+     */
48
+    public function isGlobalScaleEnabled() {
49
+        $enabled = $this->config->getSystemValue('gs.enabled', false);
50
+        return $enabled !== false;
51
+    }
52 52
 
53
-	/**
54
-	 * check if federation should only be used internally in a global scale setup
55
-	 *
56
-	 * @since 12.0.1
57
-	 * @return bool
58
-	 */
59
-	public function onlyInternalFederation() {
60
-		// if global scale is disabled federation works always globally
61
-		$gsEnabled = $this->isGlobalScaleEnabled();
62
-		if ($gsEnabled === false) {
63
-			return false;
64
-		}
53
+    /**
54
+     * check if federation should only be used internally in a global scale setup
55
+     *
56
+     * @since 12.0.1
57
+     * @return bool
58
+     */
59
+    public function onlyInternalFederation() {
60
+        // if global scale is disabled federation works always globally
61
+        $gsEnabled = $this->isGlobalScaleEnabled();
62
+        if ($gsEnabled === false) {
63
+            return false;
64
+        }
65 65
 
66
-		$enabled = $this->config->getSystemValue('gs.federation', 'internal');
66
+        $enabled = $this->config->getSystemValue('gs.federation', 'internal');
67 67
 
68
-		return $enabled === 'internal';
69
-	}
68
+        return $enabled === 'internal';
69
+    }
70 70
 
71 71
 }
Please login to merge, or discard this patch.
lib/public/GlobalScale/IConfig.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -32,20 +32,20 @@
 block discarded – undo
32 32
  */
33 33
 interface IConfig {
34 34
 
35
-	/**
36
-	 * check if global scale is enabled
37
-	 *
38
-	 * @since 12.0.1
39
-	 * @return bool
40
-	 */
41
-	public function isGlobalScaleEnabled();
35
+    /**
36
+     * check if global scale is enabled
37
+     *
38
+     * @since 12.0.1
39
+     * @return bool
40
+     */
41
+    public function isGlobalScaleEnabled();
42 42
 
43
-	/**
44
-	 * check if federation should only be used internally in a global scale setup
45
-	 *
46
-	 * @since 12.0.1
47
-	 * @return bool
48
-	 */
49
-	public function onlyInternalFederation();
43
+    /**
44
+     * check if federation should only be used internally in a global scale setup
45
+     *
46
+     * @since 12.0.1
47
+     * @return bool
48
+     */
49
+    public function onlyInternalFederation();
50 50
 
51 51
 }
Please login to merge, or discard this patch.
lib/public/Encryption/IEncryptionModule.php 1 patch
Indentation   +156 added lines, -156 removed lines patch added patch discarded remove patch
@@ -35,161 +35,161 @@
 block discarded – undo
35 35
  */
36 36
 interface IEncryptionModule {
37 37
 
38
-	/**
39
-	 * @return string defining the technical unique id
40
-	 * @since 8.1.0
41
-	 */
42
-	public function getId();
43
-
44
-	/**
45
-	 * In comparison to getKey() this function returns a human readable (maybe translated) name
46
-	 *
47
-	 * @return string
48
-	 * @since 8.1.0
49
-	 */
50
-	public function getDisplayName();
51
-
52
-	/**
53
-	 * start receiving chunks from a file. This is the place where you can
54
-	 * perform some initial step before starting encrypting/decrypting the
55
-	 * chunks
56
-	 *
57
-	 * @param string $path to the file
58
-	 * @param string $user who read/write the file (null for public access)
59
-	 * @param string $mode php stream open mode
60
-	 * @param array $header contains the header data read from the file
61
-	 * @param array $accessList who has access to the file contains the key 'users' and 'public'
62
-	 *
63
-	 * $return array $header contain data as key-value pairs which should be
64
-	 *                       written to the header, in case of a write operation
65
-	 *                       or if no additional data is needed return a empty array
66
-	 * @since 8.1.0
67
-	 */
68
-	public function begin($path, $user, $mode, array $header, array $accessList);
69
-
70
-	/**
71
-	 * last chunk received. This is the place where you can perform some final
72
-	 * operation and return some remaining data if something is left in your
73
-	 * buffer.
74
-	 *
75
-	 * @param string $path to the file
76
-	 * @param string $position id of the last block (looks like "<Number>end")
77
-	 *
78
-	 * @return string remained data which should be written to the file in case
79
-	 *                of a write operation
80
-	 *
81
-	 * @since 8.1.0
82
-	 * @since 9.0.0 parameter $position added
83
-	 */
84
-	public function end($path, $position);
85
-
86
-	/**
87
-	 * encrypt data
88
-	 *
89
-	 * @param string $data you want to encrypt
90
-	 * @param string $position position of the block we want to encrypt (starts with '0')
91
-	 *
92
-	 * @return mixed encrypted data
93
-	 *
94
-	 * @since 8.1.0
95
-	 * @since 9.0.0 parameter $position added
96
-	 */
97
-	public function encrypt($data, $position);
98
-
99
-	/**
100
-	 * decrypt data
101
-	 *
102
-	 * @param string $data you want to decrypt
103
-	 * @param string $position position of the block we want to decrypt
104
-	 *
105
-	 * @return mixed decrypted data
106
-	 *
107
-	 * @since 8.1.0
108
-	 * @since 9.0.0 parameter $position added
109
-	 */
110
-	public function decrypt($data, $position);
111
-
112
-	/**
113
-	 * update encrypted file, e.g. give additional users access to the file
114
-	 *
115
-	 * @param string $path path to the file which should be updated
116
-	 * @param string $uid of the user who performs the operation
117
-	 * @param array $accessList who has access to the file contains the key 'users' and 'public'
118
-	 * @return boolean
119
-	 * @since 8.1.0
120
-	 */
121
-	public function update($path, $uid, array $accessList);
122
-
123
-	/**
124
-	 * should the file be encrypted or not
125
-	 *
126
-	 * @param string $path
127
-	 * @return boolean
128
-	 * @since 8.1.0
129
-	 */
130
-	public function shouldEncrypt($path);
131
-
132
-	/**
133
-	 * get size of the unencrypted payload per block.
134
-	 * ownCloud read/write files with a block size of 8192 byte
135
-	 *
136
-	 * @param bool $signed
137
-	 * @return int
138
-	 * @since 8.1.0 optional parameter $signed was added in 9.0.0
139
-	 */
140
-	public function getUnencryptedBlockSize($signed = false);
141
-
142
-	/**
143
-	 * check if the encryption module is able to read the file,
144
-	 * e.g. if all encryption keys exists
145
-	 *
146
-	 * @param string $path
147
-	 * @param string $uid user for whom we want to check if he can read the file
148
-	 * @return boolean
149
-	 * @since 8.1.0
150
-	 */
151
-	public function isReadable($path, $uid);
152
-
153
-	/**
154
-	 * Initial encryption of all files
155
-	 *
156
-	 * @param InputInterface $input
157
-	 * @param OutputInterface $output write some status information to the terminal during encryption
158
-	 * @since 8.2.0
159
-	 */
160
-	public function encryptAll(InputInterface $input, OutputInterface $output);
161
-
162
-	/**
163
-	 * prepare encryption module to decrypt all files
164
-	 *
165
-	 * @param InputInterface $input
166
-	 * @param OutputInterface $output write some status information to the terminal during encryption
167
-	 * @param $user (optional) for which the files should be decrypted, default = all users
168
-	 * @return bool return false on failure or if it isn't supported by the module
169
-	 * @since 8.2.0
170
-	 */
171
-	public function prepareDecryptAll(InputInterface $input, OutputInterface $output, $user = '');
172
-
173
-	/**
174
-	 * Check if the module is ready to be used by that specific user.
175
-	 * In case a module is not ready - because e.g. key pairs have not been generated
176
-	 * upon login this method can return false before any operation starts and might
177
-	 * cause issues during operations.
178
-	 *
179
-	 * @param string $user
180
-	 * @return boolean
181
-	 * @since 9.1.0
182
-	 */
183
-	public function isReadyForUser($user);
184
-
185
-	/**
186
-	 * Does the encryption module needs a detailed list of users with access to the file?
187
-	 * For example if the encryption module uses per-user encryption keys and needs to know
188
-	 * the users with access to the file to encrypt/decrypt it.
189
-	 *
190
-	 * @since 13.0.0
191
-	 * @return bool
192
-	 */
193
-	public function needDetailedAccessList();
38
+    /**
39
+     * @return string defining the technical unique id
40
+     * @since 8.1.0
41
+     */
42
+    public function getId();
43
+
44
+    /**
45
+     * In comparison to getKey() this function returns a human readable (maybe translated) name
46
+     *
47
+     * @return string
48
+     * @since 8.1.0
49
+     */
50
+    public function getDisplayName();
51
+
52
+    /**
53
+     * start receiving chunks from a file. This is the place where you can
54
+     * perform some initial step before starting encrypting/decrypting the
55
+     * chunks
56
+     *
57
+     * @param string $path to the file
58
+     * @param string $user who read/write the file (null for public access)
59
+     * @param string $mode php stream open mode
60
+     * @param array $header contains the header data read from the file
61
+     * @param array $accessList who has access to the file contains the key 'users' and 'public'
62
+     *
63
+     * $return array $header contain data as key-value pairs which should be
64
+     *                       written to the header, in case of a write operation
65
+     *                       or if no additional data is needed return a empty array
66
+     * @since 8.1.0
67
+     */
68
+    public function begin($path, $user, $mode, array $header, array $accessList);
69
+
70
+    /**
71
+     * last chunk received. This is the place where you can perform some final
72
+     * operation and return some remaining data if something is left in your
73
+     * buffer.
74
+     *
75
+     * @param string $path to the file
76
+     * @param string $position id of the last block (looks like "<Number>end")
77
+     *
78
+     * @return string remained data which should be written to the file in case
79
+     *                of a write operation
80
+     *
81
+     * @since 8.1.0
82
+     * @since 9.0.0 parameter $position added
83
+     */
84
+    public function end($path, $position);
85
+
86
+    /**
87
+     * encrypt data
88
+     *
89
+     * @param string $data you want to encrypt
90
+     * @param string $position position of the block we want to encrypt (starts with '0')
91
+     *
92
+     * @return mixed encrypted data
93
+     *
94
+     * @since 8.1.0
95
+     * @since 9.0.0 parameter $position added
96
+     */
97
+    public function encrypt($data, $position);
98
+
99
+    /**
100
+     * decrypt data
101
+     *
102
+     * @param string $data you want to decrypt
103
+     * @param string $position position of the block we want to decrypt
104
+     *
105
+     * @return mixed decrypted data
106
+     *
107
+     * @since 8.1.0
108
+     * @since 9.0.0 parameter $position added
109
+     */
110
+    public function decrypt($data, $position);
111
+
112
+    /**
113
+     * update encrypted file, e.g. give additional users access to the file
114
+     *
115
+     * @param string $path path to the file which should be updated
116
+     * @param string $uid of the user who performs the operation
117
+     * @param array $accessList who has access to the file contains the key 'users' and 'public'
118
+     * @return boolean
119
+     * @since 8.1.0
120
+     */
121
+    public function update($path, $uid, array $accessList);
122
+
123
+    /**
124
+     * should the file be encrypted or not
125
+     *
126
+     * @param string $path
127
+     * @return boolean
128
+     * @since 8.1.0
129
+     */
130
+    public function shouldEncrypt($path);
131
+
132
+    /**
133
+     * get size of the unencrypted payload per block.
134
+     * ownCloud read/write files with a block size of 8192 byte
135
+     *
136
+     * @param bool $signed
137
+     * @return int
138
+     * @since 8.1.0 optional parameter $signed was added in 9.0.0
139
+     */
140
+    public function getUnencryptedBlockSize($signed = false);
141
+
142
+    /**
143
+     * check if the encryption module is able to read the file,
144
+     * e.g. if all encryption keys exists
145
+     *
146
+     * @param string $path
147
+     * @param string $uid user for whom we want to check if he can read the file
148
+     * @return boolean
149
+     * @since 8.1.0
150
+     */
151
+    public function isReadable($path, $uid);
152
+
153
+    /**
154
+     * Initial encryption of all files
155
+     *
156
+     * @param InputInterface $input
157
+     * @param OutputInterface $output write some status information to the terminal during encryption
158
+     * @since 8.2.0
159
+     */
160
+    public function encryptAll(InputInterface $input, OutputInterface $output);
161
+
162
+    /**
163
+     * prepare encryption module to decrypt all files
164
+     *
165
+     * @param InputInterface $input
166
+     * @param OutputInterface $output write some status information to the terminal during encryption
167
+     * @param $user (optional) for which the files should be decrypted, default = all users
168
+     * @return bool return false on failure or if it isn't supported by the module
169
+     * @since 8.2.0
170
+     */
171
+    public function prepareDecryptAll(InputInterface $input, OutputInterface $output, $user = '');
172
+
173
+    /**
174
+     * Check if the module is ready to be used by that specific user.
175
+     * In case a module is not ready - because e.g. key pairs have not been generated
176
+     * upon login this method can return false before any operation starts and might
177
+     * cause issues during operations.
178
+     *
179
+     * @param string $user
180
+     * @return boolean
181
+     * @since 9.1.0
182
+     */
183
+    public function isReadyForUser($user);
184
+
185
+    /**
186
+     * Does the encryption module needs a detailed list of users with access to the file?
187
+     * For example if the encryption module uses per-user encryption keys and needs to know
188
+     * the users with access to the file to encrypt/decrypt it.
189
+     *
190
+     * @since 13.0.0
191
+     * @return bool
192
+     */
193
+    public function needDetailedAccessList();
194 194
 
195 195
 }
Please login to merge, or discard this patch.
apps/encryption/templates/settings-admin.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,10 +9,13 @@  discard block
 block discarded – undo
9 9
 	<h3><?php p($l->t("Default encryption module")); ?></h3>
10 10
 	<?php if(!$_["initStatus"] && $_['masterKeyEnabled'] === false): ?>
11 11
 		<?php p($l->t("Encryption app is enabled but your keys are not initialized, please log-out and log-in again")); ?>
12
-	<?php else: ?>
12
+	<?php else {
13
+    : ?>
13 14
 		<p id="encryptHomeStorageSetting">
14 15
 			<input type="checkbox" class="checkbox" name="encrypt_home_storage" id="encryptHomeStorage"
15
-				   value="1" <?php if ($_['encryptHomeStorage']) print_unescaped('checked="checked"'); ?> />
16
+				   value="1" <?php if ($_['encryptHomeStorage']) print_unescaped('checked="checked"');
17
+}
18
+?> />
16 19
 			<label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage'));?></label></br>
17 20
 			<em><?php p( $l->t( "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" ) ); ?></em>
18 21
 		</p>
@@ -42,7 +45,10 @@  discard block
 block discarded – undo
42 45
 			</p>
43 46
 			<br/><br/>
44 47
 
45
-			<p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if($_['recoveryEnabled'] === '0') print_unescaped('class="hidden"');?>>
48
+			<p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if($_['recoveryEnabled'] === '0') {
49
+    print_unescaped('class="hidden"');
50
+}
51
+?>>
46 52
 				<?php p($l->t("Change recovery key password:")); ?>
47 53
 				<span class="msg"></span>
48 54
 				<br/>
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@  discard block
 block discarded – undo
7 7
 ?>
8 8
 <form id="ocDefaultEncryptionModule" class="sub-section">
9 9
 	<h3><?php p($l->t("Default encryption module")); ?></h3>
10
-	<?php if(!$_["initStatus"] && $_['masterKeyEnabled'] === false): ?>
10
+	<?php if (!$_["initStatus"] && $_['masterKeyEnabled'] === false): ?>
11 11
 		<?php p($l->t("Encryption app is enabled but your keys are not initialized, please log-out and log-in again")); ?>
12 12
 	<?php else: ?>
13 13
 		<p id="encryptHomeStorageSetting">
14 14
 			<input type="checkbox" class="checkbox" name="encrypt_home_storage" id="encryptHomeStorage"
15 15
 				   value="1" <?php if ($_['encryptHomeStorage']) print_unescaped('checked="checked"'); ?> />
16
-			<label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage'));?></label></br>
17
-			<em><?php p( $l->t( "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" ) ); ?></em>
16
+			<label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage')); ?></label></br>
17
+			<em><?php p($l->t("Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted")); ?></em>
18 18
 		</p>
19 19
 		<br />
20
-		<?php if($_['masterKeyEnabled'] === false): ?>
20
+		<?php if ($_['masterKeyEnabled'] === false): ?>
21 21
 			<p id="encryptionSetRecoveryKey">
22 22
 				<?php $_["recoveryEnabled"] === '0' ?  p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?>
23 23
 				<span class="msg"></span>
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 			</p>
43 43
 			<br/><br/>
44 44
 
45
-			<p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if($_['recoveryEnabled'] === '0') print_unescaped('class="hidden"');?>>
45
+			<p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if ($_['recoveryEnabled'] === '0') print_unescaped('class="hidden"'); ?>>
46 46
 				<?php p($l->t("Change recovery key password:")); ?>
47 47
 				<span class="msg"></span>
48 48
 				<br/>
Please login to merge, or discard this patch.
apps/encryption/lib/Migration/SetMasterKeyStatus.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -35,43 +35,43 @@
 block discarded – undo
35 35
 class SetMasterKeyStatus implements IRepairStep {
36 36
 
37 37
 
38
-	/** @var  IConfig */
39
-	private $config;
38
+    /** @var  IConfig */
39
+    private $config;
40 40
 
41 41
 
42
-	public function __construct(IConfig $config) {
43
-		$this->config = $config;
44
-	}
42
+    public function __construct(IConfig $config) {
43
+        $this->config = $config;
44
+    }
45 45
 
46
-	/**
47
-	 * Returns the step's name
48
-	 *
49
-	 * @return string
50
-	 * @since 9.1.0
51
-	 */
52
-	public function getName() {
53
-		return 'Write default encryption module configuration to the database';
54
-	}
46
+    /**
47
+     * Returns the step's name
48
+     *
49
+     * @return string
50
+     * @since 9.1.0
51
+     */
52
+    public function getName() {
53
+        return 'Write default encryption module configuration to the database';
54
+    }
55 55
 
56
-	/**
57
-	 * @param IOutput $output
58
-	 */
59
-	public function run(IOutput $output) {
60
-		if (!$this->shouldRun()) {
61
-			return;
62
-		}
56
+    /**
57
+     * @param IOutput $output
58
+     */
59
+    public function run(IOutput $output) {
60
+        if (!$this->shouldRun()) {
61
+            return;
62
+        }
63 63
 
64
-		// if no config for the master key is set we set it explicitly to '0' in
65
-		// order not to break old installations because the default changed to '1'.
66
-		$configAlreadySet = $this->config->getAppValue('encryption', 'useMasterKey', false);
67
-		if ($configAlreadySet === false) {
68
-			$this->config->setAppValue('encryption', 'useMasterKey', '0');
69
-		}
70
-	}
64
+        // if no config for the master key is set we set it explicitly to '0' in
65
+        // order not to break old installations because the default changed to '1'.
66
+        $configAlreadySet = $this->config->getAppValue('encryption', 'useMasterKey', false);
67
+        if ($configAlreadySet === false) {
68
+            $this->config->setAppValue('encryption', 'useMasterKey', '0');
69
+        }
70
+    }
71 71
 
72
-	protected function shouldRun() {
73
-		$appVersion = $this->config->getAppValue('encryption', 'installed_version', '0.0.0');
74
-		return version_compare($appVersion, '2.0.0', '<');
75
-	}
72
+    protected function shouldRun() {
73
+        $appVersion = $this->config->getAppValue('encryption', 'installed_version', '0.0.0');
74
+        return version_compare($appVersion, '2.0.0', '<');
75
+    }
76 76
 
77 77
 }
Please login to merge, or discard this patch.
apps/encryption/lib/Command/DisableMasterKey.php 2 patches
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -33,57 +33,57 @@
 block discarded – undo
33 33
 
34 34
 class DisableMasterKey extends Command {
35 35
 
36
-	/** @var Util */
37
-	protected $util;
38
-
39
-	/** @var IConfig */
40
-	protected $config;
41
-
42
-	/** @var  QuestionHelper */
43
-	protected $questionHelper;
44
-
45
-	/**
46
-	 * @param Util $util
47
-	 * @param IConfig $config
48
-	 * @param QuestionHelper $questionHelper
49
-	 */
50
-	public function __construct(Util $util,
51
-								IConfig $config,
52
-								QuestionHelper $questionHelper) {
53
-
54
-		$this->util = $util;
55
-		$this->config = $config;
56
-		$this->questionHelper = $questionHelper;
57
-		parent::__construct();
58
-	}
59
-
60
-	protected function configure() {
61
-		$this
62
-			->setName('encryption:disable-master-key')
63
-			->setDescription('Disable the master key and use per-user keys instead. Only available for fresh installations with no existing encrypted data! There is no way to enable it again.');
64
-	}
65
-
66
-	protected function execute(InputInterface $input, OutputInterface $output) {
67
-
68
-		$isMasterKeyEnabled = $this->util->isMasterKeyEnabled();
69
-
70
-		if(!$isMasterKeyEnabled) {
71
-			$output->writeln('Master key already disabled');
72
-		} else {
73
-			$question = new ConfirmationQuestion(
74
-				'Warning: Only perform this operation for a fresh installations with no existing encrypted data! '
75
-				. 'There is no way to enable the master key again. '
76
-				. 'We strongly recommend to keep the master key, it provides significant performance improvements '
77
-				. 'and is easier to handle for both, users and administrators. '
78
-				. 'Do you really want to switch to per-user keys? (y/n) ', false);
79
-			if ($this->questionHelper->ask($input, $output, $question)) {
80
-				$this->config->setAppValue('encryption', 'useMasterKey', '0');
81
-				$output->writeln('Master key successfully disabled.');
82
-			} else {
83
-				$output->writeln('aborted.');
84
-			}
85
-		}
86
-
87
-	}
36
+    /** @var Util */
37
+    protected $util;
38
+
39
+    /** @var IConfig */
40
+    protected $config;
41
+
42
+    /** @var  QuestionHelper */
43
+    protected $questionHelper;
44
+
45
+    /**
46
+     * @param Util $util
47
+     * @param IConfig $config
48
+     * @param QuestionHelper $questionHelper
49
+     */
50
+    public function __construct(Util $util,
51
+                                IConfig $config,
52
+                                QuestionHelper $questionHelper) {
53
+
54
+        $this->util = $util;
55
+        $this->config = $config;
56
+        $this->questionHelper = $questionHelper;
57
+        parent::__construct();
58
+    }
59
+
60
+    protected function configure() {
61
+        $this
62
+            ->setName('encryption:disable-master-key')
63
+            ->setDescription('Disable the master key and use per-user keys instead. Only available for fresh installations with no existing encrypted data! There is no way to enable it again.');
64
+    }
65
+
66
+    protected function execute(InputInterface $input, OutputInterface $output) {
67
+
68
+        $isMasterKeyEnabled = $this->util->isMasterKeyEnabled();
69
+
70
+        if(!$isMasterKeyEnabled) {
71
+            $output->writeln('Master key already disabled');
72
+        } else {
73
+            $question = new ConfirmationQuestion(
74
+                'Warning: Only perform this operation for a fresh installations with no existing encrypted data! '
75
+                . 'There is no way to enable the master key again. '
76
+                . 'We strongly recommend to keep the master key, it provides significant performance improvements '
77
+                . 'and is easier to handle for both, users and administrators. '
78
+                . 'Do you really want to switch to per-user keys? (y/n) ', false);
79
+            if ($this->questionHelper->ask($input, $output, $question)) {
80
+                $this->config->setAppValue('encryption', 'useMasterKey', '0');
81
+                $output->writeln('Master key successfully disabled.');
82
+            } else {
83
+                $output->writeln('aborted.');
84
+            }
85
+        }
86
+
87
+    }
88 88
 
89 89
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 
68 68
 		$isMasterKeyEnabled = $this->util->isMasterKeyEnabled();
69 69
 
70
-		if(!$isMasterKeyEnabled) {
70
+		if (!$isMasterKeyEnabled) {
71 71
 			$output->writeln('Master key already disabled');
72 72
 		} else {
73 73
 			$question = new ConfirmationQuestion(
Please login to merge, or discard this patch.
settings/Controller/PersonalSettingsController.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	protected function getSettings($section) {
68 68
 		$settings = $this->settingsManager->getPersonalSettings($section);
69 69
 		$formatted = $this->formatSettings($settings);
70
-		if($section === 'additional') {
70
+		if ($section === 'additional') {
71 71
 			$formatted['content'] .= $this->getLegacyForms();
72 72
 		}
73 73
 		return $formatted;
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
 	private function getLegacyForms() {
80 80
 		$forms = \OC_App::getForms('personal');
81 81
 
82
-		$forms = array_map(function ($form) {
82
+		$forms = array_map(function($form) {
83 83
 			if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) {
84
-				$sectionName = str_replace('<h2' . $regs['class'] . '>', '', $regs[0]);
84
+				$sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]);
85 85
 				$sectionName = str_replace('</h2>', '', $sectionName);
86 86
 				$anchor = strtolower($sectionName);
87 87
 				$anchor = str_replace(' ', '-', $anchor);
Please login to merge, or discard this patch.
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -35,78 +35,78 @@
 block discarded – undo
35 35
 use OCP\Template;
36 36
 
37 37
 class PersonalSettingsController extends Controller {
38
-	use CommonSettingsTrait;
38
+    use CommonSettingsTrait;
39 39
 
40
-	public function __construct(
41
-		$appName,
42
-		IRequest $request,
43
-		INavigationManager $navigationManager,
44
-		ISettingsManager $settingsManager,
45
-		IUserSession $userSession,
46
-		IGroupManager $groupManager,
47
-		ISubAdmin $subAdmin
48
-	) {
49
-		parent::__construct($appName, $request);
50
-		$this->navigationManager = $navigationManager;
51
-		$this->settingsManager = $settingsManager;
52
-		$this->userSession = $userSession;
53
-		$this->subAdmin = $subAdmin;
54
-		$this->groupManager = $groupManager;
55
-	}
40
+    public function __construct(
41
+        $appName,
42
+        IRequest $request,
43
+        INavigationManager $navigationManager,
44
+        ISettingsManager $settingsManager,
45
+        IUserSession $userSession,
46
+        IGroupManager $groupManager,
47
+        ISubAdmin $subAdmin
48
+    ) {
49
+        parent::__construct($appName, $request);
50
+        $this->navigationManager = $navigationManager;
51
+        $this->settingsManager = $settingsManager;
52
+        $this->userSession = $userSession;
53
+        $this->subAdmin = $subAdmin;
54
+        $this->groupManager = $groupManager;
55
+    }
56 56
 
57
-	/**
58
-	 * @param string $section
59
-	 * @return TemplateResponse
60
-	 *
61
-	 * @NoCSRFRequired
62
-	 * @NoAdminRequired
63
-	 * @NoSubadminRequired
64
-	 */
65
-	public function index($section) {
66
-		return $this->getIndexResponse('personal', $section);
57
+    /**
58
+     * @param string $section
59
+     * @return TemplateResponse
60
+     *
61
+     * @NoCSRFRequired
62
+     * @NoAdminRequired
63
+     * @NoSubadminRequired
64
+     */
65
+    public function index($section) {
66
+        return $this->getIndexResponse('personal', $section);
67 67
 
68
-	}
68
+    }
69 69
 
70
-	/**
71
-	 * @param string $section
72
-	 * @return array
73
-	 */
74
-	protected function getSettings($section) {
75
-		$settings = $this->settingsManager->getPersonalSettings($section);
76
-		$formatted = $this->formatSettings($settings);
77
-		if($section === 'additional') {
78
-			$formatted['content'] .= $this->getLegacyForms();
79
-		}
80
-		return $formatted;
81
-	}
70
+    /**
71
+     * @param string $section
72
+     * @return array
73
+     */
74
+    protected function getSettings($section) {
75
+        $settings = $this->settingsManager->getPersonalSettings($section);
76
+        $formatted = $this->formatSettings($settings);
77
+        if($section === 'additional') {
78
+            $formatted['content'] .= $this->getLegacyForms();
79
+        }
80
+        return $formatted;
81
+    }
82 82
 
83
-	/**
84
-	 * @return bool|string
85
-	 */
86
-	private function getLegacyForms() {
87
-		$forms = \OC_App::getForms('personal');
83
+    /**
84
+     * @return bool|string
85
+     */
86
+    private function getLegacyForms() {
87
+        $forms = \OC_App::getForms('personal');
88 88
 
89
-		$forms = array_map(function ($form) {
90
-			if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) {
91
-				$sectionName = str_replace('<h2' . $regs['class'] . '>', '', $regs[0]);
92
-				$sectionName = str_replace('</h2>', '', $sectionName);
93
-				$anchor = strtolower($sectionName);
94
-				$anchor = str_replace(' ', '-', $anchor);
89
+        $forms = array_map(function ($form) {
90
+            if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) {
91
+                $sectionName = str_replace('<h2' . $regs['class'] . '>', '', $regs[0]);
92
+                $sectionName = str_replace('</h2>', '', $sectionName);
93
+                $anchor = strtolower($sectionName);
94
+                $anchor = str_replace(' ', '-', $anchor);
95 95
 
96
-				return array(
97
-					'anchor' => $anchor,
98
-					'section-name' => $sectionName,
99
-					'form' => $form
100
-				);
101
-			}
102
-			return array(
103
-				'form' => $form
104
-			);
105
-		}, $forms);
96
+                return array(
97
+                    'anchor' => $anchor,
98
+                    'section-name' => $sectionName,
99
+                    'form' => $form
100
+                );
101
+            }
102
+            return array(
103
+                'form' => $form
104
+            );
105
+        }, $forms);
106 106
 
107
-		$out = new Template('settings', 'settings/additional');
108
-		$out->assign('forms', $forms);
107
+        $out = new Template('settings', 'settings/additional');
108
+        $out->assign('forms', $forms);
109 109
 
110
-		return $out->fetchPage();
111
-	}
110
+        return $out->fetchPage();
111
+    }
112 112
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Settings/Personal.php 1 patch
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -32,72 +32,72 @@
 block discarded – undo
32 32
 
33 33
 class Personal implements ISettings {
34 34
 
35
-	/** @var IManager */
36
-	private $encryptionManager;
35
+    /** @var IManager */
36
+    private $encryptionManager;
37 37
 
38
-	/** @var UserGlobalStoragesService */
39
-	private $userGlobalStoragesService;
38
+    /** @var UserGlobalStoragesService */
39
+    private $userGlobalStoragesService;
40 40
 
41
-	/** @var BackendService */
42
-	private $backendService;
41
+    /** @var BackendService */
42
+    private $backendService;
43 43
 
44
-	/** @var GlobalAuth	 */
45
-	private $globalAuth;
44
+    /** @var GlobalAuth	 */
45
+    private $globalAuth;
46 46
 
47
-	/** @var IUserSession */
48
-	private $userSession;
47
+    /** @var IUserSession */
48
+    private $userSession;
49 49
 
50
-	public function __construct(
51
-		IManager $encryptionManager,
52
-		UserGlobalStoragesService $userGlobalStoragesService,
53
-		BackendService $backendService,
54
-		GlobalAuth $globalAuth,
55
-		IUserSession $userSession
56
-	) {
57
-		$this->encryptionManager = $encryptionManager;
58
-		$this->userGlobalStoragesService = $userGlobalStoragesService;
59
-		$this->backendService = $backendService;
60
-		$this->globalAuth = $globalAuth;
61
-		$this->userSession = $userSession;
62
-	}
50
+    public function __construct(
51
+        IManager $encryptionManager,
52
+        UserGlobalStoragesService $userGlobalStoragesService,
53
+        BackendService $backendService,
54
+        GlobalAuth $globalAuth,
55
+        IUserSession $userSession
56
+    ) {
57
+        $this->encryptionManager = $encryptionManager;
58
+        $this->userGlobalStoragesService = $userGlobalStoragesService;
59
+        $this->backendService = $backendService;
60
+        $this->globalAuth = $globalAuth;
61
+        $this->userSession = $userSession;
62
+    }
63 63
 
64
-	/**
65
-	 * @return TemplateResponse
66
-	 */
67
-	public function getForm() {
68
-		$uid = $this->userSession->getUser()->getUID();
64
+    /**
65
+     * @return TemplateResponse
66
+     */
67
+    public function getForm() {
68
+        $uid = $this->userSession->getUser()->getUID();
69 69
 
70
-		$parameters = [
71
-			'encryptionEnabled'    => $this->encryptionManager->isEnabled(),
72
-			'visibilityType'       => BackendService::VISIBILITY_PERSONAL,
73
-			'storages'             => $this->userGlobalStoragesService->getStorages(),
74
-			'backends'             => $this->backendService->getAvailableBackends(),
75
-			'authMechanisms'       => $this->backendService->getAuthMechanisms(),
76
-			'dependencies'         => \OC_Mount_Config::dependencyMessage($this->backendService->getBackends()),
77
-			'allowUserMounting'    => $this->backendService->isUserMountingAllowed(),
78
-			'globalCredentials'    => $this->globalAuth->getAuth($uid),
79
-			'globalCredentialsUid' => $uid,
80
-		];
70
+        $parameters = [
71
+            'encryptionEnabled'    => $this->encryptionManager->isEnabled(),
72
+            'visibilityType'       => BackendService::VISIBILITY_PERSONAL,
73
+            'storages'             => $this->userGlobalStoragesService->getStorages(),
74
+            'backends'             => $this->backendService->getAvailableBackends(),
75
+            'authMechanisms'       => $this->backendService->getAuthMechanisms(),
76
+            'dependencies'         => \OC_Mount_Config::dependencyMessage($this->backendService->getBackends()),
77
+            'allowUserMounting'    => $this->backendService->isUserMountingAllowed(),
78
+            'globalCredentials'    => $this->globalAuth->getAuth($uid),
79
+            'globalCredentialsUid' => $uid,
80
+        ];
81 81
 
82
-		return new TemplateResponse('files_external', 'settings', $parameters, '');
83
-	}
82
+        return new TemplateResponse('files_external', 'settings', $parameters, '');
83
+    }
84 84
 
85
-	/**
86
-	 * @return string the section ID, e.g. 'sharing'
87
-	 */
88
-	public function getSection() {
89
-		return 'externalstorages';
90
-	}
85
+    /**
86
+     * @return string the section ID, e.g. 'sharing'
87
+     */
88
+    public function getSection() {
89
+        return 'externalstorages';
90
+    }
91 91
 
92
-	/**
93
-	 * @return int whether the form should be rather on the top or bottom of
94
-	 * the admin section. The forms are arranged in ascending order of the
95
-	 * priority values. It is required to return a value between 0 and 100.
96
-	 *
97
-	 * E.g.: 70
98
-	 */
99
-	public function getPriority() {
100
-		return 40;
101
-	}
92
+    /**
93
+     * @return int whether the form should be rather on the top or bottom of
94
+     * the admin section. The forms are arranged in ascending order of the
95
+     * priority values. It is required to return a value between 0 and 100.
96
+     *
97
+     * E.g.: 70
98
+     */
99
+    public function getPriority() {
100
+        return 40;
101
+    }
102 102
 
103 103
 }
Please login to merge, or discard this patch.