__dir__ -> __DIR__
This commit is contained in:
@@ -264,7 +264,7 @@ class ActionLogger{
|
||||
return;
|
||||
}
|
||||
|
||||
$templates = new \League\Plates\Engine(__dir__.'/../templates');
|
||||
$templates = new \League\Plates\Engine(__DIR__.'/../templates');
|
||||
|
||||
$render_me = [
|
||||
'crewtype' => $me->getCrewTypeShortName(),
|
||||
|
||||
@@ -7,7 +7,7 @@ class ResetHelper{
|
||||
}
|
||||
|
||||
static public function clearDB(){
|
||||
$servRoot = realpath(__dir__.'/../');
|
||||
$servRoot = realpath(__DIR__.'/../');
|
||||
|
||||
if(!file_exists($servRoot.'/logs') || !file_exists($servRoot.'/data')){
|
||||
if(!is_writable($servRoot)){
|
||||
@@ -195,8 +195,8 @@ class ResetHelper{
|
||||
];
|
||||
}
|
||||
Util::generateFileUsingSimpleTemplate(
|
||||
__dir__.'/../templates/base_map.orig.js',
|
||||
__dir__.'/../d_shared/base_map.js',
|
||||
__DIR__.'/../templates/base_map.orig.js',
|
||||
__DIR__.'/../d_shared/base_map.js',
|
||||
[
|
||||
'cityPosition'=>Json::encode($cityPositions),
|
||||
'regionMap'=>Json::encode(CityConst::$regionMap),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
namespace sammo;
|
||||
|
||||
class Scenario{
|
||||
const SCENARIO_PATH = __dir__.'/../scenario';
|
||||
const SCENARIO_PATH = __DIR__.'/../scenario';
|
||||
|
||||
private $scenarioIdx;
|
||||
private $scenarioPath;
|
||||
@@ -449,10 +449,10 @@ class Scenario{
|
||||
}
|
||||
|
||||
public function buildConf(){
|
||||
$path = __dir__.'/../d_setting';
|
||||
$path = __DIR__.'/../d_setting';
|
||||
|
||||
$mapPath = __dir__.'/../scenario/map';
|
||||
$unitPath = __dir__.'/../scenario/unit';
|
||||
$mapPath = __DIR__.'/../scenario/map';
|
||||
$unitPath = __DIR__.'/../scenario/unit';
|
||||
|
||||
$mapName = $this->gameConf['mapName'];
|
||||
$unitSet = $this->gameConf['unitSet'];
|
||||
|
||||
Reference in New Issue
Block a user