Completed
Pull Request — master (#9367)
by John
22:00
created
lib/private/Template/JSCombiner.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -151,6 +151,7 @@
 block discarded – undo
151 151
 	 * @param string $path
152 152
 	 * @param string $fileName
153 153
 	 * @param ISimpleFolder $folder
154
+	 * @param string $app
154 155
 	 * @return bool
155 156
 	 */
156 157
 	protected function cache($path, $fileName, ISimpleFolder $folder, $app) {
Please login to merge, or discard this patch.
Indentation   +235 added lines, -235 removed lines patch added patch discarded remove patch
@@ -36,239 +36,239 @@
 block discarded – undo
36 36
 
37 37
 class JSCombiner {
38 38
 
39
-	/** @var IAppData */
40
-	protected $appData;
41
-
42
-	/** @var IURLGenerator */
43
-	protected $urlGenerator;
44
-
45
-	/** @var ICache */
46
-	protected $depsCache;
47
-
48
-	/** @var SystemConfig */
49
-	protected $config;
50
-
51
-	/** @var ILogger */
52
-	protected $logger;
53
-
54
-	/** @var ICacheFactory */
55
-	private $cacheFactory;
56
-
57
-	/**
58
-	 * @param IAppData $appData
59
-	 * @param IURLGenerator $urlGenerator
60
-	 * @param ICacheFactory $cacheFactory
61
-	 * @param SystemConfig $config
62
-	 * @param ILogger $logger
63
-	 */
64
-	public function __construct(IAppData $appData,
65
-								IURLGenerator $urlGenerator,
66
-								ICacheFactory $cacheFactory,
67
-								SystemConfig $config,
68
-								ILogger $logger) {
69
-		$this->appData = $appData;
70
-		$this->urlGenerator = $urlGenerator;
71
-		$this->cacheFactory = $cacheFactory;
72
-		$this->depsCache = $this->cacheFactory->createDistributed('JS-' . md5($this->urlGenerator->getBaseUrl()));
73
-		$this->config = $config;
74
-		$this->logger = $logger;
75
-	}
76
-
77
-	/**
78
-	 * @param string $root
79
-	 * @param string $file
80
-	 * @param string $app
81
-	 * @return bool
82
-	 */
83
-	public function process($root, $file, $app) {
84
-		if ($this->config->getValue('debug') || !$this->config->getValue('installed')) {
85
-			return false;
86
-		}
87
-
88
-		$path = explode('/', $root . '/' . $file);
89
-
90
-		$fileName = array_pop($path);
91
-		$path = implode('/', $path);
92
-
93
-		try {
94
-			$folder = $this->appData->getFolder($app);
95
-		} catch(NotFoundException $e) {
96
-			// creating css appdata folder
97
-			$folder = $this->appData->newFolder($app);
98
-		}
99
-
100
-		if($this->isCached($fileName, $folder, $app)) {
101
-			return true;
102
-		}
103
-		return $this->cache($path, $fileName, $folder, $app);
104
-	}
105
-
106
-	/**
107
-	 * @param string $fileName
108
-	 * @param ISimpleFolder $folder
109
-	 * @return bool
110
-	 */
111
-	protected function isCached($fileName, ISimpleFolder $folder, string $app) {
112
-		$fileName = $this->prependVersionPrefix(str_replace('.json', '.js', $fileName), $app);
113
-
114
-		if (!$folder->fileExists($fileName)) {
115
-			return false;
116
-		}
117
-
118
-		$fileName = $fileName . '.deps';
119
-		try {
120
-			$deps = $this->depsCache->get($folder->getName() . '-' . $fileName);
121
-			if ($deps === null || $deps === '') {
122
-				$depFile = $folder->getFile($fileName);
123
-				$deps = $depFile->getContent();
124
-			}
125
-
126
-			// check again
127
-			if ($deps === null || $deps === '') {
128
-				$this->logger->info('JSCombiner: deps file empty: ' . $fileName);
129
-				return false;
130
-			}
131
-
132
-			$deps = json_decode($deps, true);
133
-
134
-			if ($deps === NULL) {
135
-				return false;
136
-			}
137
-
138
-			foreach ($deps as $file=>$mtime) {
139
-				if (!file_exists($file) || filemtime($file) > $mtime) {
140
-					return false;
141
-				}
142
-			}
143
-
144
-			return true;
145
-		} catch(NotFoundException $e) {
146
-			return false;
147
-		}
148
-	}
149
-
150
-	/**
151
-	 * @param string $path
152
-	 * @param string $fileName
153
-	 * @param ISimpleFolder $folder
154
-	 * @return bool
155
-	 */
156
-	protected function cache($path, $fileName, ISimpleFolder $folder, $app) {
157
-		$deps = [];
158
-		$fullPath = $path . '/' . $fileName;
159
-		$data = json_decode(file_get_contents($fullPath));
160
-		$deps[$fullPath] = filemtime($fullPath);
161
-
162
-		$res = '';
163
-		foreach ($data as $file) {
164
-			$filePath = $path . '/' . $file;
165
-
166
-			if (is_file($filePath)) {
167
-				$res .= file_get_contents($filePath);
168
-				$res .= PHP_EOL . PHP_EOL;
169
-				$deps[$filePath] = filemtime($filePath);
170
-			}
171
-		}
172
-
173
-		$fileNameCached = $this->prependVersionPrefix(str_replace('.json', '.js', $fileName), $app);
174
-		try {
175
-			$cachedfile = $folder->getFile($fileNameCached);
176
-		} catch(NotFoundException $e) {
177
-			$cachedfile = $folder->newFile($fileNameCached);
178
-		}
179
-
180
-		$depFileName = $fileNameCached . '.deps';
181
-		try {
182
-			$depFile = $folder->getFile($depFileName);
183
-		} catch (NotFoundException $e) {
184
-			$depFile = $folder->newFile($depFileName);
185
-		}
186
-
187
-		try {
188
-			$gzipFile = $folder->getFile($fileNameCached . '.gzip'); # Safari doesn't like .gz
189
-		} catch (NotFoundException $e) {
190
-			$gzipFile = $folder->newFile($fileNameCached . '.gzip'); # Safari doesn't like .gz
191
-		}
192
-
193
-		try {
194
-			$cachedfile->putContent($res);
195
-			$deps = json_encode($deps);
196
-			$depFile->putContent($deps);
197
-			$this->depsCache->set($folder->getName() . '-' . $depFileName, $deps);
198
-			$gzipFile->putContent(gzencode($res, 9));
199
-			$this->logger->debug('JSCombiner: successfully cached: ' . $fileNameCached);
200
-			return true;
201
-		} catch (NotPermittedException $e) {
202
-			$this->logger->error('JSCombiner: unable to cache: ' . $fileNameCached);
203
-			return false;
204
-		}
205
-	}
206
-
207
-	/**
208
-	 * @param string $appName
209
-	 * @param string $fileName
210
-	 * @return string
211
-	 */
212
-	public function getCachedJS($appName, $fileName) {
213
-		$tmpfileLoc = explode('/', $fileName);
214
-		$fileName = array_pop($tmpfileLoc);
215
-		$fileName = $this->prependVersionPrefix(str_replace('.json', '.js', $fileName), $appName);
216
-
217
-		return substr($this->urlGenerator->linkToRoute('core.Js.getJs', array('fileName' => $fileName, 'appName' => $appName)), strlen(\OC::$WEBROOT) + 1);
218
-	}
219
-
220
-	/**
221
-	 * @param string $root
222
-	 * @param string $file
223
-	 * @return string[]
224
-	 */
225
-	public function getContent($root, $file) {
226
-		/** @var array $data */
227
-		$data = json_decode(file_get_contents($root . '/' . $file));
228
-		if(!is_array($data)) {
229
-			return [];
230
-		}
231
-
232
-		$path = explode('/', $file);
233
-		array_pop($path);
234
-		$path = implode('/', $path);
235
-
236
-		$result = [];
237
-		foreach ($data as $f) {
238
-			$result[] = $path . '/' . $f;
239
-		}
240
-
241
-		return $result;
242
-	}
243
-
244
-
245
-	/**
246
-	 * Clear cache with combined javascript files
247
-	 *
248
-	 * @throws NotFoundException
249
-	 */
250
-	public function resetCache() {
251
-		$this->cacheFactory->createDistributed('JS-')->clear();
252
-		$appDirectory = $this->appData->getDirectoryListing();
253
-		foreach ($appDirectory as $folder) {
254
-			foreach ($folder->getDirectoryListing() as $file) {
255
-				$file->delete();
256
-			}
257
-		}
258
-	}
259
-
260
-	/**
261
-	 * Prepend hashed app version hash
262
-	 * @param string $jsFile
263
-	 * @param string $appId
264
-	 * @return string
265
-	 */
266
-	private function prependVersionPrefix(string $jsFile, string $appId): string {
267
-		$appVersion = \OC_App::getAppVersion($appId);
268
-		if ($appVersion !== '0') {
269
-			return substr(md5($appVersion), 0, 5) . '-' . $jsFile;
270
-		}
271
-		$coreVersion = \OC_Util::getVersionString();
272
-		return substr(md5($coreVersion), 0, 5) . '-' . $jsFile;
273
-	}
39
+    /** @var IAppData */
40
+    protected $appData;
41
+
42
+    /** @var IURLGenerator */
43
+    protected $urlGenerator;
44
+
45
+    /** @var ICache */
46
+    protected $depsCache;
47
+
48
+    /** @var SystemConfig */
49
+    protected $config;
50
+
51
+    /** @var ILogger */
52
+    protected $logger;
53
+
54
+    /** @var ICacheFactory */
55
+    private $cacheFactory;
56
+
57
+    /**
58
+     * @param IAppData $appData
59
+     * @param IURLGenerator $urlGenerator
60
+     * @param ICacheFactory $cacheFactory
61
+     * @param SystemConfig $config
62
+     * @param ILogger $logger
63
+     */
64
+    public function __construct(IAppData $appData,
65
+                                IURLGenerator $urlGenerator,
66
+                                ICacheFactory $cacheFactory,
67
+                                SystemConfig $config,
68
+                                ILogger $logger) {
69
+        $this->appData = $appData;
70
+        $this->urlGenerator = $urlGenerator;
71
+        $this->cacheFactory = $cacheFactory;
72
+        $this->depsCache = $this->cacheFactory->createDistributed('JS-' . md5($this->urlGenerator->getBaseUrl()));
73
+        $this->config = $config;
74
+        $this->logger = $logger;
75
+    }
76
+
77
+    /**
78
+     * @param string $root
79
+     * @param string $file
80
+     * @param string $app
81
+     * @return bool
82
+     */
83
+    public function process($root, $file, $app) {
84
+        if ($this->config->getValue('debug') || !$this->config->getValue('installed')) {
85
+            return false;
86
+        }
87
+
88
+        $path = explode('/', $root . '/' . $file);
89
+
90
+        $fileName = array_pop($path);
91
+        $path = implode('/', $path);
92
+
93
+        try {
94
+            $folder = $this->appData->getFolder($app);
95
+        } catch(NotFoundException $e) {
96
+            // creating css appdata folder
97
+            $folder = $this->appData->newFolder($app);
98
+        }
99
+
100
+        if($this->isCached($fileName, $folder, $app)) {
101
+            return true;
102
+        }
103
+        return $this->cache($path, $fileName, $folder, $app);
104
+    }
105
+
106
+    /**
107
+     * @param string $fileName
108
+     * @param ISimpleFolder $folder
109
+     * @return bool
110
+     */
111
+    protected function isCached($fileName, ISimpleFolder $folder, string $app) {
112
+        $fileName = $this->prependVersionPrefix(str_replace('.json', '.js', $fileName), $app);
113
+
114
+        if (!$folder->fileExists($fileName)) {
115
+            return false;
116
+        }
117
+
118
+        $fileName = $fileName . '.deps';
119
+        try {
120
+            $deps = $this->depsCache->get($folder->getName() . '-' . $fileName);
121
+            if ($deps === null || $deps === '') {
122
+                $depFile = $folder->getFile($fileName);
123
+                $deps = $depFile->getContent();
124
+            }
125
+
126
+            // check again
127
+            if ($deps === null || $deps === '') {
128
+                $this->logger->info('JSCombiner: deps file empty: ' . $fileName);
129
+                return false;
130
+            }
131
+
132
+            $deps = json_decode($deps, true);
133
+
134
+            if ($deps === NULL) {
135
+                return false;
136
+            }
137
+
138
+            foreach ($deps as $file=>$mtime) {
139
+                if (!file_exists($file) || filemtime($file) > $mtime) {
140
+                    return false;
141
+                }
142
+            }
143
+
144
+            return true;
145
+        } catch(NotFoundException $e) {
146
+            return false;
147
+        }
148
+    }
149
+
150
+    /**
151
+     * @param string $path
152
+     * @param string $fileName
153
+     * @param ISimpleFolder $folder
154
+     * @return bool
155
+     */
156
+    protected function cache($path, $fileName, ISimpleFolder $folder, $app) {
157
+        $deps = [];
158
+        $fullPath = $path . '/' . $fileName;
159
+        $data = json_decode(file_get_contents($fullPath));
160
+        $deps[$fullPath] = filemtime($fullPath);
161
+
162
+        $res = '';
163
+        foreach ($data as $file) {
164
+            $filePath = $path . '/' . $file;
165
+
166
+            if (is_file($filePath)) {
167
+                $res .= file_get_contents($filePath);
168
+                $res .= PHP_EOL . PHP_EOL;
169
+                $deps[$filePath] = filemtime($filePath);
170
+            }
171
+        }
172
+
173
+        $fileNameCached = $this->prependVersionPrefix(str_replace('.json', '.js', $fileName), $app);
174
+        try {
175
+            $cachedfile = $folder->getFile($fileNameCached);
176
+        } catch(NotFoundException $e) {
177
+            $cachedfile = $folder->newFile($fileNameCached);
178
+        }
179
+
180
+        $depFileName = $fileNameCached . '.deps';
181
+        try {
182
+            $depFile = $folder->getFile($depFileName);
183
+        } catch (NotFoundException $e) {
184
+            $depFile = $folder->newFile($depFileName);
185
+        }
186
+
187
+        try {
188
+            $gzipFile = $folder->getFile($fileNameCached . '.gzip'); # Safari doesn't like .gz
189
+        } catch (NotFoundException $e) {
190
+            $gzipFile = $folder->newFile($fileNameCached . '.gzip'); # Safari doesn't like .gz
191
+        }
192
+
193
+        try {
194
+            $cachedfile->putContent($res);
195
+            $deps = json_encode($deps);
196
+            $depFile->putContent($deps);
197
+            $this->depsCache->set($folder->getName() . '-' . $depFileName, $deps);
198
+            $gzipFile->putContent(gzencode($res, 9));
199
+            $this->logger->debug('JSCombiner: successfully cached: ' . $fileNameCached);
200
+            return true;
201
+        } catch (NotPermittedException $e) {
202
+            $this->logger->error('JSCombiner: unable to cache: ' . $fileNameCached);
203
+            return false;
204
+        }
205
+    }
206
+
207
+    /**
208
+     * @param string $appName
209
+     * @param string $fileName
210
+     * @return string
211
+     */
212
+    public function getCachedJS($appName, $fileName) {
213
+        $tmpfileLoc = explode('/', $fileName);
214
+        $fileName = array_pop($tmpfileLoc);
215
+        $fileName = $this->prependVersionPrefix(str_replace('.json', '.js', $fileName), $appName);
216
+
217
+        return substr($this->urlGenerator->linkToRoute('core.Js.getJs', array('fileName' => $fileName, 'appName' => $appName)), strlen(\OC::$WEBROOT) + 1);
218
+    }
219
+
220
+    /**
221
+     * @param string $root
222
+     * @param string $file
223
+     * @return string[]
224
+     */
225
+    public function getContent($root, $file) {
226
+        /** @var array $data */
227
+        $data = json_decode(file_get_contents($root . '/' . $file));
228
+        if(!is_array($data)) {
229
+            return [];
230
+        }
231
+
232
+        $path = explode('/', $file);
233
+        array_pop($path);
234
+        $path = implode('/', $path);
235
+
236
+        $result = [];
237
+        foreach ($data as $f) {
238
+            $result[] = $path . '/' . $f;
239
+        }
240
+
241
+        return $result;
242
+    }
243
+
244
+
245
+    /**
246
+     * Clear cache with combined javascript files
247
+     *
248
+     * @throws NotFoundException
249
+     */
250
+    public function resetCache() {
251
+        $this->cacheFactory->createDistributed('JS-')->clear();
252
+        $appDirectory = $this->appData->getDirectoryListing();
253
+        foreach ($appDirectory as $folder) {
254
+            foreach ($folder->getDirectoryListing() as $file) {
255
+                $file->delete();
256
+            }
257
+        }
258
+    }
259
+
260
+    /**
261
+     * Prepend hashed app version hash
262
+     * @param string $jsFile
263
+     * @param string $appId
264
+     * @return string
265
+     */
266
+    private function prependVersionPrefix(string $jsFile, string $appId): string {
267
+        $appVersion = \OC_App::getAppVersion($appId);
268
+        if ($appVersion !== '0') {
269
+            return substr(md5($appVersion), 0, 5) . '-' . $jsFile;
270
+        }
271
+        $coreVersion = \OC_Util::getVersionString();
272
+        return substr(md5($coreVersion), 0, 5) . '-' . $jsFile;
273
+    }
274 274
 }
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		$this->appData = $appData;
70 70
 		$this->urlGenerator = $urlGenerator;
71 71
 		$this->cacheFactory = $cacheFactory;
72
-		$this->depsCache = $this->cacheFactory->createDistributed('JS-' . md5($this->urlGenerator->getBaseUrl()));
72
+		$this->depsCache = $this->cacheFactory->createDistributed('JS-'.md5($this->urlGenerator->getBaseUrl()));
73 73
 		$this->config = $config;
74 74
 		$this->logger = $logger;
75 75
 	}
@@ -85,19 +85,19 @@  discard block
 block discarded – undo
85 85
 			return false;
86 86
 		}
