avoid having nice_urls as both system and admin setting

This commit is contained in:
Shish 2020-02-09 16:26:57 +00:00
parent 641fd5a16f
commit 41a205d24a
4 changed files with 3 additions and 4 deletions

View file

@ -24,7 +24,6 @@ _d("CACHE_DSN", null); // string cache connection details
_d("DEBUG", false); // boolean print various debugging details
_d("COOKIE_PREFIX", 'shm'); // string if you run multiple galleries with non-shared logins, give them different prefixes
_d("SPEED_HAX", false); // boolean do some questionable things in the name of performance
_d("NICE_URLS", false); // boolean force niceurl mode
_d("WH_SPLITS", 1); // int how many levels of subfolders to put in the warehouse
_d("VERSION", '2.8-dev'); // string shimmie version
_d("TIMEZONE", null); // string timezone

View file

@ -35,7 +35,7 @@ function make_link(?string $page=null, ?string $query=null): string
}
$install_dir = get_base_href();
if (NICE_URLS || $config->get_bool('nice_urls', false)) {
if (SPEED_HAX || $config->get_bool('nice_urls', false)) {
$base = $install_dir;
} else {
$base = "$install_dir/index.php?q=";

View file

@ -29,6 +29,7 @@ _load_theme_files();
$page = new Page();
_load_event_listeners();
$config->set_string("thumb_engine", "static"); # GD has less overhead per-call
$config->set_bool("nice_urls", true);
send_event(new DatabaseUpgradeEvent());
send_event(new InitExtEvent());
$_tracer->end();
@ -43,7 +44,7 @@ abstract class ShimmiePHPUnitTestCase extends \PHPUnit\Framework\TestCase
public static function setUpBeforeClass(): void
{
parent::setUpBeforeClass();
global $_tracer;
global $_tracer, $config;
$_tracer->begin(get_called_class());
self::create_user(self::$admin_name);

View file

@ -8,7 +8,6 @@ define("CACHE_DSN", null);
define("DEBUG", false);
define("COOKIE_PREFIX", 'shm');
define("SPEED_HAX", false);
define("NICE_URLS", true);
define("WH_SPLITS", 1);
define("VERSION", 'unit-tests');
define("TRACE_FILE", null);