blob: e11d9438dee3fe368ba36062d7ce0943935075c6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
<?php
namespace bantu\IniGetWrapper { class IniGetWrapper { } }
namespace Psr\Log { class LoggerInterface { } }
namespace OCP {
class IL10N { }
class Defaults { }
}
namespace OCP\Security {
class ISecureRandom { }
}
namespace OC {
class Installer { }
class SystemConfig {
private $a;
public function __construct($a) {
$this->a = $a;
}
public function getValue($val, $default) {
if(isset($this->a[$val])) {
return $this->a[$val];
} else {
return $default;
}
}
}
}
namespace {
class NServer {
private $argv;
public function __construct($argv) {
$this->argv = $argv;
}
public function getSystemConfig() {
return new OC\SystemConfig(Array(
'htaccess.RewriteBase' => $this->argv[1],
));
}
public function get($c) {
return new $c();
}
public function getL10N() {
return new \OCP\IL10N();
}
public function query($c) {
return new $c();
}
public function getSecureRandom() {
return new \OCP\Security\ISecureRandom();
}
}
class OC {
public static Bool $CLI = false;
public static $SERVERROOT = '.';
public static $WEBROOT;
public static \NServer $server;
}
\OC::$server = new NServer($argv);
\OC::$WEBROOT = $argv[1];
require "./lib/private/Setup.php";
$result = \OC\Setup::updateHtaccess();
if ($result) {
echo "done";
};
}
|