87 87
 
88
-		$path = explode('/', $root . '/' . $file);
88
+		$path = explode('/', $root.'/'.$file);
89 89
 
90 90
 		$fileName = array_pop($path);
91 91
 		$path = implode('/', $path);
92 92
 
93 93
 		try {
94 94
 			$folder = $this->appData->getFolder($app);
95
-		} catch(NotFoundException $e) {
95
+		} catch (NotFoundException $e) {
96 96
 			// creating css appdata folder
97 97
 			$folder = $this->appData->newFolder($app);
98 98
 		}
99 99
 
100
-		if($this->isCached($fileName, $folder, $app)) {
100
+		if ($this->isCached($fileName, $folder, $app)) {
101 101
 			return true;
102 102
 		}
103 103
 		return $this->cache($path, $fileName, $folder, $app);
@@ -115,9 +115,9 @@  discard block
 block discarded – undo
115 115
 			return false;
116 116
 		}
117 117
 
118
-		$fileName = $fileName . '.deps';
118
+		$fileName = $fileName.'.deps';
119 119
 		try {
120
-			$deps = $this->depsCache->get($folder->getName() . '-' . $fileName);
120
+			$deps = $this->depsCache->get($folder->getName().'-'.$fileName);
121 121
 			if ($deps === null || $deps === '') {
122 122
 				$depFile = $folder->getFile($fileName);
123 123
 				$deps = $depFile->getContent();
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
 			// check again
127 127
 			if ($deps === null || $deps === '') {
128
-				$this->logger->info('JSCombiner: deps file empty: ' . $fileName);
128
+				$this->logger->info('JSCombiner: deps file empty: '.$fileName);
129 129
 				return false;
130 130
 			}
131 131
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 			}
143 143
 
144 144
 			return true;
145
-		} catch(NotFoundException $e) {
145
+		} catch (NotFoundException $e) {
146 146
 			return false;
147 147
 		}
