Do not use the DIRECTORY_SEPARATOR constant for URLs
The constant DIRECTORY_SEPARATOR is "\" on windows and therefore the favicon urls are invalid for php on windows. Renamed the FAVICON_PUBLIC_DIRECTORY constant to a more descriptive name.
This commit is contained in:
parent
fce8d09bfc
commit
6d36e1cb16
@ -16,7 +16,7 @@ defined('ROOT_DIRECTORY') or define('ROOT_DIRECTORY', __DIR__);
|
|||||||
defined('DATA_DIRECTORY') or define('DATA_DIRECTORY', ROOT_DIRECTORY.DIRECTORY_SEPARATOR.'data');
|
defined('DATA_DIRECTORY') or define('DATA_DIRECTORY', ROOT_DIRECTORY.DIRECTORY_SEPARATOR.'data');
|
||||||
|
|
||||||
defined('FAVICON_DIRECTORY') or define('FAVICON_DIRECTORY', DATA_DIRECTORY.DIRECTORY_SEPARATOR.'favicons');
|
defined('FAVICON_DIRECTORY') or define('FAVICON_DIRECTORY', DATA_DIRECTORY.DIRECTORY_SEPARATOR.'favicons');
|
||||||
defined('FAVICON_PUBLIC_DIRECTORY') or define('FAVICON_PUBLIC_DIRECTORY', 'data'.DIRECTORY_SEPARATOR.'favicons');
|
defined('FAVICON_URL_PATH') or define('FAVICON_URL_PATH', 'data/favicons');
|
||||||
|
|
||||||
defined('ENABLE_MULTIPLE_DB') or define('ENABLE_MULTIPLE_DB', true);
|
defined('ENABLE_MULTIPLE_DB') or define('ENABLE_MULTIPLE_DB', true);
|
||||||
defined('DB_FILENAME') or define('DB_FILENAME', 'db.sqlite');
|
defined('DB_FILENAME') or define('DB_FILENAME', 'db.sqlite');
|
||||||
|
@ -12,8 +12,8 @@ define('DATA_DIRECTORY', __DIR__.'/data');
|
|||||||
// FAVICON_DIRECTORY => default is favicons (writable directory)
|
// FAVICON_DIRECTORY => default is favicons (writable directory)
|
||||||
define('FAVICON_DIRECTORY', DATA_DIRECTORY.DIRECTORY_SEPARATOR.'favicons');
|
define('FAVICON_DIRECTORY', DATA_DIRECTORY.DIRECTORY_SEPARATOR.'favicons');
|
||||||
|
|
||||||
// FAVICON_PUBLIC_DIRECTORY => default is data/favicons/
|
// FAVICON_URL_PATH => default is data/favicons/
|
||||||
define('FAVICON_PUBLIC_DIRECTORY', 'data'.DIRECTORY_SEPARATOR.'favicons');
|
define('FAVICON_URL_PATH', 'data/favicons');
|
||||||
|
|
||||||
// DB_FILENAME => default value is db.sqlite (default database filename)
|
// DB_FILENAME => default value is db.sqlite (default database filename)
|
||||||
define('DB_FILENAME', 'db.sqlite');
|
define('DB_FILENAME', 'db.sqlite');
|
||||||
|
@ -26,8 +26,8 @@ define('DATA_DIRECTORY', __DIR__.'/data');
|
|||||||
// FAVICON_DIRECTORY => default is favicons (writable directory)
|
// FAVICON_DIRECTORY => default is favicons (writable directory)
|
||||||
define('FAVICON_DIRECTORY', DATA_DIRECTORY.DIRECTORY_SEPARATOR.'favicons');
|
define('FAVICON_DIRECTORY', DATA_DIRECTORY.DIRECTORY_SEPARATOR.'favicons');
|
||||||
|
|
||||||
// FAVICON_PUBLIC_DIRECTORY => default is data/favicons/
|
// FAVICON_URL_PATH => default is data/favicons/
|
||||||
define('FAVICON_PUBLIC_DIRECTORY', 'data'.DIRECTORY_SEPARATOR.'favicons');
|
define('FAVICON_URL_PATH', 'data/favicons');
|
||||||
|
|
||||||
// DB_FILENAME => default value is db.sqlite (default database filename)
|
// DB_FILENAME => default value is db.sqlite (default database filename)
|
||||||
define('DB_FILENAME', 'db.sqlite');
|
define('DB_FILENAME', 'db.sqlite');
|
||||||
|
@ -52,7 +52,7 @@ function favicon_extension($type)
|
|||||||
function favicon(array $favicons, $feed_id)
|
function favicon(array $favicons, $feed_id)
|
||||||
{
|
{
|
||||||
if (! empty($favicons[$feed_id])) {
|
if (! empty($favicons[$feed_id])) {
|
||||||
return '<img src="'.FAVICON_PUBLIC_DIRECTORY.DIRECTORY_SEPARATOR.$favicons[$feed_id].'" class="favicon"/>';
|
return '<img src="'.FAVICON_URL_PATH.'/'.$favicons[$feed_id].'" class="favicon"/>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
|
Loading…
Reference in New Issue
Block a user