Skip to content

Commit

Permalink
Merge pull request #1705 from Admidio/move-libs-folder
Browse files Browse the repository at this point in the history
Move libs and installation folder to main folder
  • Loading branch information
Fasse authored Nov 22, 2024
2 parents 5fef2eb + 8133d5c commit d3a4ba9
Show file tree
Hide file tree
Showing 352 changed files with 52 additions and 53 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script type="text/javascript">$(function() {
$("#pluginLoginForm").submit(formSubmit);
$("#adm_plugin_login_form").submit(formSubmit);
});
</script>

Expand Down
2 changes: 1 addition & 1 deletion adm_program/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
// if config file doesn't exists, than show installation dialog
if (!is_file(__DIR__ . '/../adm_my_files/config.php')) {
header('Location: adm_program/installation/index.php');
header('Location: ../install/index.php');
exit();
}

Expand Down
2 changes: 1 addition & 1 deletion adm_program/overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
try {
// if config file doesn't exist, then show installation dialog
if (!is_file(dirname(__DIR__) . '/adm_my_files/config.php')) {
header('Location: installation/index.php');
header('Location: ../install/index.php');
exit();
}

Expand Down
5 changes: 2 additions & 3 deletions adm_program/system/bootstrap/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@
const FOLDER_DATA = '/adm_my_files';
const FOLDER_TEMP_DATA = '/adm_my_files/temp';
const FOLDER_SYSTEM = '/adm_program/system';
const FOLDER_CLASSES = '/adm_program/system/classes';
const FOLDER_INSTALLATION = '/adm_program/installation';
const FOLDER_LIBS = '/adm_program/libs'; // PHP libs
const FOLDER_INSTALLATION = '/install';
const FOLDER_LIBS = '/libs'; // PHP libs
const FOLDER_LANGUAGES = '/adm_program/languages';
const FOLDER_THEMES = '/themes';
const FOLDER_MODULES = '/adm_program/modules';
Expand Down
2 changes: 1 addition & 1 deletion adm_program/system/classes/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function updateOrgPreferences()
PhpIniUtils::startNewExecutionTimeLimit(120);

// first write the possible new Orga settings in DB
require_once(__DIR__ . '/../../installation/db_scripts/preferences.php');
require_once(ADMIDIO_PATH . FOLDER_INSTALLATION . '/db_scripts/preferences.php');

// calculate the best cost value for your server performance
$benchmarkResults = PasswordUtils::costBenchmark($gPasswordHashAlgorithm);
Expand Down
4 changes: 2 additions & 2 deletions adm_program/system/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

// if config file doesn't exists, than show installation dialog
if (!is_file($rootPath . '/adm_my_files/config.php')) {
header('Location: adm_program/installation/index.php');
header('Location: install/index.php');
exit();
}

Expand All @@ -45,7 +45,7 @@
try {
$gDb->getTableColumns(TBL_SESSIONS);
} catch (Throwable $t) {
header('Location: adm_program/installation/index.php');
header('Location: ' . ADMIDIO_URL . FOLDER_INSTALLATION . '/index.php');
exit();
}

Expand Down
2 changes: 1 addition & 1 deletion adm_program/system/js/common_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ function formSubmit(event) {
}
} else {
if ($("#adm_captcha").length > 0) {
$("#adm_captcha").attr("src", gRootPath + "/adm_program/libs/securimage/securimage_show.php?" + Math.random());
$("#adm_captcha").attr("src", gRootPath + "/libs/securimage/securimage_show.php?" + Math.random());
$("#adm_captcha_code").val("");
}
if (returnMessage.length == 0) {
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
exit('<div style="color: #cc0000;">Old Admidio version 1.x or 2.x config file detected! Please update first to the latest version 3 of Admidio and after that you can perform an update to version 4!<br /><br />Please view <a href="https://www.admidio.org/dokuwiki/doku.php?id=de:2.0:update_von_2.x_auf_3.x">our documentation</a>.</div>');
} else {
// no config file found than show installation dialog
header('Location: adm_program/installation/index.php');
header('Location: install/index.php');
exit();
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
$form = new Form(
'adm_installation_create_administrator_form',
'installation.create-administrator.tpl',
SecurityUtils::encodeUrl(ADMIDIO_URL . '/adm_program/installation/installation.php', array('step' => 'create_administrator', 'mode' => 'check')),
SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_INSTALLATION. '/installation.php', array('step' => 'create_administrator', 'mode' => 'check')),
$page
);
$form->addInput(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@
// start installation
$page->assignSmartyVariable('subHeadline', $gL10n->get('INS_INSTALL_ADMIDIO'));
$page->assignSmartyVariable('text', $gL10n->get('INS_DATA_FULLY_ENTERED'));
$page->assignSmartyVariable('urlInstallation', SecurityUtils::encodeUrl(ADMIDIO_URL . '/adm_program/installation/installation.php', array('step' => 'start_installation')));
$page->assignSmartyVariable('urlInstallation', SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_INSTALLATION . '/installation.php', array('step' => 'start_installation')));

$form = new Form(
'adm_installation_install_admidio_form',
'installation.install-admidio.tpl',
SecurityUtils::encodeUrl(ADMIDIO_URL . '/adm_program/installation/installation.php', array('step' => 'start_installation')),
SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_INSTALLATION . '/installation.php', array('step' => 'start_installation')),
$page
);
$form->addSubmitButton(
Expand All @@ -83,15 +83,15 @@
$form = new Form(
'adm_installation_install_admidio_form',
'installation.download-config.tpl',
SecurityUtils::encodeUrl(ADMIDIO_URL . '/adm_program/installation/installation.php', array('step' => 'start_installation')),
SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_INSTALLATION. '/installation.php', array('step' => 'start_installation')),
$page
);
$form->addButton(
'adm_previous_page',
$gL10n->get('SYS_BACK'),
array(
'icon' => 'bi-arrow-left-circle-fill',
'link' => SecurityUtils::encodeUrl(ADMIDIO_URL . '/adm_program/installation/installation.php', array('step' => 'create_administrator'))
'link' => SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_INSTALLATION. '/installation.php', array('step' => 'create_administrator'))
)
);
$form->addButton(
Expand All @@ -100,7 +100,7 @@
array(
'icon' => 'bi-download',
'class' => 'btn-primary admidio-margin-bottom ms-2',
'link' => SecurityUtils::encodeUrl(ADMIDIO_URL . '/adm_program/installation/installation.php', array('step' => 'download_config'))
'link' => SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_INSTALLATION. '/installation.php', array('step' => 'download_config'))
)
);
$form->addSubmitButton(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
$form = new Form(
'adm_installation_create_organization_form',
'installation.create-organization.tpl',
SecurityUtils::encodeUrl(ADMIDIO_URL . '/adm_program/installation/installation.php', array('step' => 'create_organization', 'mode' => 'check')),
SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_INSTALLATION . '/installation.php', array('step' => 'create_organization', 'mode' => 'check')),
$page
);
$form->addInput(
Expand Down Expand Up @@ -76,7 +76,7 @@
'adm_previous_page',
$gL10n->get('SYS_BACK'),
array('icon' => 'bi-arrow-left-circle-fill', 'class' => 'admidio-margin-bottom',
'link' => SecurityUtils::encodeUrl(ADMIDIO_URL . '/adm_program/installation/installation.php', array('step' => 'connect_database')))
'link' => SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_INSTALLATION. '/installation.php', array('step' => 'connect_database')))
);
$form->addSubmitButton('adm_next_page', $gL10n->get('INS_CREATE_ADMINISTRATOR'), array('icon' => 'bi-arrow-right-circle-fill', 'class' => 'float-end'));

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
$adminUsrId = $administrator->getValue('usr_id');