148 148
 	}
@@ -155,17 +155,17 @@  discard block
 block discarded – undo
155 155
 	 */
156 156
 	protected function cache($path, $fileName, ISimpleFolder $folder, $app) {
157 157
 		$deps = [];
158
-		$fullPath = $path . '/' . $fileName;
158
+		$fullPath = $path.'/'.$fileName;
159 159
 		$data = json_decode(file_get_contents($fullPath));
160 160
 		$deps[$fullPath] = filemtime($fullPath);
161 161
 
162 162
 		$res = '';
163 163
 		foreach ($data as $file) {
164
-			$filePath = $path . '/' . $file;
164
+			$filePath = $path.'/'.$file;
165 165
 
166 166
 			if (is_file($filePath)) {
167 167
 				$res .= file_get_contents($filePath);
168
-				$res .= PHP_EOL . PHP_EOL;
168
+				$res .= PHP_EOL.PHP_EOL;
169 169
 				$deps[$filePath] = filemtime($filePath);
170 170
 			}
171 171
 		}
@@ -173,11 +173,11 @@  discard block
 block discarded – undo
173 173
 		$fileNameCached = $this->prependVersionPrefix(str_replace('.json', '.js', $fileName), $app);
174 174
 		try {
175 175
 			$cachedfile = $folder->getFile($fileNameCached);
176
-		} catch(NotFoundException $e) {
176
+		} catch (NotFoundException $e) {
177 177
 			$cachedfile = $folder->newFile($fileNameCached);
178 178
 		}
179 179
 
180
-		$depFileName = $fileNameCached . '.deps';
180
+		$depFileName = $fileNameCached.'.deps';
181 181
 		try {
182 182
 			$depFile = $folder->getFile($depFileName);
183 183
 		} catch (NotFoundException $e) {
@@ -185,21 +185,21 @@  discard block
 block discarded – undo
185 185
 		}
186 186
 
187 187
 		try {
188
-			$gzipFile = $folder->getFile($fileNameCached . '.gzip'); # Safari doesn't like .gz
188
+			$gzipFile = $folder->getFile($fileNameCached.'.gzip'); # Safari doesn't like .gz
189 189
 		} catch (NotFoundException $e) {
190
-			$gzipFile = $folder->newFile($fileNameCached . '.gzip'); # Safari doesn't like .gz
190
+			$gzipFile = $folder->newFile($fileNameCached.'.gzip'); # Safari doesn't like .gz
191 191
 		}
192 192
 
193 193
 		try {
194 194
 			$cachedfile->putContent($res);
195 195
 			$deps = json_encode($deps);
196 196
 			$depFile->putContent($deps);
197
-			$this->depsCache->set($folder->getName() . '-' . $depFileName, $deps);
197
+			$this->depsCache->set($folder->getName().'-'.$depFileName, $deps);
198 198
 			$gzipFile->putContent(gzencode($res, 9));
199
-			$this->logger->debug('JSCombiner: successfully cached: ' . $fileNameCached);
199
+			$this->logger->debug('JSCombiner: successfully cached: '.$fileNameCached);
200 200
 			return true;
201 201
 		} catch (NotPermittedException $e) {
202
-			$this->logger->error('JSCombiner: unable to cache: ' . $fileNameCached);
202
+			$this->logger->error('JSCombiner: unable to cache: '.$fileNameCached);
203 203
 			return false;
204 204
 		}
205 205
 	}
