Update installer to work with saas branch

This commit is contained in:
Duncan Sommerville 2015-06-23 19:02:55 -04:00
parent d48e594dcd
commit 4c797cf100
13 changed files with 168 additions and 144 deletions

View file

@ -11,37 +11,28 @@
class GeneralSetup extends Setup {
// airtime.conf section header
const SECTION = "[general]";
protected static $_section = "[general]";
// Constant form field names for passing errors back to the front-end
const GENERAL_PORT = "generalPort",
GENERAL_HOST = "generalHost";
// Form field values
static $user, $host, $port, $root;
// Array of key->value pairs for airtime.conf
static $properties;
protected static $_properties;
// Message and error fields to return to the front-end
static $message = null;
static $errors = array();
function __construct($settings) {
self::$host = $settings[self::GENERAL_HOST];
self::$port = $settings[self::GENERAL_PORT];
self::$properties = array(
self::$_properties = array(
"api_key" => $this->generateRandomString(),
"base_url" => self::$host,
"base_port" => self::$port,
"base_url" => $settings[self::GENERAL_HOST],
"base_port" => $settings[self::GENERAL_PORT],
);
}
function writeToTemp() {
parent::writeToTemp(self::SECTION, self::$properties);
}
/**
* @return array associative array containing a display message and fields with errors
*/