// write all preferences from preferences.php in table adm_preferences
require_once(ADMIDIO_PATH . '/adm_program/installation/db_scripts/preferences.php');
require_once(ADMIDIO_PATH . FOLDER_INSTALLATION. '/db_scripts/preferences.php');

// set some specific preferences whose values came from user input of the installation wizard
$defaultOrgPreferences['system_language'] = $language;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ function getAdmidioUrl(bool $checkForwardedHost = true): string
$host = ($checkForwardedHost && isset($_SERVER['HTTP_X_FORWARDED_HOST'])) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : ($_SERVER['HTTP_HOST'] ?? null);
$host = $host ?? $_SERVER['SERVER_NAME'] . $port;
$fullUrl = $protocol . '://' . $host . $_SERVER['REQUEST_URI'];
return substr($fullUrl, 0, strpos($fullUrl, 'adm_program') - 1);
return substr($fullUrl, 0, strpos($fullUrl, 'install/') - 1);
}

$rootPath = dirname(__DIR__, 2);
$rootPath = dirname(__DIR__);

// if config file already exists then load file with their variables
$configPath = $rootPath . '/adm_my_files/config.php';
Expand Down Expand Up @@ -72,7 +72,7 @@ function getAdmidioUrl(bool $checkForwardedHost = true): string
}

