summaryrefslogtreecommitdiffstats
path: root/app/l10n/extract.php
diff options
context:
space:
mode:
authornashe <thomas@chauchefoin.fr>2017-07-07 23:21:25 +0100
committernashe <thomas@chauchefoin.fr>2017-07-07 23:21:25 +0100
commit435bc5c33f2428b181d6c41c037dcc993ba50b66 (patch)
treedba957e28faff8e502f99da2edb1e596aa90aa58 /app/l10n/extract.php
parentabb97ffc2eafe31ae593effc43d42b12bc678121 (diff)
downloadplanet-435bc5c33f2428b181d6c41c037dcc993ba50b66.tar
planet-435bc5c33f2428b181d6c41c037dcc993ba50b66.tar.gz
planet-435bc5c33f2428b181d6c41c037dcc993ba50b66.tar.bz2
planet-435bc5c33f2428b181d6c41c037dcc993ba50b66.tar.xz
planet-435bc5c33f2428b181d6c41c037dcc993ba50b66.zip
Disallow any access to extract.php is not in debug mode
"released versions of moonmoon should immediately return for security" was written but never applied
Diffstat (limited to 'app/l10n/extract.php')
-rwxr-xr-xapp/l10n/extract.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/l10n/extract.php b/app/l10n/extract.php
index 878de4e..1384827 100755
--- a/app/l10n/extract.php
+++ b/app/l10n/extract.php
@@ -13,12 +13,13 @@
* The script scans for the files in the l10n/ folder to know which locales are supported
*/
-// released versions of moonmoon should immediately return for security
-// return;
-
$root = __DIR__ . '/../../';
-require_once $root.'/vendors/autoload.php';
+require_once __DIR__ . '/../app.php';
+
+if ($conf['debug'] !== true) {
+ die('Please enable the debug mode to use extract.php.');
+}
$GLOBALS['english'] = array();
@@ -28,7 +29,6 @@ $GLOBALS['english'] = array();
*
*/
-
function extract_l10n_strings($file) {
$lines = file($file);
$patterns = array('/_g\([\'"](.*?)[\'"]\)/', '/getString\([\'"](.*?)[\'"]\)/',);