@@ -224,8 +224,8 @@  discard block
 block discarded – undo
224 224
 	 */
225 225
 	public function getContent($root, $file) {
226 226
 		/** @var array $data */
227
-		$data = json_decode(file_get_contents($root . '/' . $file));
228
-		if(!is_array($data)) {
227
+		$data = json_decode(file_get_contents($root.'/'.$file));
228
+		if (!is_array($data)) {
229 229
 			return [];
230 230
 		}
231 231
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
 		$result = [];
237 237
 		foreach ($data as $f) {
238
-			$result[] = $path . '/' . $f;
238
+			$result[] = $path.'/'.$f;
239 239
 		}
240 240
 
241 241
 		return $result;
@@ -266,9 +266,9 @@  discard block
 block discarded – undo
266 266
 	private function prependVersionPrefix(string $jsFile, string $appId): string {
267 267
 		$appVersion = \OC_App::getAppVersion($appId);
268 268
 		if ($appVersion !== '0') {
269
-			return substr(md5($appVersion), 0, 5) . '-' . $jsFile;
269
+			return substr(md5($appVersion), 0, 5).'-'.$jsFile;
270 270
 		}
271 271
 		$coreVersion = \OC_Util::getVersionString();
272
-		return substr(md5($coreVersion), 0, 5) . '-' . $jsFile;
272
+		return substr(md5($coreVersion), 0, 5).'-'.$jsFile;
273 273
 	}
274 274
 }
Please login to merge, or discard this patch.