if (!in_array($step, $availableSteps, true)) {
admRedirect(SecurityUtils::encodeUrl(ADMIDIO_URL . '/adm_program/installation/installation.php', array('step' => 'welcome')));
admRedirect(SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_INSTALLATION . '/installation.php', array('step' => 'welcome')));
// => EXIT
}

Expand Down Expand Up @@ -144,50 +144,50 @@ function getAdmidioUrl(bool $checkForwardedHost = true): string
$_SESSION['db_password'] = DB_PASSWORD;
$_SESSION['table_prefix'] = TABLE_PREFIX;

admRedirect(SecurityUtils::encodeUrl(ADMIDIO_URL . '/adm_program/installation/installation.php', array('step' => 'create_organization')));
admRedirect(SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_INSTALLATION . '/installation.php', array('step' => 'create_organization')));
// => EXIT
}
}

switch ($step) {
case 'welcome': // (Default) Welcome to installation
$gLogger->info('INSTALLATION: Welcome to installation');
require_once(ADMIDIO_PATH . '/adm_program/installation/install_steps/welcome.php');
require_once(ADMIDIO_PATH . FOLDER_INSTALLATION . '/install_steps/welcome.php');
break;

case 'connect_database': // Enter database access information
$gLogger->info('INSTALLATION: Enter database access information');
require_once(ADMIDIO_PATH . '/adm_program/installation/install_steps/connect_database.php');
require_once(ADMIDIO_PATH . FOLDER_INSTALLATION . '/install_steps/connect_database.php');
break;

case 'create_organization': // Creating organization
$gLogger->info('INSTALLATION: Creating organisation');
require_once(ADMIDIO_PATH . '/adm_program/installation/install_steps/create_organization.php');
require_once(ADMIDIO_PATH . FOLDER_INSTALLATION . '/install_steps/create_organization.php');
break;

case 'create_administrator': // Creating administrator
$gLogger->info('INSTALLATION: Creating administrator');
require_once(ADMIDIO_PATH . '/adm_program/installation/install_steps/create_administrator.php');
require_once(ADMIDIO_PATH . FOLDER_INSTALLATION . '/install_steps/create_administrator.php');
break;

case 'create_config': // Creating configuration file
$gLogger->info('INSTALLATION: Creating configuration file');
require_once(ADMIDIO_PATH . '/adm_program/installation/install_steps/create_config.php');
require_once(ADMIDIO_PATH . FOLDER_INSTALLATION . '/install_steps/create_config.php');
break;

case 'download_config': // Download configuration file
$gLogger->info('INSTALLATION: Download configuration file');
require_once(ADMIDIO_PATH . '/adm_program/installation/install_steps/download_config.php');
require_once(ADMIDIO_PATH . FOLDER_INSTALLATION . '/install_steps/download_config.php');
break;

case 'start_installation': // Start installation
$gLogger->info('INSTALLATION: Start installation');
require_once(ADMIDIO_PATH . '/adm_program/installation/install_steps/start_installation.php');
require_once(ADMIDIO_PATH . FOLDER_INSTALLATION . '/install_steps/start_installation.php');
break;

case 'installation_successful': // Start installation
$gLogger->info('INSTALLATION: Installation_successful');
require_once(ADMIDIO_PATH . '/adm_program/installation/install_steps/installation_successful.php');
require_once(ADMIDIO_PATH . FOLDER_INSTALLATION . '/install_steps/installation_successful.php');
break;
}
} catch (Throwable $e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

{$additionalHeaderData}

<link rel="stylesheet" type="text/css" href="{$urlAdmidio}/adm_program/installation/templates/installation.css" />
<link rel="stylesheet" type="text/css" href="{$urlAdmidio}/install/templates/installation.css" />

<script type="text/javascript">
{$javascriptContent}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div id="installation-message">
<div id="adm_installation_message">
<h3>{$l10n->get("SYS_INSTALLATION_SUCCESSFUL")}</h3>

<div class="alert alert-success form-alert">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div class="installation-dialog">
<div>
<h3>{$subHeadline}</h3>

<p>{$text}</p>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{if $debug}
<script type="text/javascript" src="{$urlAdmidio}/adm_program/libs/jquery/jquery.js"></script>
<script type="text/javascript" src="{$urlAdmidio}/libs/jquery/jquery.js"></script>
<script type="text/javascript" src="{$urlAdmidio}/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js"></script>

<link rel="stylesheet" type="text/css" href="{$urlAdmidio}/vendor/twbs/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="{$urlAdmidio}/vendor/twbs/bootstrap-icons/font/bootstrap-icons.css" />
{else}
<script type="text/javascript" src="{$urlAdmidio}/adm_program/libs/jquery/jquery.min.js"></script>
<script type="text/javascript" src="{$urlAdmidio}/libs/jquery/jquery.min.js"></script>
<script type="text/javascript" src="{$urlAdmidio}/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.min.js"></script>

<link rel="stylesheet" type="text/css" href="{$urlAdmidio}/vendor/twbs/bootstrap/dist/css/bootstrap.min.css" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div id="installation-message">
<div id="adm_installation_message">
<h3>{$messageHeadline}</h3>

{if $outputMode == "error"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="col-sm-9 offset-sm-3">
{/if}
<div id="adm_captcha_puzzle_group" class="admidio-form-group mb-3 {$data.class}">
<img id="adm_captcha" src="{$urlAdmidio}/adm_program/libs/securimage/securimage_show.php" alt="CAPTCHA Image" />
<img id="adm_captcha" src="{$urlAdmidio}/libs/securimage/securimage_show.php" alt="CAPTCHA Image" />
<a id="{$data.id}_refresh" class="admidio-icon-link" href="javascript:void(0)">
<i class="bi bi-arrow-repeat" style="font-size: 22pt;" data-bs-toggle="tooltip" title="{$l10n->get("SYS_RELOAD")}"></i>
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div id="installation-message">
<div id="adm_installation_message">
<h3>{$l10n->get("SYS_UPDATE_SUCCESSFUL")}</h3>

<div class="alert alert-success form-alert">
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions adm_program/installation/update.php → install/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function showErrorMessage(string $message, bool $reloadPage = false)
);
}

