Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow code.gnucash.org/website as DEFAULT_URL #187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion externals/global_params.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@
$latest_unstable_source="gnucash-".$latest_unstable.".tar.bz2";

// The URLs, we use:
define("DEFAULT_URL", "https://www.gnucash.org/"); // The main webserver
if (gethostname()=="code") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hostname /may/ return "code.gnucash.org" -- I don't know what it will return specifically.
the hostname command-line tool returns the FQDN.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gethostname might well return just 'code'. It's apparently implementation and OS dependent. The only way to tell is to apply the patch and then look at the resulting page source in a browser.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or we we use something like
if ((gethostname()=="code") or (gethostname()=="code.gnucash.org"))

define("DEFAULT_URL", "https://code.gnucash.org/website/"); // Current fallback
}
else {
define("DEFAULT_URL", "https://www.gnucash.org/"); // The regular webserver
}
define("SERVER_IRC", "irc.gimp.net"); // alias The GIMPNet
define("URL_IRC", "irc://".\SERVER_IRC."/gnucash");
$URL_FLATHUB="https://flathub.org/apps/details/org.gnucash.GnuCash";
Expand Down