/** * Initialize form data. */ function initData() { $docRoot = dirname($_SERVER['DOCUMENT_ROOT']); if (Core::isWindows()) { // Replace backslashes with slashes for the default files directory. $docRoot = str_replace('\\', '/', $docRoot); } // Add a trailing slash for paths that aren't filesystem root if ($docRoot !== '/') { $docRoot .= '/'; } $this->_data = array('locale' => AppLocale::getLocale(), 'additionalLocales' => array(), 'clientCharset' => 'utf-8', 'connectionCharset' => '', 'databaseCharset' => '', 'encryption' => function_exists('sha1') ? 'sha1' : 'md5', 'filesDir' => $docRoot . 'files', 'databaseDriver' => 'mysql', 'databaseHost' => 'localhost', 'databaseUsername' => 'ojs', 'databasePassword' => '', 'databaseName' => 'ojs', 'createDatabase' => 1, 'oaiRepositoryId' => 'ojs.' . $this->_request->getServerHost()); }