$rootPath = dirname(__DIR__, 2);
$rootPath = dirname(__DIR__);

// embed config file
$g_organization = '';
Expand Down Expand Up @@ -95,7 +95,7 @@ function showErrorMessage(string $message, bool $reloadPage = false)

if (!$pdoStatement || $pdoStatement->rowCount() === 0) {
// no valid installation exists -> show installation wizard
admRedirect(ADMIDIO_URL . '/adm_program/installation/installation.php');
admRedirect(ADMIDIO_URL . FOLDER_INSTALLATION . '/installation.php');
// => EXIT
}

Expand Down Expand Up @@ -206,7 +206,7 @@ function showErrorMessage(string $message, bool $reloadPage = false)
$form = new Form(
'adm_update_login_form',
'update.tpl',
SecurityUtils::encodeUrl(ADMIDIO_URL . '/adm_program/installation/update.php', array('mode' => 'update')),
SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_INSTALLATION . '/update.php', array('mode' => 'update')),
$page
);
if ($gLoginForUpdate) {
Expand Down Expand Up @@ -276,7 +276,7 @@ function showErrorMessage(string $message, bool $reloadPage = false)

echo json_encode(array(
'status' => 'success',
'url' => SecurityUtils::encodeUrl(ADMIDIO_URL . '/adm_program/installation/update.php', array('mode' => 'result'))
'url' => SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_INSTALLATION . '/update.php', array('mode' => 'result'))
));
exit();
} elseif ($getMode === 'result') {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit d3a4ba9

Please sign in to comment.