aboutsummaryrefslogtreecommitdiff
path: root/systems/eldiron/websites/cloud/add-htaccess.php
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 01:35:06 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 02:11:48 +0200
commit1a64deeb894dc95e2645a75771732c6cc53a79ad (patch)
tree1b9df4838f894577a09b9b260151756272efeb53 /systems/eldiron/websites/cloud/add-htaccess.php
parentfa25ffd4583cc362075cd5e1b4130f33306103f0 (diff)
downloadNix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository
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}