Skip to content

Commit

Permalink
Merge pull request #655 from exodus4d/develop
Browse files Browse the repository at this point in the history
v1.4.0
  • Loading branch information
exodus4d committed Jul 20, 2018
2 parents c38ae0d + 0c9a3f1 commit 63ea379
Show file tree
Hide file tree
Showing 210 changed files with 5,434 additions and 11,215 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## *PATHFINDER*
# ![Pathfinder logo](favicon/favicon-32x32.png "Logo") *PATHFINDER*
Mapping tool for [*EVE ONLINE*](https://www.eveonline.com)

- Project URL [https://www.pathfinder-w.space](https://www.pathfinder-w.space)
Expand Down Expand Up @@ -40,11 +40,10 @@ Issues should be reported in the [Issue](https://github.com/exodus4d/pathfinder/
|-- routes.ini --> config - routes
|-- [0755] export/ --> static data
|-- csv/ --> *.csv used by /setup page
|-- json/ --> *.json used by /setup page
|-- sql/ --> DB dump for import (pathfinder.sql)
|-- sql/ --> DB dump for import (eve_universe.sql.zip)
|-- [0755] favicon/ --> Favicons
|-- [0777] history/ --> log files (map history logs) [optional]
|-- [0755] js/ --> JS source files (raw)
|-- [0755] js/ --> JS source files
|-- app/ --> "PASTHFINDER" core files (not used for production)
|-- lib/ --> 3rd partie extension/library (not used for production)
|-- app.js --> require.js config (!required for production!)
Expand Down
5 changes: 4 additions & 1 deletion app/cron.ini
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,8 @@ deleteExpiredCacheData = Cron\Cache->deleteExpiredData, @downtime
; delete old statistics (activity log) data
deleteStatisticsData = Cron\StatisticsUpdate->deleteStatisticsData, @weekly

; updates small amount of static system data from CCP API
updateUniverseSystems = Cron\Universe->updateUniverseSystems, @instant

; setup universe DB with static data from ESI
; setup = Cron\Universe->setup, @instant
;setup = Cron\Universe->setup, @instant
6 changes: 0 additions & 6 deletions app/environment.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ DB_UNIVERSE_NAME = eve_universe
DB_UNIVERSE_USER = root
DB_UNIVERSE_PASS =

; EVE-Online CCP database export
DB_CCP_DNS = mysql:host=localhost;port=3306;dbname=
DB_CCP_NAME = eve_lifeblood_min
DB_CCP_USER = root
DB_CCP_PASS =

; CCP SSO (OAuth2) - visit: https://developers.eveonline.com/applications
CCP_SSO_URL = https://sisilogin.testeveonline.com
CCP_SSO_CLIENT_ID =
Expand Down
16 changes: 12 additions & 4 deletions app/lib/cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Cron extends \Prefab {
const
E_Undefined='Undefined property: %s::$%s',
E_Invalid='"%s" is not a valid name: it should only contain alphanumeric characters',
E_NotFound='Job %s doesn\' exist',
E_NotFound='Job %s doesn\'t exist',
E_Callable='Job %s cannot be called';
//@}

Expand Down Expand Up @@ -43,6 +43,9 @@ class Cron extends \Prefab {
'hourly'=>'0 * * * *',
);

/** @var bool */
private $windows;

/**
* Set binary path after checking that it can be executed and is CLI
* @param string $path
Expand Down Expand Up @@ -113,9 +116,13 @@ function execute($job,$async=TRUE) {
// Failing to do so will cause PHP to hang until the execution of the program ends.
$dir=dirname($this->script);
$file=basename($this->script);
if (@$dir[0]!='/')
if (!preg_match($this->windows?'/^[A-Z]:\\\\/i':'/^\//',$dir))
$dir=getcwd().'/'.$dir;
exec(sprintf('cd "%s";%s %s /cron/%s > /dev/null 2>/dev/null &',$dir,$this->binary,$file,$job));
if ($this->windows) {
pclose(popen(sprintf('start "cron" "%s" "%s\\%s" "/cron/%s"',$this->binary,$dir,$file,$job),'r'));
} else {
exec(sprintf('cd "%s" & %s %s /cron/%s >/dev/null 2>/dev/null &',$dir,$this->binary,$file,$job));
}
return FALSE;
}
$start=microtime(TRUE);
Expand Down Expand Up @@ -245,7 +252,8 @@ function __construct() {
foreach(array('php','php-cli') as $path) // try to guess the binary name
if ($this->binary($path))
break;
$this->windows=(bool)preg_match('/^win/i',PHP_OS);
$f3->route(array('GET /cron','GET /cron/@job'),array($this,'route'));
}

}
}
6 changes: 3 additions & 3 deletions app/lib/db/cortex.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ public function fields(array $fields=array(), $exclude=false) {
protected function applyWhitelist() {
if ($this->dbsType == 'sql') {
// fetch full schema
if (!$this->fluid && isset(self::$schema_cache[$this->table]))
$schema = self::$schema_cache[$this->table];
if (!$this->fluid && isset(self::$schema_cache[$this->table.$this->db->uuid()]))
$schema = self::$schema_cache[$this->table.$this->db->uuid()];
else {
$schema = $this->mapper->schema();
self::$schema_cache[$this->table] = $schema;
self::$schema_cache[$this->table.$this->db->uuid()] = $schema;
}
// apply reduced fields schema
if ($this->whitelist)
Expand Down
6 changes: 4 additions & 2 deletions app/main/controller/api/connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ public function save(\Base $f3){
$connection = Model\BasicModel::getNew('ConnectionModel');
$connection->getById( (int)$connectionData['id'] );

$connectionData['mapId'] = $map;
$connection->setData($connectionData);
$connection->mapId = $map;
$connection->source = $source;
$connection->target = $target;
$connection->copyfrom($connectionData, ['scope', 'type']);

// change the default type for the new connection
$connection->setDefaultTypeData();
Expand Down
Loading

0 comments on commit 63ea379

Please sign in to comment.