aboutsummaryrefslogtreecommitdiff
path: root/systems/eldiron/websites/cloud/add-htaccess.php
diff options
context:
space:
mode:
Diffstat (limited to 'systems/eldiron/websites/cloud/add-htaccess.php')
-rw-r--r--systems/eldiron/websites/cloud/add-htaccess.php70
1 files changed, 70 insertions, 0 deletions
diff --git a/systems/eldiron/websites/cloud/add-htaccess.php b/systems/eldiron/websites/cloud/add-htaccess.php
new file mode 100644
index 0000000..e11d943
--- /dev/null
+++ b/systems/eldiron/websites/cloud/add-htaccess.php
@@ -0,0 +1,70 @@
1<?php
2
3namespace bantu\IniGetWrapper { class IniGetWrapper { } }
4namespace Psr\Log { class LoggerInterface { } }
5namespace OCP {
6 class IL10N { }
7 class Defaults { }
8}
9namespace OCP\Security {
10 class ISecureRandom { }
11}
12namespace OC {
13 class Installer { }
14 class SystemConfig {
15 private $a;
16 public function __construct($a) {
17 $this->a = $a;
18 }
19 public function getValue($val, $default) {
20 if(isset($this->a[$val])) {
21 return $this->a[$val];
22 } else {
23 return $default;
24 }
25 }
26 }
27}
28
29namespace {
30 class NServer {
31 private $argv;
32 public function __construct($argv) {
33 $this->argv = $argv;
34 }
35 public function getSystemConfig() {
36 return new OC\SystemConfig(Array(
37 'htaccess.RewriteBase' => $this->argv[1],
38 ));
39 }
40
41 public function get($c) {
42 return new $c();
43 }
44 public function getL10N() {
45 return new \OCP\IL10N();
46 }
47 public function query($c) {
48 return new $c();
49 }
50 public function getSecureRandom() {
51 return new \OCP\Security\ISecureRandom();
52 }
53 }
54
55 class OC {
56 public static Bool $CLI = false;
57 public static $SERVERROOT = '.';
58 public static $WEBROOT;
59 public static \NServer $server;
60 }
61
62 \OC::$server = new NServer($argv);
63 \OC::$WEBROOT = $argv[1];
64
65 require "./lib/private/Setup.php";
66 $result = \OC\Setup::updateHtaccess();
67 if ($result) {
68 echo "done";
69 };
70}