Skip to content

Commit 831d43d

Browse files
authored
Merge pull request #1853 from hashtopolis/migration-setup-separation
Refactored load.php into different use case startup parts
2 parents f975b65 + 6fc55d7 commit 831d43d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+180
-156
lines changed

ci/server/setup.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@
3737
exit(-1);
3838
}
3939

40-
$load = file_get_contents($envPath . "src/inc/load.php");
40+
$load = file_get_contents($envPath . "src/inc/startup/load.php");
4141
$load = str_replace('ini_set("display_errors", "0");', 'ini_set("display_errors", "1");', $load);
42-
file_put_contents($envPath . "src/inc/load.php", $load);
42+
file_put_contents($envPath . "src/inc/startup/load.php", $load);

docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fi
6868

6969
# required to trigger the initialization
7070
echo "Start initialization process..."
71-
php -f ${HASHTOPOLIS_DOCUMENT_ROOT}/inc/load.php
71+
php -f ${HASHTOPOLIS_DOCUMENT_ROOT}/inc/startup/setup.php
7272
echo "Initialization complete!"
7373

7474

src/about.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require_once(dirname(__FILE__) . "/inc/load.php");
3+
require_once(dirname(__FILE__) . "/inc/startup/load.php");
44

55
AccessControl::getInstance()->checkPermission(DViewControl::ABOUT_VIEW_PERM);
66

src/access.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use DBA\User;
55
use DBA\Factory;
66

7-
require_once(dirname(__FILE__) . "/inc/load.php");
7+
require_once(dirname(__FILE__) . "/inc/startup/load.php");
88

99
if (!Login::getInstance()->isLoggedin()) {
1010
header("Location: index.php?err=4" . time() . "&fw=" . urlencode($_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING']));

src/account.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use DBA\APiKey;
55
use DBA\QueryFilter;
66

7-
require_once(dirname(__FILE__) . "/inc/load.php");
7+
require_once(dirname(__FILE__) . "/inc/startup/load.php");
88

99

1010
if (!Login::getInstance()->isLoggedin()) {

src/agentStatus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use DBA\Agent;
1212
use DBA\Factory;
1313

14-
require_once(dirname(__FILE__) . "/inc/load.php");
14+
require_once(dirname(__FILE__) . "/inc/startup/load.php");
1515

1616
if (!Login::getInstance()->isLoggedin()) {
1717
header("Location: index.php?err=4" . time() . "&fw=" . urlencode($_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING']));

src/agents.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use DBA\QueryFilter;
1414
use DBA\Factory;
1515

16-
require_once(dirname(__FILE__) . "/inc/load.php");
16+
require_once(dirname(__FILE__) . "/inc/startup/load.php");
1717

1818
if (isset($_GET['download'])) {
1919
$agentHandler = new AgentHandler();

src/ajax/get_subtasks.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use DBA\Task;
66
use DBA\Factory;
77

8-
require_once(dirname(__FILE__) . "/../inc/load.php");
8+
require_once(dirname(__FILE__) . "/../inc/startup/load.php");
99

1010
// test if task exists
1111
$taskWrapper = Factory::getTaskWrapperFactory()->get($_GET['taskWrapperId']);
@@ -65,4 +65,4 @@
6565
Template::loadInstance("tasks/subtasks");
6666
UI::add('subtaskList', $subtaskList);
6767
UI::add('showArchived', $showArchived);
68-
echo Template::getInstance()->render(UI::getObjects());
68+
echo Template::getInstance()->render(UI::getObjects());

src/api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use DBA\Factory;
66
use DBA\User;
77

8-
require_once(dirname(__FILE__) . "/inc/load.php");
8+
require_once(dirname(__FILE__) . "/inc/startup/load.php");
99

1010
if (!Login::getInstance()->isLoggedin()) {
1111
header("Location: index.php?err=4" . time() . "&fw=" . urlencode($_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING']));

src/api/server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* The input is sent as JSON encoded data and the response will also be in JSON
88
*/
99

10-
require_once(dirname(__FILE__) . "/../inc/load.php");
10+
require_once(dirname(__FILE__) . "/../inc/startup/include.php");
1111
set_time_limit(0);
1212

1313
header("Content-Type: application/json");

0 commit comments

Comments
 (0)