]> 91.132.146.200 Git - bibliotheca-php.git/commitdiff
central user-agent and browser info in config. Remove from tools
authorBanana <mail@bananas-playground.net>
Sun, 10 Dec 2023 18:10:02 +0000 (19:10 +0100)
committerBanana <mail@bananas-playground.net>
Sun, 10 Dec 2023 18:10:02 +0000 (19:10 +0100)
CHANGELOG
TODO
upgrade/from-version-1.5.txt
webclient/config/config-googlebooks.php.default
webclient/config/config-imdbweb.php.default
webclient/config/config-musicbrainz.php.default
webclient/config/config.php.default

index 3bc373b208f04f774ad0b93e335bcfa30b73de9f..360c59335a2b36dd09a2174f6d895d9031fadc94 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,5 @@
 1.x - Chizra
-    * Config change. Added new entry. See upgrade/from-version-1.5.txt. It won't work if it is missing.
+    * Config change. Added new entries. See upgrade/from-version-1.5.txt. It won't work if it is missing.
     * Licence change to GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
     * Cleanups
     * Fixed: #21 Debug? string in error log
diff --git a/TODO b/TODO
index 2dd355a6acfed4dad60e50f4b9f23bc514b6fa91..ec684d7e13af235cd0f0ea87786d0ed235cd53ff 100644 (file)
--- a/TODO
+++ b/TODO
@@ -5,7 +5,6 @@
 ** https://watercss.kognise.dev/
 * create a real fallback theme, which does not depend on any styling/css
 ** change the css and js lookup too in main file
-* central user-agent and browser info in config. Remove from tools
 * i18n support
 * Automatic upgrades of DB
 * drop in updates
index 2a1fe5d6ad8b37cf9f807dccf0a7ce6b9740d6fc..007e8a825b4d37618b91d739beca00d50e8736e6 100644 (file)
@@ -1,3 +1,13 @@
-# Added new const to config.php file.
-Use config.php.default as a help. The new line is:
-const LOGFILE = PATH_SYSTEMOUT.'/bibliotheca.log';
\ No newline at end of file
+## Added new constants to config.php file.
+Use config.php.default as a help. The new lines are:
+const LOGFILE = PATH_SYSTEMOUT.'/bibliotheca.log';
+
+# CURL browser settings
+const BROWSER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0';
+const BROWSER_ACCEPT = 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8';
+const BROWSER_ACCEPT_LANG = 'en-US,en;q=0.5';
+
+
+## Updated tools configs
+Please compare the default config files for googlebooks, imdbweb and musicbrainz and make the required
+changes.
index 15506c1beef7942ba47389666c6d4bcbe669e75a..f4bccbfe99cb4c4579de0ad3091cb5bde318dd7b 100644 (file)
@@ -30,9 +30,9 @@
  * TOOL_GOOGLEBOOKS_BROWSER_ACCEPT_LANG should define in which language the content returns
  */
 
-const TOOL_GOOGLEBOOKS_BROWSER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0';
-const TOOL_GOOGLEBOOKS_BROWSER_ACCEPT = 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8';
-const TOOL_GOOGLEBOOKS_BROWSER_ACCEPT_LANG = 'en-US,en;q=0.5';
+const TOOL_GOOGLEBOOKS_BROWSER_AGENT = BROWSER_AGENT;
+const TOOL_GOOGLEBOOKS_BROWSER_ACCEPT = BROWSER_ACCEPT;
+const TOOL_GOOGLEBOOKS_BROWSER_ACCEPT_LANG = BROWSER_ACCEPT_LANG;
 
 const TOOL_GOOGLEBOOKS_FIELDS_TO = array(
        'title' => 'title',
index 5471b77d7d7d68befc64414e22345ee23fb2b5da..652391809b22e0fab21997908acecf0a38810c74 100644 (file)
@@ -51,6 +51,6 @@ const TOOL_IMDBWEB_FIELDS_TO = array(
 );
 */
 
-const TOOL_IMDBWEB_BROWSER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0';
-const TOOL_IMDBWEB_BROWSER_ACCEPT = 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8';
-const TOOL_IMDBWEB_BROWSER_ACCEPT_LANG = 'en-US,en;q=0.5';
+const TOOL_IMDBWEB_BROWSER_AGENT = BROWSER_AGENT;
+const TOOL_IMDBWEB_BROWSER_ACCEPT = BROWSER_ACCEPT;
+const TOOL_IMDBWEB_BROWSER_ACCEPT_LANG = BROWSER_ACCEPT_LANG;
index d24d92040e6bcd5d0a58b219e5b15c100dc8b4d0..589b132f572a8c1eec0e4ce85f1a3b223179f51a 100644 (file)
@@ -31,9 +31,9 @@
  * TOOL_BRAINZ_RESULT_LIMIT How many entries the search will display
  */
 
-const TOOL_BRAINZ_BROWSER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0';
-const TOOL_BRAINZ_BROWSER_ACCEPT = 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8';
-const TOOL_BRAINZ_BROWSER_ACCEPT_LANG = 'en-US,en;q=0.5';
+const TOOL_BRAINZ_BROWSER_AGENT = BROWSER_AGENT;
+const TOOL_BRAINZ_BROWSER_ACCEPT = BROWSER_ACCEPT;
+const TOOL_BRAINZ_BROWSER_ACCEPT_LANG = BROWSER_ACCEPT_LANG;
 
 const TOOL_BRAINZ_RESULT_LIMIT = 10;
 
index 17b878b8281faa291382fc715e1d2ecdd727c15c..127c2c9de6159a76438a788eba46ff8c71e8eb27 100644 (file)
@@ -57,3 +57,8 @@ const ANON_GROUP_ID = '3';
 
 # view options
 const RESULTS_PER_PAGE = 24;
+
+# CURL browser settings
+const BROWSER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0';
+const BROWSER_ACCEPT = 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8';
+const BROWSER_ACCEPT_LANG = 'en-US,en;q=0.5';