Skip to content

Commit

Permalink
Fixing phpPgAdmin for php 7.2 and limit api.github
Browse files Browse the repository at this point in the history
  • Loading branch information
john-ea committed Apr 11, 2024
1 parent be6c6f8 commit 7fd2f22
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .devilbox/www/htdocs/vendor/phppgadmin-7.14.7/browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
<style type="text/css">
.webfx-tree-children { background-image: url("{$misc->icon('I')}"); }
</style>
EOL);
EOL
); // devilbox edit for php 7.2 (Heredoc ending label)

$misc->printBody('browser');
?>
Expand Down
11 changes: 6 additions & 5 deletions .devilbox/www/htdocs/vendor/phppgadmin-7.14.7/classes/Misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,8 @@ function printHeader($title = '', $script = null, $frameset = false) {
}
});
EOL;
EOL;
// devilbox edit for php 7.2 (Heredoc ending label)
if (!$frameset) echo <<<EOL
if ("{$_SERVER['REQUEST_METHOD']}" === "GET" && (window.self === window.top) && (!window.opener)) {
Expand All @@ -562,15 +563,15 @@ function printHeader($title = '', $script = null, $frameset = false) {
});
EOL;

EOL;
// devilbox edit for php 7.2 (Heredoc ending label)
echo <<<EOL
</script>
<title>{$_formatTitle}</title>
EOL;

EOL;
// devilbox edit for php 7.2 (Heredoc ending label)

if ($script) echo "{$script}\n";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@
// turn off secure sessions. Versions of PHP below 7.3 do not have access
// to this feature and will be vulnerable to CSRF attacks.
$conf['extra_session_security'] = true;
if (version_compare(phpversion(), '7.3', '<')) {
$conf['extra_session_security'] = false; // devilbox edit for php 7.2
}

// AutoComplete uses AJAX interaction to list foreign key values
// on insert fields. It currently only works on single column
Expand Down
5 changes: 3 additions & 2 deletions .tests/scripts/get-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ DVLBOX_PATH="$( cd "${SCRIPT_PATH}/../.." && pwd -P )"
# shellcheck disable=SC1090
. "${SCRIPT_PATH}/.lib.sh"

RETRIES=1
RETRIES=10

TEST_REPO="https://github.com/john-ea/docker-php-fpm"

# -------------------------------------------------------------------------------------------------
# FUNCTIONS
# -------------------------------------------------------------------------------------------------

PHP_TAG="$( grep 'johnea/php' "${DVLBOX_PATH}/docker-compose.yml" | sed -E 's/^.*-work[-]?//g')"
if [ -z "${PHP_TAG}" ]; then
PHP_TAG="$( run "curl -sS 'https://api.github.com/repos/john-ea/docker-php-fpm' | grep -o '\"default_branch\": \"[^\"]*' | grep -o '[^\"]*$' | head -1" "${RETRIES}" )";
PHP_TAG="$( run "git ls-remote --symref ${TEST_REPO} | head -1 | cut -f1 | sed 's!^ref: refs/heads/!!'" "${RETRIES}" )";
fi
PHP_MOD="$( run "curl -sS 'https://raw.githubusercontent.com/john-ea/docker-php-fpm/${PHP_TAG}/doc/php-modules.md'" "${RETRIES}" )";

Expand Down
3 changes: 2 additions & 1 deletion .tests/scripts/get-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ DVLBOX_PATH="$( cd "${SCRIPT_PATH}/../.." && pwd -P )"

RETRIES=10

TEST_REPO="https://github.com/john-ea/docker-php-fpm"

# -------------------------------------------------------------------------------------------------
# FUNCTIONS
# -------------------------------------------------------------------------------------------------
PHP_TAG="$( grep 'johnea/php' "${DVLBOX_PATH}/docker-compose.yml" | sed -E 's/^.*-work[-]?//g')"
if [ -z "${PHP_TAG}" ]; then
PHP_TAG="$( run "curl -sS 'https://api.github.com/repos/john-ea/docker-php-fpm' | grep -o '\"default_branch\": \"[^\"]*' | grep -o '[^\"]*$' | head -1" "${RETRIES}" )";
PHP_TAG="$( run "git ls-remote --symref ${TEST_REPO} | head -1 | cut -f1 | sed 's!^ref: refs/heads/!!'" "${RETRIES}" )";
fi
PHP_TOOLS="$( run "curl -sS 'https://raw.githubusercontent.com/john-ea/docker-php-fpm/${PHP_TAG}/doc/available-tools.md'" "${RETRIES}" )";

Expand Down
2 changes: 1 addition & 1 deletion .tests/tests/modules-fetch-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ PHP_FPM_GIT_SLUG="$( \
)"

if [ -z "${PHP_FPM_GIT_SLUG}" ]; then
PHP_FPM_GIT_SLUG="$( run "curl -sS 'https://api.github.com/repos/john-ea/docker-php-fpm' | grep -o '\"default_branch\": \"[^\"]*' | grep -o '[^\"]*$' | head -1" "${RETRIES}" )";
PHP_FPM_GIT_SLUG="$( run "git ls-remote --symref ${TEST_REPO} | head -1 | cut -f1 | sed 's!^ref: refs/heads/!!'" "${RETRIES}" )";
fi
#https://github.blog/2023-01-20-sunsetting-subversion-support/
CLONE_PATH="/shared/httpd/${VHOST}/htdocs"
Expand Down

0 comments on commit 7fd2f22

Please sign in to comment.