1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,68 @@ |
1 |
+<?php |
|
2 |
+/** |
|
3 |
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com> |
|
4 |
+ * |
|
5 |
+ * @author Double Bastion LLC |
|
6 |
+ * |
|
7 |
+ * @license GNU AGPL version 3 or any later version |
|
8 |
+ * |
|
9 |
+ * This program is free software; you can redistribute it and/or |
|
10 |
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
11 |
+ * License as published by the Free Software Foundation; either |
|
12 |
+ * version 3 of the License, or any later version. |
|
13 |
+ * |
|
14 |
+ * This program is distributed in the hope that it will be useful, |
|
15 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details. |
|
18 |
+ * |
|
19 |
+ * You should have received a copy of the GNU Affero General Public |
|
20 |
+ * License along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
21 |
+ * |
|
22 |
+ */ |
|
23 |
+ |
|
24 |
+declare(strict_types=1); |
|
25 |
+ |
|
26 |
+namespace OCA\PaxFax\AppInfo; |
|
27 |
+ |
|
28 |
+use OCP\AppFramework\App; |
|
29 |
+use OCP\IServerContainer; |
|
30 |
+use OCA\PaxFax\Controller\PageController; |
|
31 |
+use OCA\PaxFax\Notification\Notifier; |
|
32 |
+use OCP\Notification\IManager; |
|
33 |
+ |
|
34 |
+ |
|
35 |
+if ((@include_once __DIR__ . '/../../Phaxio/vendor/autoload.php') === false) { |
|
36 |
+ throw new Exception('Cannot include autoload. Did you run install dependencies using composer?'); |
|
37 |
+} |
|
38 |
+ |
|
39 |
+class Application extends App { |
|
40 |
+ |
|
41 |
+ public function __construct(array $urlParams=array()) { |
|
42 |
+ parent::__construct('pax_fax', $urlParams); |
|
43 |
+ |
|
44 |
+ $container = $this->getContainer(); |
|
45 |
+ |
|
46 |
+ // Controllers |
|
47 |
+ $container->registerService('PageController', function($c) { |
|
48 |
+ return new PageController( |
|
49 |
+ $c->query('AppName'), |
|
50 |
+ $c->query('Request') |
|
51 |
+ ); |
|
52 |
+ }); |
|
53 |
+ |
|
54 |
+ $manager = $container->get(IManager::class); |
|
55 |
+ $manager->registerNotifierService(Notifier::class); |
|
56 |
+ } |
|
57 |
+ |
|
58 |
+ public function register() { |
|
59 |
+ |
|
60 |
+ $gettimezone = \OC::$server->getConfig()->getSystemValue('logtimezone', 'UTC'); |
|
61 |
+ date_default_timezone_set($gettimezone); |
|
62 |
+ |
|
63 |
+ $server = $this->getContainer()->getServer(); |
|
64 |
+ |
|
65 |
+ $app = new \OCA\PaxFax\AppInfo\Application(); |
|
66 |
+ $app->register(); |
|
67 |
+ } |
|
68 |
+} |
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,64 +0,0 @@ |
1 |
-<?php |
|
2 |
-/** |
|
3 |
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com> |
|
4 |
- * |
|
5 |
- * @author Double Bastion LLC |
|
6 |
- * |
|
7 |
- * @license GNU AGPL version 3 or any later version |
|
8 |
- * |
|
9 |
- * This program is free software; you can redistribute it and/or |
|
10 |
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
11 |
- * License as published by the Free Software Foundation; either |
|
12 |
- * version 3 of the License, or any later version. |
|
13 |
- * |
|
14 |
- * This program is distributed in the hope that it will be useful, |
|
15 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details. |
|
18 |
- * |
|
19 |
- * You should have received a copy of the GNU Affero General Public |
|
20 |
- * License along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
21 |
- * |
|
22 |
- */ |
|
23 |
- |
|
24 |
-declare(strict_types=1); |
|
25 |
- |
|
26 |
-namespace OCA\PaxFax\AppInfo; |
|
27 |
- |
|
28 |
-use OCP\AppFramework\App; |
|
29 |
-use OCP\IServerContainer; |
|
30 |
-use OCA\PaxFax\Controller\PageController; |
|
31 |
- |
|
32 |
- |
|
33 |
-if ((@include_once __DIR__ . '/../../Phaxio/vendor/autoload.php') === false) { |
|
34 |
- throw new Exception('Cannot include autoload. Did you run install dependencies using composer?'); |
|
35 |
-} |
|
36 |
- |
|
37 |
-class Application extends App { |
|
38 |
- |
|
39 |
- public function __construct(array $urlParams=array()) { |
|
40 |
- parent::__construct('pax_fax', $urlParams); |
|
41 |
- |
|
42 |
- $container = $this->getContainer(); |
|
43 |
- |
|
44 |
- // Controllers |
|
45 |
- $container->registerService('PageController', function($c) { |
|
46 |
- return new PageController( |
|
47 |
- $c->query('AppName'), |
|
48 |
- $c->query('Request') |
|
49 |
- ); |
|
50 |
- }); |
|
51 |
- |
|
52 |
- } |
|
53 |
- |
|
54 |
- public function register() { |
|
55 |
- |
|
56 |
- $gettimezone = \OC::$server->getConfig()->getSystemValue('logtimezone', 'UTC'); |
|
57 |
- date_default_timezone_set($gettimezone); |
|
58 |
- |
|
59 |
- $server = $this->getContainer()->getServer(); |
|
60 |
- |
|
61 |
- $app = new \OCA\PaxFax\AppInfo\Application(); |
|
62 |
- $app->register(); |
|
63 |
- } |
|
64 |
-} |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,64 @@ |
1 |
+<?php |
|
2 |
+/** |
|
3 |
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com> |
|
4 |
+ * |
|
5 |
+ * @author Double Bastion LLC |
|
6 |
+ * |
|
7 |
+ * @license GNU AGPL version 3 or any later version |
|
8 |
+ * |
|
9 |
+ * This program is free software; you can redistribute it and/or |
|
10 |
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
11 |
+ * License as published by the Free Software Foundation; either |
|
12 |
+ * version 3 of the License, or any later version. |
|
13 |
+ * |
|
14 |
+ * This program is distributed in the hope that it will be useful, |
|
15 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details. |
|
18 |
+ * |
|
19 |
+ * You should have received a copy of the GNU Affero General Public |
|
20 |
+ * License along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
21 |
+ * |
|
22 |
+ */ |
|
23 |
+ |
|
24 |
+declare(strict_types=1); |
|
25 |
+ |
|
26 |
+namespace OCA\PaxFax\AppInfo; |
|
27 |
+ |
|
28 |
+use OCP\AppFramework\App; |
|
29 |
+use OCP\IServerContainer; |
|
30 |
+use OCA\PaxFax\Controller\PageController; |
|
31 |
+ |
|
32 |
+ |
|
33 |
+if ((@include_once __DIR__ . '/../../Phaxio/vendor/autoload.php') === false) { |
|
34 |
+ throw new Exception('Cannot include autoload. Did you run install dependencies using composer?'); |
|
35 |
+} |
|
36 |
+ |
|
37 |
+class Application extends App { |
|
38 |
+ |
|
39 |
+ public function __construct(array $urlParams=array()) { |
|
40 |
+ parent::__construct('pax_fax', $urlParams); |
|
41 |
+ |
|
42 |
+ $container = $this->getContainer(); |
|
43 |
+ |
|
44 |
+ // Controllers |
|
45 |
+ $container->registerService('PageController', function($c) { |
|
46 |
+ return new PageController( |
|
47 |
+ $c->query('AppName'), |
|
48 |
+ $c->query('Request') |
|
49 |
+ ); |
|
50 |
+ }); |
|
51 |
+ |
|
52 |
+ } |
|
53 |
+ |
|
54 |
+ public function register() { |
|
55 |
+ |
|
56 |
+ $gettimezone = \OC::$server->getConfig()->getSystemValue('logtimezone', 'UTC'); |
|
57 |
+ date_default_timezone_set($gettimezone); |
|
58 |
+ |
|
59 |
+ $server = $this->getContainer()->getServer(); |
|
60 |
+ |
|
61 |
+ $app = new \OCA\PaxFax\AppInfo\Application(); |
|
62 |
+ $app->register(); |
|
63 |
+ } |
|
64 |
+} |
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,68 +0,0 @@ |
1 |
-<?php |
|
2 |
-/** |
|
3 |
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com> |
|
4 |
- * |
|
5 |
- * @author Double Bastion LLC |
|
6 |
- * |
|
7 |
- * @license GNU AGPL version 3 or any later version |
|
8 |
- * |
|
9 |
- * This program is free software; you can redistribute it and/or |
|
10 |
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
11 |
- * License as published by the Free Software Foundation; either |
|
12 |
- * version 3 of the License, or any later version. |
|
13 |
- * |
|
14 |
- * This program is distributed in the hope that it will be useful, |
|
15 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details. |
|
18 |
- * |
|
19 |
- * You should have received a copy of the GNU Affero General Public |
|
20 |
- * License along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
21 |
- * |
|
22 |
- */ |
|
23 |
- |
|
24 |
-declare(strict_types=1); |
|
25 |
- |
|
26 |
-namespace OCA\PaxFax\AppInfo; |
|
27 |
- |
|
28 |
-use OCP\AppFramework\App; |
|
29 |
-use OCP\IServerContainer; |
|
30 |
-use OCA\PaxFax\Controller\PageController; |
|
31 |
- |
|
32 |
- |
|
33 |
-if ((@include_once __DIR__ . '/../../Phaxio/vendor/autoload.php') === false) { |
|
34 |
- throw new Exception('Cannot include autoload. Did you run install dependencies using composer?'); |
|
35 |
-} |
|
36 |
- |
|
37 |
-$gettimezoneinit = exec("timedatectl | grep zone"); |
|
38 |
-$gettimezonesec = explode("Time zone:", $gettimezoneinit); |
|
39 |
-$gettimezonetert = explode("(", $gettimezonesec[1]); |
|
40 |
-$gettimezone = str_replace(" ", "", $gettimezonetert[0]); |
|
41 |
-date_default_timezone_set($gettimezone); |
|
42 |
- |
|
43 |
- |
|
44 |
-class Application extends App { |
|
45 |
- |
|
46 |
- public function __construct(array $urlParams=array()) { |
|
47 |
- parent::__construct('pax_fax', $urlParams); |
|
48 |
- |
|
49 |
- $container = $this->getContainer(); |
|
50 |
- |
|
51 |
- // Controllers |
|
52 |
- $container->registerService('PageController', function($c) { |
|
53 |
- return new PageController( |
|
54 |
- $c->query('AppName'), |
|
55 |
- $c->query('Request') |
|
56 |
- ); |
|
57 |
- }); |
|
58 |
- |
|
59 |
- } |
|
60 |
- |
|
61 |
- public function register() { |
|
62 |
- $server = $this->getContainer()->getServer(); |
|
63 |
- |
|
64 |
- $app = new \OCA\PaxFax\AppInfo\Application(); |
|
65 |
- $app->register(); |
|
66 |
- } |
|
67 |
- |
|
68 |
-} |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,68 @@ |
1 |
+<?php |
|
2 |
+/** |
|
3 |
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com> |
|
4 |
+ * |
|
5 |
+ * @author Double Bastion LLC |
|
6 |
+ * |
|
7 |
+ * @license GNU AGPL version 3 or any later version |
|
8 |
+ * |
|
9 |
+ * This program is free software; you can redistribute it and/or |
|
10 |
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
11 |
+ * License as published by the Free Software Foundation; either |
|
12 |
+ * version 3 of the License, or any later version. |
|
13 |
+ * |
|
14 |
+ * This program is distributed in the hope that it will be useful, |
|
15 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details. |
|
18 |
+ * |
|
19 |
+ * You should have received a copy of the GNU Affero General Public |
|
20 |
+ * License along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
21 |
+ * |
|
22 |
+ */ |
|
23 |
+ |
|
24 |
+declare(strict_types=1); |
|
25 |
+ |
|
26 |
+namespace OCA\PaxFax\AppInfo; |
|
27 |
+ |
|
28 |
+use OCP\AppFramework\App; |
|
29 |
+use OCP\IServerContainer; |
|
30 |
+use OCA\PaxFax\Controller\PageController; |
|
31 |
+ |
|
32 |
+ |
|
33 |
+if ((@include_once __DIR__ . '/../../Phaxio/vendor/autoload.php') === false) { |
|
34 |
+ throw new Exception('Cannot include autoload. Did you run install dependencies using composer?'); |
|
35 |
+} |
|
36 |
+ |
|
37 |
+$gettimezoneinit = exec("timedatectl | grep zone"); |
|
38 |
+$gettimezonesec = explode("Time zone:", $gettimezoneinit); |
|
39 |
+$gettimezonetert = explode("(", $gettimezonesec[1]); |
|
40 |
+$gettimezone = str_replace(" ", "", $gettimezonetert[0]); |
|
41 |
+date_default_timezone_set($gettimezone); |
|
42 |
+ |
|
43 |
+ |
|
44 |
+class Application extends App { |
|
45 |
+ |
|
46 |
+ public function __construct(array $urlParams=array()) { |
|
47 |
+ parent::__construct('pax_fax', $urlParams); |
|
48 |
+ |
|
49 |
+ $container = $this->getContainer(); |
|
50 |
+ |
|
51 |
+ // Controllers |
|
52 |
+ $container->registerService('PageController', function($c) { |
|
53 |
+ return new PageController( |
|
54 |
+ $c->query('AppName'), |
|
55 |
+ $c->query('Request') |
|
56 |
+ ); |
|
57 |
+ }); |
|
58 |
+ |
|
59 |
+ } |
|
60 |
+ |
|
61 |
+ public function register() { |
|
62 |
+ $server = $this->getContainer()->getServer(); |
|
63 |
+ |
|
64 |
+ $app = new \OCA\PaxFax\AppInfo\Application(); |
|
65 |
+ $app->register(); |
|
66 |
+ } |
|
67 |
+ |
|
68 |
+} |