because get_self_url_prefix() referenced information unavailable to php CLI clients, add config option SELF_URL_PATH

This commit is contained in:
Andrew Dolgov 2011-04-01 20:14:49 +04:00
parent a9ac55ea76
commit ed102aa083
3 changed files with 15 additions and 7 deletions

View file

@ -9,6 +9,10 @@
define('DB_PASS', "XXXXXX");
//define('DB_PORT', '5432'); // when neeeded, PG-only
define('SELF_URL_PATH', 'http://localhost/tt-rss');
// Full URL of your tt-rss installation. You need to set this option
// correctly for tt-rss to function properly.
define('MAGPIE_FETCH_TIME_OUT', 60);
// Magpie's default timeout is 5 seconds. Some RSS feeds,
// such as from large Trac installs, can take significantly

View file

@ -766,7 +766,7 @@
return; // no articles
}
if (PUBSUBHUBBUB_HUB && $pubsub_state != 2) {
if ($pubsub_state != 2) {
$feed_hub_url = false;
if ($use_simplepie) {
@ -5507,7 +5507,7 @@
function get_self_url_prefix() {
$url_path = "";
/* $url_path = "";
if ($_SERVER['HTTPS'] != "on") {
$url_path = "http://";
@ -5517,7 +5517,9 @@
$url_path .= $_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);
return $url_path;
return $url_path; */
return SELF_URL_PATH;
}
function opml_publish_url($link){
@ -5558,8 +5560,10 @@
* @return string The Mozilla Firefox feed adding URL.
*/
function add_feed_url() {
$url_path = ($_SERVER['HTTPS'] != "on" ? 'http://' : 'https://') . $_SERVER["HTTP_HOST"] . parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
$url_path .= "?op=pref-feeds&quiet=1&subop=add&feed_url=%s";
//$url_path = ($_SERVER['HTTPS'] != "on" ? 'http://' : 'https://') . $_SERVER["HTTP_HOST"] . parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
$url_path = get_self_url_prefix() .
"/backend.php?op=pref-feeds&quiet=1&subop=add&feed_url=%s";
return $url_path;
} // function add_feed_url

View file

@ -1,3 +1,3 @@
<?php # This file has been generated at: Fri Apr 1 13:36:01 MSD 2011
<?php # This file has been generated at: Fri Apr 1 20:41:16 MSD 2011
define('GENERATED_CONFIG_CHECK', 22);
$requred_defines = array( 'DB_TYPE', 'DB_HOST', 'DB_USER', 'DB_NAME', 'DB_PASS', 'MAGPIE_FETCH_TIME_OUT', 'MAGPIE_CACHE_DIR', 'ICONS_DIR', 'ICONS_URL', 'SINGLE_USER_MODE', 'TMP_DIRECTORY', 'ENABLE_UPDATE_DAEMON', 'DAEMON_SLEEP_INTERVAL', 'DATABASE_BACKED_SESSIONS', 'SESSION_CHECK_ADDRESS', 'SESSION_COOKIE_LIFETIME', 'SESSION_EXPIRE_TIME', 'DAEMON_UPDATE_LOGIN_LIMIT', 'CHECK_FOR_NEW_VERSION', 'DIGEST_ENABLE', 'DIGEST_EMAIL_LIMIT', 'DAEMON_SENDS_DIGESTS', 'MYSQL_CHARSET', 'DEFAULT_UPDATE_METHOD', 'SIMPLEPIE_CACHE_DIR', 'SIMPLEPIE_CACHE_IMAGES', 'COUNTERS_MAX_AGE', 'DIGEST_FROM_NAME', 'DIGEST_FROM_ADDRESS', 'DIGEST_SUBJECT', 'DIGEST_SMTP_HOST', 'DIGEST_SMTP_LOGIN', 'DIGEST_SMTP_PASSWORD', 'DAEMON_FEED_LIMIT', 'ALLOW_REMOTE_USER_AUTH', 'AUTO_LOGIN', 'LOCK_DIRECTORY', 'ENABLE_GZIP_OUTPUT', 'PHP_EXECUTABLE', 'ENABLE_REGISTRATION', 'REG_NOTIFY_ADDRESS', 'REG_MAX_USERS', 'FEEDBACK_URL', 'FORCE_ARTICLE_PURGE', 'SPHINX_ENABLED', 'SPHINX_INDEX', 'ENABLE_TWEET_BUTTON', 'CONSUMER_KEY', 'CONSUMER_SECRET', 'PUBSUBHUBBUB_HUB', 'ISCONFIGURED', 'CONFIG_VERSION'); ?>
$requred_defines = array( 'DB_TYPE', 'DB_HOST', 'DB_USER', 'DB_NAME', 'DB_PASS', 'SELF_URL_PATH', 'MAGPIE_FETCH_TIME_OUT', 'MAGPIE_CACHE_DIR', 'ICONS_DIR', 'ICONS_URL', 'SINGLE_USER_MODE', 'TMP_DIRECTORY', 'ENABLE_UPDATE_DAEMON', 'DAEMON_SLEEP_INTERVAL', 'DATABASE_BACKED_SESSIONS', 'SESSION_CHECK_ADDRESS', 'SESSION_COOKIE_LIFETIME', 'SESSION_EXPIRE_TIME', 'DAEMON_UPDATE_LOGIN_LIMIT', 'CHECK_FOR_NEW_VERSION', 'DIGEST_ENABLE', 'DIGEST_EMAIL_LIMIT', 'DAEMON_SENDS_DIGESTS', 'MYSQL_CHARSET', 'DEFAULT_UPDATE_METHOD', 'SIMPLEPIE_CACHE_DIR', 'SIMPLEPIE_CACHE_IMAGES', 'COUNTERS_MAX_AGE', 'DIGEST_FROM_NAME', 'DIGEST_FROM_ADDRESS', 'DIGEST_SUBJECT', 'DIGEST_SMTP_HOST', 'DIGEST_SMTP_LOGIN', 'DIGEST_SMTP_PASSWORD', 'DAEMON_FEED_LIMIT', 'ALLOW_REMOTE_USER_AUTH', 'AUTO_LOGIN', 'LOCK_DIRECTORY', 'ENABLE_GZIP_OUTPUT', 'PHP_EXECUTABLE', 'ENABLE_REGISTRATION', 'REG_NOTIFY_ADDRESS', 'REG_MAX_USERS', 'FEEDBACK_URL', 'FORCE_ARTICLE_PURGE', 'SPHINX_ENABLED', 'SPHINX_INDEX', 'ENABLE_TWEET_BUTTON', 'CONSUMER_KEY', 'CONSUMER_SECRET', 'PUBSUBHUBBUB_HUB', 'ISCONFIGURED', 'CONFIG_VERSION'); ?>