mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 12:07:10 -04:00
Minor changes.
This commit is contained in:
parent
b6b84a541b
commit
34e6c2c381
3 changed files with 8 additions and 5 deletions
|
@ -22,7 +22,7 @@ class Bootstrap {
|
|||
$this->setup_server();
|
||||
$this->setup_paths();
|
||||
$this->setup_cache();
|
||||
$this->setup_ext_cmds();
|
||||
$this->setup_cmds();
|
||||
|
||||
$app = new App();
|
||||
if (Util::is_post_request()) {
|
||||
|
@ -123,7 +123,7 @@ class Bootstrap {
|
|||
define("HAS_WRITABLE_CACHE", @is_writable(CACHE_PATH));
|
||||
}
|
||||
|
||||
private function setup_ext_cmds() {
|
||||
private function setup_cmds() {
|
||||
|
||||
define("CMDS_PATH", Util::normalize_path(CACHE_PATH . "/cmds.json", false));
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class Util {
|
|||
|
||||
public static function is_post_request() {
|
||||
|
||||
return (strtolower($_SERVER["REQUEST_METHOD"]) === "post");
|
||||
return (strtolower(getenv("REQUEST_METHOD")) === "post");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
'use strict';
|
||||
|
||||
var ID = 'view/viewmode';
|
||||
var DEPS = ['_', '$', 'core/event', 'core/resource', 'view/sidebar', 'view/topbar', 'view/view'];
|
||||
var DEPS = ['_', '$', 'core/event', 'core/resource', 'core/settings', 'view/sidebar', 'view/topbar', 'view/view'];
|
||||
|
||||
describe('module \'' + ID + '\'', function () {
|
||||
|
||||
|
@ -17,6 +17,9 @@ describe('module \'' + ID + '\'', function () {
|
|||
this.xResource = {
|
||||
image: sinon.stub().returns(util.uniqPath('-image.png'))
|
||||
};
|
||||
this.xSettings = {view: {
|
||||
viewmodeToggle: false
|
||||
}};
|
||||
this.xSidebar = {$el: null};
|
||||
this.xTopbar = {$el: null};
|
||||
this.xView = {
|
||||
|
@ -41,7 +44,7 @@ describe('module \'' + ID + '\'', function () {
|
|||
this.xView.getSize.reset();
|
||||
this.xView.setSize.reset();
|
||||
|
||||
return this.definition.fn(_, $, this.xEvent, this.xResource, this.xSidebar, this.xTopbar, this.xView);
|
||||
return this.definition.fn(_, $, this.xEvent, this.xResource, this.xSettings, this.xSidebar, this.xTopbar, this.xView);
|
||||
};
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue