Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Boot.conf generates a simple server uuid that can be used for various…
Browse files Browse the repository at this point in the history
… identifier (kvcache should use it)
  • Loading branch information
cdujeu committed Oct 8, 2015
1 parent cbf4957 commit 50e60a7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/src/plugins/boot.conf/class.BootConfLoader.php
Expand Up @@ -51,7 +51,10 @@ public function init($options)
{
parent::init($options);
try {
$this->getPluginWorkDir(true);
$dir = $this->getPluginWorkDir(true);
if(!is_file($dir.DIRECTORY_SEPARATOR."server_uuid")){
file_put_contents($dir.DIRECTORY_SEPARATOR."server_uuid", md5(json_encode($_SERVER)));
}
} catch (Exception $e) {
die("Impossible write into the AJXP_DATA_PATH folder: Make sure to grant write access to this folder for your webserver!");
}
Expand All @@ -69,6 +72,10 @@ public function loadManifest()
}
}

public function getServerUuid(){
return file_get_contents($this->getPluginWorkDir().DIRECTORY_SEPARATOR."server_uuid");
}

public function printFormFromServerSettings($fullManifest){

AJXP_XMLWriter::header("admin_data");
Expand Down

0 comments on commit 50e60a7

Please sign in to comment.