Completed
Push — master ( dc8aec...c2d22d )
by Steve
10:24
created
engine/classes/Elgg/Database/Config.php 1 patch
Indentation   +149 added lines, -149 removed lines patch added patch discarded remove patch
@@ -12,154 +12,154 @@
 block discarded – undo
12 12
  */
13 13
 class Config {
14 14
 
15
-	const READ = 'read';
16
-	const WRITE = 'write';
17
-	const READ_WRITE = 'readwrite';
18
-
19
-	/** @var \stdClass $config Elgg's config object */
20
-	protected $config;
21
-
22
-	/**
23
-	 * Constructor
24
-	 *
25
-	 * @param \stdClass $config Elgg's $CONFIG object
26
-	 */
27
-	public function __construct(\stdClass $config) {
28
-		$this->config = $config;
29
-	}
30
-
31
-	/**
32
-	 * Get the database table prefix
33
-	 *
34
-	 * @return string
35
-	 */
36
-	public function getTablePrefix() {
37
-		return $this->config->dbprefix;
38
-	}
39
-
40
-	/**
41
-	 * Is the query cache enabled?
42
-	 *
43
-	 * @return bool
44
-	 */
45
-	public function isQueryCacheEnabled() {
46
-		if (isset($this->config->db_disable_query_cache)) {
47
-			return !$this->config->db_disable_query_cache;
48
-		}
49
-
50
-		return true;
51
-	}
52
-
53
-	/**
54
-	 * Are the read and write connections separate?
55
-	 *
56
-	 * @return bool
57
-	 */
58
-	public function isDatabaseSplit() {
59
-		if (isset($this->config->db) && isset($this->config->db['split'])) {
60
-			return $this->config->db['split'];
61
-		}
62
-
63
-		// this was the recommend structure from Elgg 1.0 to 1.8
64
-		if (isset($this->config->db) && isset($this->config->db->split)) {
65
-			return $this->config->db->split;
66
-		}
67
-
68
-		return false;
69
-	}
70
-
71
-	/**
72
-	 * Get the connection configuration
73
-	 *
74
-	 * The parameters are in an array like this:
75
-	 * array(
76
-	 *	'host' => 'xxx',
77
-	 *  'user' => 'xxx',
78
-	 *  'password' => 'xxx',
79
-	 *  'database' => 'xxx',
80
-	 * )
81
-	 *
82
-	 * @param int $type The connection type: READ, WRITE, READ_WRITE
83
-	 * @return array
84
-	 */
85
-	public function getConnectionConfig($type = self::READ_WRITE) {
86
-		switch ($type) {
87
-			case self::READ:
88
-			case self::WRITE:
89
-				$config = $this->getParticularConnectionConfig($type);
90
-				break;
91
-			default:
92
-				$config = $this->getGeneralConnectionConfig();
93
-				break;
94
-		}
95
-
96
-		if (!empty($this->config->dbencoding)) {
97
-			$config['encoding'] = $this->config->dbencoding;
98
-		} else {
99
-			$config['encoding'] = 'utf8';
100
-		}
101
-
102
-		return $config;
103
-	}
104
-
105
-	/**
106
-	 * Get the read/write database connection information
107
-	 *
108
-	 * @return array
109
-	 */
110
-	protected function getGeneralConnectionConfig() {
111
-		return [
112
-			'host' => $this->config->dbhost,
113
-			'user' => $this->config->dbuser,
114
-			'password' => $this->config->dbpass,
115
-			'database' => $this->config->dbname,
116
-		];
117
-	}
118
-
119
-	/**
120
-	 * Get connection information for reading or writing
121
-	 *
122
-	 * @param string $type Connection type: 'write' or 'read'
123
-	 * @return array
124
-	 */
125
-	protected function getParticularConnectionConfig($type) {
126
-		if (is_object($this->config->db[$type])) {
127
-			// old style single connection (Elgg < 1.9)
128
-			$config = [
129
-				'host' => $this->config->db[$type]->dbhost,
130
-				'user' => $this->config->db[$type]->dbuser,
131
-				'password' => $this->config->db[$type]->dbpass,
132
-				'database' => $this->config->db[$type]->dbname,
133
-			];
134
-		} else if (array_key_exists('dbhost', $this->config->db[$type])) {
135
-			// new style single connection
136
-			$config = [
137
-				'host' => $this->config->db[$type]['dbhost'],
138
-				'user' => $this->config->db[$type]['dbuser'],
139
-				'password' => $this->config->db[$type]['dbpass'],
140
-				'database' => $this->config->db[$type]['dbname'],
141
-			];
142
-		} else if (is_object(current($this->config->db[$type]))) {
143
-			// old style multiple connections
144
-			$index = array_rand($this->config->db[$type]);
145
-			$config = [
146
-				'host' => $this->config->db[$type][$index]->dbhost,
147
-				'user' => $this->config->db[$type][$index]->dbuser,
148
-				'password' => $this->config->db[$type][$index]->dbpass,
149
-				'database' => $this->config->db[$type][$index]->dbname,
150
-			];
151
-		} else {
152
-			// new style multiple connections
153
-			$index = array_rand($this->config->db[$type]);
154
-			$config = [
155
-				'host' => $this->config->db[$type][$index]['dbhost'],
156
-				'user' => $this->config->db[$type][$index]['dbuser'],
157
-				'password' => $this->config->db[$type][$index]['dbpass'],
158
-				'database' => $this->config->db[$type][$index]['dbname'],
159
-			];
160
-		}
161
-
162
-		return $config;
163
-	}
15
+    const READ = 'read';
16
+    const WRITE = 'write';
17
+    const READ_WRITE = 'readwrite';
18
+
19
+    /** @var \stdClass $config Elgg's config object */
20
+    protected $config;
21
+
22
+    /**
23
+     * Constructor
24
+     *
25
+     * @param \stdClass $config Elgg's $CONFIG object
26
+     */
27
+    public function __construct(\stdClass $config) {
28
+        $this->config = $config;
29
+    }
30
+
31
+    /**
32
+     * Get the database table prefix
33
+     *
34
+     * @return string
35
+     */
36
+    public function getTablePrefix() {
37
+        return $this->config->dbprefix;
38
+    }
39
+
40
+    /**
41
+     * Is the query cache enabled?
42
+     *
43
+     * @return bool
44
+     */
45
+    public function isQueryCacheEnabled() {
46
+        if (isset($this->config->db_disable_query_cache)) {
47
+            return !$this->config->db_disable_query_cache;
48
+        }
49
+
50
+        return true;
51
+    }
52
+
53
+    /**
54
+     * Are the read and write connections separate?
55
+     *
56
+     * @return bool
57
+     */
58
+    public function isDatabaseSplit() {
59
+        if (isset($this->config->db) && isset($this->config->db['split'])) {
60
+            return $this->config->db['split'];
61
+        }
62
+
63
+        // this was the recommend structure from Elgg 1.0 to 1.8
64
+        if (isset($this->config->db) && isset($this->config->db->split)) {
65
+            return $this->config->db->split;
66
+        }
67
+
68
+        return false;
69
+    }
70
+
71
+    /**
72
+     * Get the connection configuration
73
+     *
74
+     * The parameters are in an array like this:
75
+     * array(
76
+     *	'host' => 'xxx',
77
+     *  'user' => 'xxx',
78
+     *  'password' => 'xxx',
79
+     *  'database' => 'xxx',
80
+     * )
81
+     *
82
+     * @param int $type The connection type: READ, WRITE, READ_WRITE
83
+     * @return array
84
+     */
85
+    public function getConnectionConfig($type = self::READ_WRITE) {
86
+        switch ($type) {
87
+            case self::READ:
88
+            case self::WRITE:
89
+                $config = $this->getParticularConnectionConfig($type);
90
+                break;
91
+            default:
92
+                $config = $this->getGeneralConnectionConfig();
93
+                break;
94
+        }
95
+
96
+        if (!empty($this->config->dbencoding)) {
97
+            $config['encoding'] = $this->config->dbencoding;
98
+        } else {
99
+            $config['encoding'] = 'utf8';
100
+        }
101
+
102
+        return $config;
103
+    }
104
+
105
+    /**
106
+     * Get the read/write database connection information
107
+     *
108
+     * @return array
109
+     */
110
+    protected function getGeneralConnectionConfig() {
111
+        return [
112
+            'host' => $this->config->dbhost,
113
+            'user' => $this->config->dbuser,
114
+            'password' => $this->config->dbpass,
115
+            'database' => $this->config->dbname,
116
+        ];
117
+    }
118
+
119
+    /**
120
+     * Get connection information for reading or writing
121
+     *
122
+     * @param string $type Connection type: 'write' or 'read'
123
+     * @return array
124
+     */
125
+    protected function getParticularConnectionConfig($type) {
126
+        if (is_object($this->config->db[$type])) {
127
+            // old style single connection (Elgg < 1.9)
128
+            $config = [
129
+                'host' => $this->config->db[$type]->dbhost,
130
+                'user' => $this->config->db[$type]->dbuser,
131
+                'password' => $this->config->db[$type]->dbpass,
132
+                'database' => $this->config->db[$type]->dbname,
133
+            ];
134
+        } else if (array_key_exists('dbhost', $this->config->db[$type])) {
135
+            // new style single connection
136
+            $config = [
137
+                'host' => $this->config->db[$type]['dbhost'],
138
+                'user' => $this->config->db[$type]['dbuser'],
139
+                'password' => $this->config->db[$type]['dbpass'],
140
+                'database' => $this->config->db[$type]['dbname'],
141
+            ];
142
+        } else if (is_object(current($this->config->db[$type]))) {
143
+            // old style multiple connections
144
+            $index = array_rand($this->config->db[$type]);
145
+            $config = [
146
+                'host' => $this->config->db[$type][$index]->dbhost,
147
+                'user' => $this->config->db[$type][$index]->dbuser,
148
+                'password' => $this->config->db[$type][$index]->dbpass,
149
+                'database' => $this->config->db[$type][$index]->dbname,
150
+            ];
151
+        } else {
152
+            // new style multiple connections
153
+            $index = array_rand($this->config->db[$type]);
154
+            $config = [
155
+                'host' => $this->config->db[$type][$index]['dbhost'],
156
+                'user' => $this->config->db[$type][$index]['dbuser'],
157
+                'password' => $this->config->db[$type][$index]['dbpass'],
158
+                'database' => $this->config->db[$type][$index]['dbname'],
159
+            ];
160
+        }
161
+
162
+        return $config;
163
+    }
164 164
 }
165 165
 
Please login to merge, or discard this patch.
engine/classes/Elgg/Database.php 1 patch
Indentation   +714 added lines, -714 removed lines patch added patch discarded remove patch
@@ -15,718 +15,718 @@
 block discarded – undo
15 15
  * @property-read string $prefix Elgg table prefix (read only)
16 16
  */
17 17
 class Database {
18
-	use Profilable;
19
-
20
-	const DELAYED_QUERY = 'q';
21
-	const DELAYED_TYPE = 't';
22
-	const DELAYED_HANDLER = 'h';
23
-	const DELAYED_PARAMS = 'p';
24
-
25
-	/**
26
-	 * @var string $table_prefix Prefix for database tables
27
-	 */
28
-	private $table_prefix;
29
-
30
-	/**
31
-	 * @var Connection[]
32
-	 */
33
-	private $connections = [];
34
-
35
-	/**
36
-	 * @var int $query_count The number of queries made
37
-	 */
38
-	private $query_count = 0;
39
-
40
-	/**
41
-	 * Query cache for select queries.
42
-	 *
43
-	 * Queries and their results are stored in this cache as:
44
-	 * <code>
45
-	 * $DB_QUERY_CACHE[query hash] => array(result1, result2, ... resultN)
46
-	 * </code>
47
-	 * @see \Elgg\Database::getResults() for details on the hash.
48
-	 *
49
-	 * @var \Elgg\Cache\LRUCache $query_cache The cache
50
-	 */
51
-	private $query_cache = null;
52
-
53
-	/**
54
-	 * @var int $query_cache_size The number of queries to cache
55
-	 */
56
-	private $query_cache_size = 50;
57
-
58
-	/**
59
-	 * Queries are saved as an array with the DELAYED_* constants as keys.
60
-	 *
61
-	 * @see registerDelayedQuery
62
-	 *
63
-	 * @var array $delayed_queries Queries to be run during shutdown
64
-	 */
65
-	private $delayed_queries = [];
66
-
67
-	/**
68
-	 * @var bool $installed Is the database installed?
69
-	 */
70
-	private $installed = false;
71
-
72
-	/**
73
-	 * @var \Elgg\Database\Config $config Database configuration
74
-	 */
75
-	private $config;
76
-
77
-	/**
78
-	 * @var \Elgg\Logger $logger The logger
79
-	 */
80
-	private $logger;
81
-
82
-	/**
83
-	 * Constructor
84
-	 *
85
-	 * @param \Elgg\Database\Config $config Database configuration
86
-	 * @param \Elgg\Logger          $logger The logger
87
-	 */
88
-	public function __construct(\Elgg\Database\Config $config, \Elgg\Logger $logger = null) {
89
-
90
-		$this->logger = $logger;
91
-		$this->config = $config;
92
-
93
-		$this->table_prefix = $config->getTablePrefix();
94
-
95
-		$this->enableQueryCache();
96
-	}
97
-
98
-	/**
99
-	 * Set the logger object
100
-	 *
101
-	 * @param Logger $logger The logger
102
-	 * @return void
103
-	 * @access private
104
-	 */
105
-	public function setLogger(Logger $logger) {
106
-		$this->logger = $logger;
107
-	}
108
-
109
-	/**
110
-	 * Gets (if required, also creates) a DB connection.
111
-	 *
112
-	 * @param string $type The type of link we want: "read", "write" or "readwrite".
113
-	 *
114
-	 * @return Connection
115
-	 * @throws \DatabaseException
116
-	 */
117
-	protected function getConnection($type) {
118
-		if (isset($this->connections[$type])) {
119
-			return $this->connections[$type];
120
-		} else if (isset($this->connections['readwrite'])) {
121
-			return $this->connections['readwrite'];
122
-		} else {
123
-			$this->setupConnections();
124
-			return $this->getConnection($type);
125
-		}
126
-	}
127
-
128
-	/**
129
-	 * Establish database connections
130
-	 *
131
-	 * If the configuration has been set up for multiple read/write databases, set those
132
-	 * links up separately; otherwise just create the one database link.
133
-	 *
134
-	 * @return void
135
-	 * @throws \DatabaseException
136
-	 * @access private
137
-	 */
138
-	public function setupConnections() {
139
-		if ($this->config->isDatabaseSplit()) {
140
-			$this->connect('read');
141
-			$this->connect('write');
142
-		} else {
143
-			$this->connect('readwrite');
144
-		}
145
-	}
146
-
147
-	/**
148
-	 * Establish a connection to the database server
149
-	 *
150
-	 * Connect to the database server and use the Elgg database for a particular database link
151
-	 *
152
-	 * @param string $type The type of database connection. "read", "write", or "readwrite".
153
-	 *
154
-	 * @return void
155
-	 * @throws \DatabaseException
156
-	 * @access private
157
-	 */
158
-	public function connect($type = "readwrite") {
159
-		$conf = $this->config->getConnectionConfig($type);
160
-
161
-		$params = [
162
-			'dbname' => $conf['database'],
163
-			'user' => $conf['user'],
164
-			'password' => $conf['password'],
165
-			'host' => $conf['host'],
166
-			'charset' => $conf['encoding'],
167
-			'driver' => 'pdo_mysql',
168
-		];
169
-
170
-		try {
171
-			$this->connections[$type] = DriverManager::getConnection($params);
172
-			$this->connections[$type]->setFetchMode(\PDO::FETCH_OBJ);
173
-
174
-			// https://github.com/Elgg/Elgg/issues/8121
175
-			$sub_query = "SELECT REPLACE(@@SESSION.sql_mode, 'ONLY_FULL_GROUP_BY', '')";
176
-			$this->connections[$type]->exec("SET SESSION sql_mode=($sub_query);");
177
-		} catch (\Exception $e) {
178
-			// @todo just allow PDO exceptions
179
-			// http://dev.mysql.com/doc/refman/5.1/en/error-messages-server.html
180
-			if ($e instanceof \PDOException && ($e->getCode() == 1102 || $e->getCode() == 1049)) {
181
-				$msg = "Elgg couldn't select the database '{$conf['database']}'. "
182
-					. "Please check that the database is created and you have access to it.";
183
-			} else {
184
-				$msg = "Elgg couldn't connect to the database using the given credentials. Check the settings file.";
185
-			}
186
-			throw new \DatabaseException($msg);
187
-		}
188
-	}
189
-
190
-	/**
191
-	 * Retrieve rows from the database.
192
-	 *
193
-	 * Queries are executed with {@link \Elgg\Database::executeQuery()} and results
194
-	 * are retrieved with {@link \PDO::fetchObject()}.  If a callback
195
-	 * function $callback is defined, each row will be passed as a single
196
-	 * argument to $callback.  If no callback function is defined, the
197
-	 * entire result set is returned as an array.
198
-	 *
199
-	 * @param string   $query    The query being passed.
200
-	 * @param callable $callback Optionally, the name of a function to call back to on each row
201
-	 * @param array    $params   Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
202
-	 *
203
-	 * @return array An array of database result objects or callback function results. If the query
204
-	 *               returned nothing, an empty array.
205
-	 * @throws \DatabaseException
206
-	 */
207
-	public function getData($query, $callback = null, array $params = []) {
208
-		return $this->getResults($query, $callback, false, $params);
209
-	}
210
-
211
-	/**
212
-	 * Retrieve a single row from the database.
213
-	 *
214
-	 * Similar to {@link \Elgg\Database::getData()} but returns only the first row
215
-	 * matched.  If a callback function $callback is specified, the row will be passed
216
-	 * as the only argument to $callback.
217
-	 *
218
-	 * @param string   $query    The query to execute.
219
-	 * @param callable $callback A callback function to apply to the row
220
-	 * @param array    $params   Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
221
-	 *
222
-	 * @return mixed A single database result object or the result of the callback function.
223
-	 * @throws \DatabaseException
224
-	 */
225
-	public function getDataRow($query, $callback = null, array $params = []) {
226
-		return $this->getResults($query, $callback, true, $params);
227
-	}
228
-
229
-	/**
230
-	 * Insert a row into the database.
231
-	 *
232
-	 * @note Altering the DB invalidates all queries in the query cache.
233
-	 *
234
-	 * @param string $query  The query to execute.
235
-	 * @param array  $params Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
236
-	 *
237
-	 * @return int|false The database id of the inserted row if a AUTO_INCREMENT field is
238
-	 *                   defined, 0 if not, and false on failure.
239
-	 * @throws \DatabaseException
240
-	 */
241
-	public function insertData($query, array $params = []) {
242
-
243
-		if ($this->logger) {
244
-			$this->logger->info("DB query $query");
245
-		}
246
-
247
-		$connection = $this->getConnection('write');
248
-
249
-		$this->invalidateQueryCache();
250
-
251
-		$this->executeQuery($query, $connection, $params);
252
-		return (int) $connection->lastInsertId();
253
-	}
254
-
255
-	/**
256
-	 * Update the database.
257
-	 *
258
-	 * @note Altering the DB invalidates all queries in the query cache.
259
-	 *
260
-	 * @note WARNING! update_data() has the 2nd and 3rd arguments reversed.
261
-	 *
262
-	 * @param string $query        The query to run.
263
-	 * @param bool   $get_num_rows Return the number of rows affected (default: false).
264
-	 * @param array  $params       Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
265
-	 *
266
-	 * @return bool|int
267
-	 * @throws \DatabaseException
268
-	 */
269
-	public function updateData($query, $get_num_rows = false, array $params = []) {
270
-
271
-		if ($this->logger) {
272
-			$this->logger->info("DB query $query");
273
-		}
274
-
275
-		$this->invalidateQueryCache();
276
-
277
-		$stmt = $this->executeQuery($query, $this->getConnection('write'), $params);
278
-		if ($get_num_rows) {
279
-			return $stmt->rowCount();
280
-		} else {
281
-			return true;
282
-		}
283
-	}
284
-
285
-	/**
286
-	 * Delete data from the database
287
-	 *
288
-	 * @note Altering the DB invalidates all queries in query cache.
289
-	 *
290
-	 * @param string $query  The SQL query to run
291
-	 * @param array  $params Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
292
-	 *
293
-	 * @return int The number of affected rows
294
-	 * @throws \DatabaseException
295
-	 */
296
-	public function deleteData($query, array $params = []) {
297
-
298
-		if ($this->logger) {
299
-			$this->logger->info("DB query $query");
300
-		}
301
-
302
-		$connection = $this->getConnection('write');
303
-
304
-		$this->invalidateQueryCache();
305
-
306
-		$stmt = $this->executeQuery("$query", $connection, $params);
307
-		return (int) $stmt->rowCount();
308
-	}
309
-
310
-	/**
311
-	 * Get a string that uniquely identifies a callback during the current request.
312
-	 *
313
-	 * This is used to cache queries whose results were transformed by the callback. If the callback involves
314
-	 * object method calls of the same class, different instances will return different values.
315
-	 *
316
-	 * @param callable $callback The callable value to fingerprint
317
-	 *
318
-	 * @return string A string that is unique for each callable passed in
319
-	 * @since 1.9.4
320
-	 * @access private
321
-	 * @todo Make this protected once we can setAccessible(true) via reflection
322
-	 */
323
-	public function fingerprintCallback($callback) {
324
-		if (is_string($callback)) {
325
-			return $callback;
326
-		}
327
-		if (is_object($callback)) {
328
-			return spl_object_hash($callback) . "::__invoke";
329
-		}
330
-		if (is_array($callback)) {
331
-			if (is_string($callback[0])) {
332
-				return "{$callback[0]}::{$callback[1]}";
333
-			}
334
-			return spl_object_hash($callback[0]) . "::{$callback[1]}";
335
-		}
336
-		// this should not happen
337
-		return "";
338
-	}
339
-
340
-	/**
341
-	 * Handles queries that return results, running the results through a
342
-	 * an optional callback function. This is for R queries (from CRUD).
343
-	 *
344
-	 * @param string $query    The select query to execute
345
-	 * @param string $callback An optional callback function to run on each row
346
-	 * @param bool   $single   Return only a single result?
347
-	 * @param array  $params   Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
348
-	 *
349
-	 * @return array An array of database result objects or callback function results. If the query
350
-	 *               returned nothing, an empty array.
351
-	 * @throws \DatabaseException
352
-	 */
353
-	protected function getResults($query, $callback = null, $single = false, array $params = []) {
354
-
355
-		// Since we want to cache results of running the callback, we need to
356
-		// need to namespace the query with the callback and single result request.
357
-		// https://github.com/elgg/elgg/issues/4049
358
-		$query_id = (int) $single . $query . '|';
359
-		if ($params) {
360
-			$query_id .= serialize($params) . '|';
361
-		}
362
-
363
-		if ($callback) {
364
-			if (!is_callable($callback)) {
365
-				throw new \RuntimeException('$callback must be a callable function. Given '
366
-											. _elgg_services()->handlers->describeCallable($callback));
367
-			}
368
-			$query_id .= $this->fingerprintCallback($callback);
369
-		}
370
-		// MD5 yields smaller mem usage for cache and cleaner logs
371
-		$hash = md5($query_id);
372
-
373
-		// Is cached?
374
-		if ($this->query_cache) {
375
-			if (isset($this->query_cache[$hash])) {
376
-				if ($this->logger) {
377
-					// TODO add params in $query here
378
-					$this->logger->info("DB query $query results returned from cache (hash: $hash)");
379
-				}
380
-				return $this->query_cache[$hash];
381
-			}
382
-		}
383
-
384
-		$return = [];
385
-
386
-		$stmt = $this->executeQuery($query, $this->getConnection('read'), $params);
387
-		while ($row = $stmt->fetch()) {
388
-			if ($callback) {
389
-				$row = call_user_func($callback, $row);
390
-			}
391
-
392
-			if ($single) {
393
-				$return = $row;
394
-				break;
395
-			} else {
396
-				$return[] = $row;
397
-			}
398
-		}
399
-
400
-		// Cache result
401
-		if ($this->query_cache) {
402
-			$this->query_cache[$hash] = $return;
403
-			if ($this->logger) {
404
-				// TODO add params in $query here
405
-				$this->logger->info("DB query $query results cached (hash: $hash)");
406
-			}
407
-		}
408
-
409
-		return $return;
410
-	}
411
-
412
-	/**
413
-	 * Execute a query.
414
-	 *
415
-	 * $query is executed via {@link Connection::query}. If there is an SQL error,
416
-	 * a {@link DatabaseException} is thrown.
417
-	 *
418
-	 * @param string     $query      The query
419
-	 * @param Connection $connection The DB connection
420
-	 * @param array      $params     Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
421
-	 *
422
-	 * @return Statement The result of the query
423
-	 * @throws \DatabaseException
424
-	 */
425
-	protected function executeQuery($query, Connection $connection, array $params = []) {
426
-		if ($query == null) {
427
-			throw new \DatabaseException("Query cannot be null");
428
-		}
429
-
430
-		$this->query_count++;
431
-
432
-		if ($this->timer) {
433
-			$timer_key = preg_replace('~\\s+~', ' ', trim($query . '|' . serialize($params)));
434
-			$this->timer->begin(['SQL', $timer_key]);
435
-		}
436
-
437
-		try {
438
-			if ($params) {
439
-				$value = $connection->executeQuery($query, $params);
440
-			} else {
441
-				// faster
442
-				$value = $connection->query($query);
443
-			}
444
-		} catch (\Exception $e) {
445
-			throw new \DatabaseException($e->getMessage() . "\n\n"
446
-			. "QUERY: $query \n\n"
447
-			. "PARAMS: " . print_r($params, true));
448
-		}
449
-
450
-		if ($this->timer) {
451
-			$this->timer->end(['SQL', $timer_key]);
452
-		}
453
-
454
-		return $value;
455
-	}
456
-
457
-	/**
458
-	 * Runs a full database script from disk.
459
-	 *
460
-	 * The file specified should be a standard SQL file as created by
461
-	 * mysqldump or similar.  Statements must be terminated with ;
462
-	 * and a newline character (\n or \r\n).
463
-	 *
464
-	 * The special string 'prefix_' is replaced with the database prefix
465
-	 * as defined in {@link $this->tablePrefix}.
466
-	 *
467
-	 * @warning Only single line comments are supported. A comment
468
-	 * must start with '-- ' or '# ', where the comment sign is at the
469
-	 * very beginning of each line.
470
-	 *
471
-	 * @warning Errors do not halt execution of the script.  If a line
472
-	 * generates an error, the error message is saved and the
473
-	 * next line is executed.  After the file is run, any errors
474
-	 * are displayed as a {@link DatabaseException}
475
-	 *
476
-	 * @param string $scriptlocation The full path to the script
477
-	 *
478
-	 * @return void
479
-	 * @throws \DatabaseException
480
-	 * @access private
481
-	 */
482
-	public function runSqlScript($scriptlocation) {
483
-		$script = file_get_contents($scriptlocation);
484
-		if ($script) {
485
-			$errors = [];
486
-
487
-			// Remove MySQL '-- ' and '# ' style comments
488
-			$script = preg_replace('/^(?:--|#) .*$/m', '', $script);
489
-
490
-			// Statements must end with ; and a newline
491
-			$sql_statements = preg_split('/;[\n\r]+/', "$script\n");
492
-
493
-			foreach ($sql_statements as $statement) {
494
-				$statement = trim($statement);
495
-				$statement = str_replace("prefix_", $this->table_prefix, $statement);
496
-				if (!empty($statement)) {
497
-					try {
498
-						$this->updateData($statement);
499
-					} catch (\DatabaseException $e) {
500
-						$errors[] = $e->getMessage();
501
-					}
502
-				}
503
-			}
504
-			if (!empty($errors)) {
505
-				$errortxt = "";
506
-				foreach ($errors as $error) {
507
-					$errortxt .= " {$error};";
508
-				}
509
-
510
-				$msg = "There were a number of issues: " . $errortxt;
511
-				throw new \DatabaseException($msg);
512
-			}
513
-		} else {
514
-			$msg = "Elgg couldn't find the requested database script at " . $scriptlocation . ".";
515
-			throw new \DatabaseException($msg);
516
-		}
517
-	}
518
-
519
-	/**
520
-	 * Queue a query for execution upon shutdown.
521
-	 *
522
-	 * You can specify a callback if you care about the result. This function will always
523
-	 * be passed a \Doctrine\DBAL\Driver\Statement.
524
-	 *
525
-	 * @param string   $query    The query to execute
526
-	 * @param string   $type     The query type ('read' or 'write')
527
-	 * @param callable $callback A callback function to pass the results array to
528
-	 * @param array    $params   Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
529
-	 *
530
-	 * @return boolean Whether registering was successful.
531
-	 * @access private
532
-	 */
533
-	public function registerDelayedQuery($query, $type, $callback = null, array $params = []) {
534
-		if ($type != 'read' && $type != 'write') {
535
-			return false;
536
-		}
537
-
538
-		$this->delayed_queries[] = [
539
-			self::DELAYED_QUERY => $query,
540
-			self::DELAYED_TYPE => $type,
541
-			self::DELAYED_HANDLER => $callback,
542
-			self::DELAYED_PARAMS => $params,
543
-		];
544
-
545
-		return true;
546
-	}
547
-
548
-	/**
549
-	 * Trigger all queries that were registered as "delayed" queries. This is
550
-	 * called by the system automatically on shutdown.
551
-	 *
552
-	 * @return void
553
-	 * @access private
554
-	 * @todo make protected once this class is part of public API
555
-	 */
556
-	public function executeDelayedQueries() {
557
-
558
-		foreach ($this->delayed_queries as $set) {
559
-			$query = $set[self::DELAYED_QUERY];
560
-			$type = $set[self::DELAYED_TYPE];
561
-			$handler = $set[self::DELAYED_HANDLER];
562
-			$params = $set[self::DELAYED_PARAMS];
563
-
564
-			try {
565
-				$stmt = $this->executeQuery($query, $this->getConnection($type), $params);
566
-
567
-				if (is_callable($handler)) {
568
-					call_user_func($handler, $stmt);
569
-				}
570
-			} catch (\Exception $e) {
571
-				if ($this->logger) {
572
-					// Suppress all exceptions since page already sent to requestor
573
-					$this->logger->error($e);
574
-				}
575
-			}
576
-		}
577
-	}
578
-
579
-	/**
580
-	 * Enable the query cache
581
-	 *
582
-	 * This does not take precedence over the \Elgg\Database\Config setting.
583
-	 *
584
-	 * @return void
585
-	 * @access private
586
-	 */
587
-	public function enableQueryCache() {
588
-		if ($this->config->isQueryCacheEnabled() && $this->query_cache === null) {
589
-			// @todo if we keep this cache, expose the size as a config parameter
590
-			$this->query_cache = new \Elgg\Cache\LRUCache($this->query_cache_size);
591
-		}
592
-	}
593
-
594
-	/**
595
-	 * Disable the query cache
596
-	 *
597
-	 * This is useful for special scripts that pull large amounts of data back
598
-	 * in single queries.
599
-	 *
600
-	 * @return void
601
-	 * @access private
602
-	 */
603
-	public function disableQueryCache() {
604
-		$this->query_cache = null;
605
-	}
606
-
607
-	/**
608
-	 * Invalidate the query cache
609
-	 *
610
-	 * @return void
611
-	 */
612
-	protected function invalidateQueryCache() {
613
-		if ($this->query_cache) {
614
-			$this->query_cache->clear();
615
-			if ($this->logger) {
616
-				$this->logger->info("Query cache invalidated");
617
-			}
618
-		}
619
-	}
620
-
621
-	/**
622
-	 * Test that the Elgg database is installed
623
-	 *
624
-	 * @return void
625
-	 * @throws \InstallationException
626
-	 * @access private
627
-	 */
628
-	public function assertInstalled() {
629
-
630
-		if ($this->installed) {
631
-			return;
632
-		}
633
-
634
-		try {
635
-			$sql = "SELECT value FROM {$this->table_prefix}config WHERE name = 'installed'";
636
-			$this->getConnection('read')->query($sql);
637
-		} catch (\DatabaseException $e) {
638
-			throw new \InstallationException("Unable to handle this request. This site is not "
639
-				. "configured or the database is down.");
640
-		}
641
-
642
-		$this->installed = true;
643
-	}
644
-
645
-	/**
646
-	 * Get the number of queries made to the database
647
-	 *
648
-	 * @return int
649
-	 * @access private
650
-	 */
651
-	public function getQueryCount() {
652
-		return $this->query_count;
653
-	}
654
-
655
-	/**
656
-	 * Sanitizes an integer value for use in a query
657
-	 *
658
-	 * @param int  $value  Value to sanitize
659
-	 * @param bool $signed Whether negative values are allowed (default: true)
660
-	 * @return int
661
-	 * @deprecated Use query parameters where possible
662
-	 */
663
-	public function sanitizeInt($value, $signed = true) {
664
-		$value = (int) $value;
665
-
666
-		if ($signed === false) {
667
-			if ($value < 0) {
668
-				$value = 0;
669
-			}
670
-		}
671
-
672
-		return $value;
673
-	}
674
-
675
-	/**
676
-	 * Sanitizes a string for use in a query
677
-	 *
678
-	 * @param string $value Value to escape
679
-	 * @return string
680
-	 * @throws \DatabaseException
681
-	 * @deprecated Use query parameters where possible
682
-	 */
683
-	public function sanitizeString($value) {
684
-		$quoted = $this->getConnection('read')->quote($value);
685
-		if ($quoted[0] !== "'" || substr($quoted, -1) !== "'") {
686
-			throw new \DatabaseException("PDO::quote did not return surrounding single quotes.");
687
-		}
688
-		return substr($quoted, 1, -1);
689
-	}
690
-
691
-	/**
692
-	 * Get the server version number
693
-	 *
694
-	 * @param string $type Connection type (Config constants, e.g. Config::READ_WRITE)
695
-	 *
696
-	 * @return string Empty if version cannot be determined
697
-	 * @access private
698
-	 */
699
-	public function getServerVersion($type) {
700
-		$driver = $this->getConnection($type)->getWrappedConnection();
701
-		if ($driver instanceof ServerInfoAwareConnection) {
702
-			return $driver->getServerVersion();
703
-		}
704
-
705
-		return null;
706
-	}
707
-
708
-	/**
709
-	 * Handle magic property reads
710
-	 *
711
-	 * @param string $name Property name
712
-	 * @return mixed
713
-	 */
714
-	public function __get($name) {
715
-		if ($name === 'prefix') {
716
-			return $this->table_prefix;
717
-		}
718
-
719
-		throw new \RuntimeException("Cannot read property '$name'");
720
-	}
721
-
722
-	/**
723
-	 * Handle magic property writes
724
-	 *
725
-	 * @param string $name  Property name
726
-	 * @param mixed  $value Value
727
-	 * @return void
728
-	 */
729
-	public function __set($name, $value) {
730
-		throw new \RuntimeException("Cannot write property '$name'");
731
-	}
18
+    use Profilable;
19
+
20
+    const DELAYED_QUERY = 'q';
21
+    const DELAYED_TYPE = 't';
22
+    const DELAYED_HANDLER = 'h';
23
+    const DELAYED_PARAMS = 'p';
24
+
25
+    /**
26
+     * @var string $table_prefix Prefix for database tables
27
+     */
28
+    private $table_prefix;
29
+
30
+    /**
31
+     * @var Connection[]
32
+     */
33
+    private $connections = [];
34
+
35
+    /**
36
+     * @var int $query_count The number of queries made
37
+     */
38
+    private $query_count = 0;
39
+
40
+    /**
41
+     * Query cache for select queries.
42
+     *
43
+     * Queries and their results are stored in this cache as:
44
+     * <code>
45
+     * $DB_QUERY_CACHE[query hash] => array(result1, result2, ... resultN)
46
+     * </code>
47
+     * @see \Elgg\Database::getResults() for details on the hash.
48
+     *
49
+     * @var \Elgg\Cache\LRUCache $query_cache The cache
50
+     */
51
+    private $query_cache = null;
52
+
53
+    /**
54
+     * @var int $query_cache_size The number of queries to cache
55
+     */
56
+    private $query_cache_size = 50;
57
+
58
+    /**
59
+     * Queries are saved as an array with the DELAYED_* constants as keys.
60
+     *
61
+     * @see registerDelayedQuery
62
+     *
63
+     * @var array $delayed_queries Queries to be run during shutdown
64
+     */
65
+    private $delayed_queries = [];
66
+
67
+    /**
68
+     * @var bool $installed Is the database installed?
69
+     */
70
+    private $installed = false;
71
+
72
+    /**
73
+     * @var \Elgg\Database\Config $config Database configuration
74
+     */
75
+    private $config;
76
+
77
+    /**
78
+     * @var \Elgg\Logger $logger The logger
79
+     */
80
+    private $logger;
81
+
82
+    /**
83
+     * Constructor
84
+     *
85
+     * @param \Elgg\Database\Config $config Database configuration
86
+     * @param \Elgg\Logger          $logger The logger
87
+     */
88
+    public function __construct(\Elgg\Database\Config $config, \Elgg\Logger $logger = null) {
89
+
90
+        $this->logger = $logger;
91
+        $this->config = $config;
92
+
93
+        $this->table_prefix = $config->getTablePrefix();
94
+
95
+        $this->enableQueryCache();
96
+    }
97
+
98
+    /**
99
+     * Set the logger object
100
+     *
101
+     * @param Logger $logger The logger
102
+     * @return void
103
+     * @access private
104
+     */
105
+    public function setLogger(Logger $logger) {
106
+        $this->logger = $logger;
107
+    }
108
+
109
+    /**
110
+     * Gets (if required, also creates) a DB connection.
111
+     *
112
+     * @param string $type The type of link we want: "read", "write" or "readwrite".
113
+     *
114
+     * @return Connection
115
+     * @throws \DatabaseException
116
+     */
117
+    protected function getConnection($type) {
118
+        if (isset($this->connections[$type])) {
119
+            return $this->connections[$type];
120
+        } else if (isset($this->connections['readwrite'])) {
121
+            return $this->connections['readwrite'];
122
+        } else {
123
+            $this->setupConnections();
124
+            return $this->getConnection($type);
125
+        }
126
+    }
127
+
128
+    /**
129
+     * Establish database connections
130
+     *
131
+     * If the configuration has been set up for multiple read/write databases, set those
132
+     * links up separately; otherwise just create the one database link.
133
+     *
134
+     * @return void
135
+     * @throws \DatabaseException
136
+     * @access private
137
+     */
138
+    public function setupConnections() {
139
+        if ($this->config->isDatabaseSplit()) {
140
+            $this->connect('read');
141
+            $this->connect('write');
142
+        } else {
143
+            $this->connect('readwrite');
144
+        }
145
+    }
146
+
147
+    /**
148
+     * Establish a connection to the database server
149
+     *
150
+     * Connect to the database server and use the Elgg database for a particular database link
151
+     *
152
+     * @param string $type The type of database connection. "read", "write", or "readwrite".
153
+     *
154
+     * @return void
155
+     * @throws \DatabaseException
156
+     * @access private
157
+     */
158
+    public function connect($type = "readwrite") {
159
+        $conf = $this->config->getConnectionConfig($type);
160
+
161
+        $params = [
162
+            'dbname' => $conf['database'],
163
+            'user' => $conf['user'],
164
+            'password' => $conf['password'],
165
+            'host' => $conf['host'],
166
+            'charset' => $conf['encoding'],
167
+            'driver' => 'pdo_mysql',
168
+        ];
169
+
170
+        try {
171
+            $this->connections[$type] = DriverManager::getConnection($params);
172
+            $this->connections[$type]->setFetchMode(\PDO::FETCH_OBJ);
173
+
174
+            // https://github.com/Elgg/Elgg/issues/8121
175
+            $sub_query = "SELECT REPLACE(@@SESSION.sql_mode, 'ONLY_FULL_GROUP_BY', '')";
176
+            $this->connections[$type]->exec("SET SESSION sql_mode=($sub_query);");
177
+        } catch (\Exception $e) {
178
+            // @todo just allow PDO exceptions
179
+            // http://dev.mysql.com/doc/refman/5.1/en/error-messages-server.html
180
+            if ($e instanceof \PDOException && ($e->getCode() == 1102 || $e->getCode() == 1049)) {
181
+                $msg = "Elgg couldn't select the database '{$conf['database']}'. "
182
+                    . "Please check that the database is created and you have access to it.";
183
+            } else {
184
+                $msg = "Elgg couldn't connect to the database using the given credentials. Check the settings file.";
185
+            }
186
+            throw new \DatabaseException($msg);
187
+        }
188
+    }
189
+
190
+    /**
191
+     * Retrieve rows from the database.
192
+     *
193
+     * Queries are executed with {@link \Elgg\Database::executeQuery()} and results
194
+     * are retrieved with {@link \PDO::fetchObject()}.  If a callback
195
+     * function $callback is defined, each row will be passed as a single
196
+     * argument to $callback.  If no callback function is defined, the
197
+     * entire result set is returned as an array.
198
+     *
199
+     * @param string   $query    The query being passed.
200
+     * @param callable $callback Optionally, the name of a function to call back to on each row
201
+     * @param array    $params   Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
202
+     *
203
+     * @return array An array of database result objects or callback function results. If the query
204
+     *               returned nothing, an empty array.
205
+     * @throws \DatabaseException
206
+     */
207
+    public function getData($query, $callback = null, array $params = []) {
208
+        return $this->getResults($query, $callback, false, $params);
209
+    }
210
+
211
+    /**
212
+     * Retrieve a single row from the database.
213
+     *
214
+     * Similar to {@link \Elgg\Database::getData()} but returns only the first row
215
+     * matched.  If a callback function $callback is specified, the row will be passed
216
+     * as the only argument to $callback.
217
+     *
218
+     * @param string   $query    The query to execute.
219
+     * @param callable $callback A callback function to apply to the row
220
+     * @param array    $params   Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
221
+     *
222
+     * @return mixed A single database result object or the result of the callback function.
223
+     * @throws \DatabaseException
224
+     */
225
+    public function getDataRow($query, $callback = null, array $params = []) {
226
+        return $this->getResults($query, $callback, true, $params);
227
+    }
228
+
229
+    /**
230
+     * Insert a row into the database.
231
+     *
232
+     * @note Altering the DB invalidates all queries in the query cache.
233
+     *
234
+     * @param string $query  The query to execute.
235
+     * @param array  $params Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
236
+     *
237
+     * @return int|false The database id of the inserted row if a AUTO_INCREMENT field is
238
+     *                   defined, 0 if not, and false on failure.
239
+     * @throws \DatabaseException
240
+     */
241
+    public function insertData($query, array $params = []) {
242
+
243
+        if ($this->logger) {
244
+            $this->logger->info("DB query $query");
245
+        }
246
+
247
+        $connection = $this->getConnection('write');
248
+
249
+        $this->invalidateQueryCache();
250
+
251
+        $this->executeQuery($query, $connection, $params);
252
+        return (int) $connection->lastInsertId();
253
+    }
254
+
255
+    /**
256
+     * Update the database.
257
+     *
258
+     * @note Altering the DB invalidates all queries in the query cache.
259
+     *
260
+     * @note WARNING! update_data() has the 2nd and 3rd arguments reversed.
261
+     *
262
+     * @param string $query        The query to run.
263
+     * @param bool   $get_num_rows Return the number of rows affected (default: false).
264
+     * @param array  $params       Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
265
+     *
266
+     * @return bool|int
267
+     * @throws \DatabaseException
268
+     */
269
+    public function updateData($query, $get_num_rows = false, array $params = []) {
270
+
271
+        if ($this->logger) {
272
+            $this->logger->info("DB query $query");
273
+        }
274
+
275
+        $this->invalidateQueryCache();
276
+
277
+        $stmt = $this->executeQuery($query, $this->getConnection('write'), $params);
278
+        if ($get_num_rows) {
279
+            return $stmt->rowCount();
280
+        } else {
281
+            return true;
282
+        }
283
+    }
284
+
285
+    /**
286
+     * Delete data from the database
287
+     *
288
+     * @note Altering the DB invalidates all queries in query cache.
289
+     *
290
+     * @param string $query  The SQL query to run
291
+     * @param array  $params Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
292
+     *
293
+     * @return int The number of affected rows
294
+     * @throws \DatabaseException
295
+     */
296
+    public function deleteData($query, array $params = []) {
297
+
298
+        if ($this->logger) {
299
+            $this->logger->info("DB query $query");
300
+        }
301
+
302
+        $connection = $this->getConnection('write');
303
+
304
+        $this->invalidateQueryCache();
305
+
306
+        $stmt = $this->executeQuery("$query", $connection, $params);
307
+        return (int) $stmt->rowCount();
308
+    }
309
+
310
+    /**
311
+     * Get a string that uniquely identifies a callback during the current request.
312
+     *
313
+     * This is used to cache queries whose results were transformed by the callback. If the callback involves
314
+     * object method calls of the same class, different instances will return different values.
315
+     *
316
+     * @param callable $callback The callable value to fingerprint
317
+     *
318
+     * @return string A string that is unique for each callable passed in
319
+     * @since 1.9.4
320
+     * @access private
321
+     * @todo Make this protected once we can setAccessible(true) via reflection
322
+     */
323
+    public function fingerprintCallback($callback) {
324
+        if (is_string($callback)) {
325
+            return $callback;
326
+        }
327
+        if (is_object($callback)) {
328
+            return spl_object_hash($callback) . "::__invoke";
329
+        }
330
+        if (is_array($callback)) {
331
+            if (is_string($callback[0])) {
332
+                return "{$callback[0]}::{$callback[1]}";
333
+            }
334
+            return spl_object_hash($callback[0]) . "::{$callback[1]}";
335
+        }
336
+        // this should not happen
337
+        return "";
338
+    }
339
+
340
+    /**
341
+     * Handles queries that return results, running the results through a
342
+     * an optional callback function. This is for R queries (from CRUD).
343
+     *
344
+     * @param string $query    The select query to execute
345
+     * @param string $callback An optional callback function to run on each row
346
+     * @param bool   $single   Return only a single result?
347
+     * @param array  $params   Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
348
+     *
349
+     * @return array An array of database result objects or callback function results. If the query
350
+     *               returned nothing, an empty array.
351
+     * @throws \DatabaseException
352
+     */
353
+    protected function getResults($query, $callback = null, $single = false, array $params = []) {
354
+
355
+        // Since we want to cache results of running the callback, we need to
356
+        // need to namespace the query with the callback and single result request.
357
+        // https://github.com/elgg/elgg/issues/4049
358
+        $query_id = (int) $single . $query . '|';
359
+        if ($params) {
360
+            $query_id .= serialize($params) . '|';
361
+        }
362
+
363
+        if ($callback) {
364
+            if (!is_callable($callback)) {
365
+                throw new \RuntimeException('$callback must be a callable function. Given '
366
+                                            . _elgg_services()->handlers->describeCallable($callback));
367
+            }
368
+            $query_id .= $this->fingerprintCallback($callback);
369
+        }
370
+        // MD5 yields smaller mem usage for cache and cleaner logs
371
+        $hash = md5($query_id);
372
+
373
+        // Is cached?
374
+        if ($this->query_cache) {
375
+            if (isset($this->query_cache[$hash])) {
376
+                if ($this->logger) {
377
+                    // TODO add params in $query here
378
+                    $this->logger->info("DB query $query results returned from cache (hash: $hash)");
379
+                }
380
+                return $this->query_cache[$hash];
381
+            }
382
+        }
383
+
384
+        $return = [];
385
+
386
+        $stmt = $this->executeQuery($query, $this->getConnection('read'), $params);
387
+        while ($row = $stmt->fetch()) {
388
+            if ($callback) {
389
+                $row = call_user_func($callback, $row);
390
+            }
391
+
392
+            if ($single) {
393
+                $return = $row;
394
+                break;
395
+            } else {
396
+                $return[] = $row;
397
+            }
398
+        }
399
+
400
+        // Cache result
401
+        if ($this->query_cache) {
402
+            $this->query_cache[$hash] = $return;
403
+            if ($this->logger) {
404
+                // TODO add params in $query here
405
+                $this->logger->info("DB query $query results cached (hash: $hash)");
406
+            }
407
+        }
408
+
409
+        return $return;
410
+    }
411
+
412
+    /**
413
+     * Execute a query.
414
+     *
415
+     * $query is executed via {@link Connection::query}. If there is an SQL error,
416
+     * a {@link DatabaseException} is thrown.
417
+     *
418
+     * @param string     $query      The query
419
+     * @param Connection $connection The DB connection
420
+     * @param array      $params     Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
421
+     *
422
+     * @return Statement The result of the query
423
+     * @throws \DatabaseException
424
+     */
425
+    protected function executeQuery($query, Connection $connection, array $params = []) {
426
+        if ($query == null) {
427
+            throw new \DatabaseException("Query cannot be null");
428
+        }
429
+
430
+        $this->query_count++;
431
+
432
+        if ($this->timer) {
433
+            $timer_key = preg_replace('~\\s+~', ' ', trim($query . '|' . serialize($params)));
434
+            $this->timer->begin(['SQL', $timer_key]);
435
+        }
436
+
437
+        try {
438
+            if ($params) {
439
+                $value = $connection->executeQuery($query, $params);
440
+            } else {
441
+                // faster
442
+                $value = $connection->query($query);
443
+            }
444
+        } catch (\Exception $e) {
445
+            throw new \DatabaseException($e->getMessage() . "\n\n"
446
+            . "QUERY: $query \n\n"
447
+            . "PARAMS: " . print_r($params, true));
448
+        }
449
+
450
+        if ($this->timer) {
451
+            $this->timer->end(['SQL', $timer_key]);
452
+        }
453
+
454
+        return $value;
455
+    }
456
+
457
+    /**
458
+     * Runs a full database script from disk.
459
+     *
460
+     * The file specified should be a standard SQL file as created by
461
+     * mysqldump or similar.  Statements must be terminated with ;
462
+     * and a newline character (\n or \r\n).
463
+     *
464
+     * The special string 'prefix_' is replaced with the database prefix
465
+     * as defined in {@link $this->tablePrefix}.
466
+     *
467
+     * @warning Only single line comments are supported. A comment
468
+     * must start with '-- ' or '# ', where the comment sign is at the
469
+     * very beginning of each line.
470
+     *
471
+     * @warning Errors do not halt execution of the script.  If a line
472
+     * generates an error, the error message is saved and the
473
+     * next line is executed.  After the file is run, any errors
474
+     * are displayed as a {@link DatabaseException}
475
+     *
476
+     * @param string $scriptlocation The full path to the script
477
+     *
478
+     * @return void
479
+     * @throws \DatabaseException
480
+     * @access private
481
+     */
482
+    public function runSqlScript($scriptlocation) {
483
+        $script = file_get_contents($scriptlocation);
484
+        if ($script) {
485
+            $errors = [];
486
+
487
+            // Remove MySQL '-- ' and '# ' style comments
488
+            $script = preg_replace('/^(?:--|#) .*$/m', '', $script);
489
+
490
+            // Statements must end with ; and a newline
491
+            $sql_statements = preg_split('/;[\n\r]+/', "$script\n");
492
+
493
+            foreach ($sql_statements as $statement) {
494
+                $statement = trim($statement);
495
+                $statement = str_replace("prefix_", $this->table_prefix, $statement);
496
+                if (!empty($statement)) {
497
+                    try {
498
+                        $this->updateData($statement);
499
+                    } catch (\DatabaseException $e) {
500
+                        $errors[] = $e->getMessage();
501
+                    }
502
+                }
503
+            }
504
+            if (!empty($errors)) {
505
+                $errortxt = "";
506
+                foreach ($errors as $error) {
507
+                    $errortxt .= " {$error};";
508
+                }
509
+
510
+                $msg = "There were a number of issues: " . $errortxt;
511
+                throw new \DatabaseException($msg);
512
+            }
513
+        } else {
514
+            $msg = "Elgg couldn't find the requested database script at " . $scriptlocation . ".";
515
+            throw new \DatabaseException($msg);
516
+        }
517
+    }
518
+
519
+    /**
520
+     * Queue a query for execution upon shutdown.
521
+     *
522
+     * You can specify a callback if you care about the result. This function will always
523
+     * be passed a \Doctrine\DBAL\Driver\Statement.
524
+     *
525
+     * @param string   $query    The query to execute
526
+     * @param string   $type     The query type ('read' or 'write')
527
+     * @param callable $callback A callback function to pass the results array to
528
+     * @param array    $params   Query params. E.g. [1, 'steve'] or [':id' => 1, ':name' => 'steve']
529
+     *
530
+     * @return boolean Whether registering was successful.
531
+     * @access private
532
+     */
533
+    public function registerDelayedQuery($query, $type, $callback = null, array $params = []) {
534
+        if ($type != 'read' && $type != 'write') {
535
+            return false;
536
+        }
537
+
538
+        $this->delayed_queries[] = [
539
+            self::DELAYED_QUERY => $query,
540
+            self::DELAYED_TYPE => $type,
541
+            self::DELAYED_HANDLER => $callback,
542
+            self::DELAYED_PARAMS => $params,
543
+        ];
544
+
545
+        return true;
546
+    }
547
+
548
+    /**
549
+     * Trigger all queries that were registered as "delayed" queries. This is
550
+     * called by the system automatically on shutdown.
551
+     *
552
+     * @return void
553
+     * @access private
554
+     * @todo make protected once this class is part of public API
555
+     */
556
+    public function executeDelayedQueries() {
557
+
558
+        foreach ($this->delayed_queries as $set) {
559
+            $query = $set[self::DELAYED_QUERY];
560
+            $type = $set[self::DELAYED_TYPE];
561
+            $handler = $set[self::DELAYED_HANDLER];
562
+            $params = $set[self::DELAYED_PARAMS];
563
+
564
+            try {
565
+                $stmt = $this->executeQuery($query, $this->getConnection($type), $params);
566
+
567
+                if (is_callable($handler)) {
568
+                    call_user_func($handler, $stmt);
569
+                }
570
+            } catch (\Exception $e) {
571
+                if ($this->logger) {
572
+                    // Suppress all exceptions since page already sent to requestor
573
+                    $this->logger->error($e);
574
+                }
575
+            }
576
+        }
577
+    }
578
+
579
+    /**
580
+     * Enable the query cache
581
+     *
582
+     * This does not take precedence over the \Elgg\Database\Config setting.
583
+     *
584
+     * @return void
585
+     * @access private
586
+     */
587
+    public function enableQueryCache() {
588
+        if ($this->config->isQueryCacheEnabled() && $this->query_cache === null) {
589
+            // @todo if we keep this cache, expose the size as a config parameter
590
+            $this->query_cache = new \Elgg\Cache\LRUCache($this->query_cache_size);
591
+        }
592
+    }
593
+
594
+    /**
595
+     * Disable the query cache
596
+     *
597
+     * This is useful for special scripts that pull large amounts of data back
598
+     * in single queries.
599
+     *
600
+     * @return void
601
+     * @access private
602
+     */
603
+    public function disableQueryCache() {
604
+        $this->query_cache = null;
605
+    }
606
+
607
+    /**
608
+     * Invalidate the query cache
609
+     *
610
+     * @return void
611
+     */
612
+    protected function invalidateQueryCache() {
613
+        if ($this->query_cache) {
614
+            $this->query_cache->clear();
615
+            if ($this->logger) {
616
+                $this->logger->info("Query cache invalidated");
617
+            }
618
+        }
619
+    }
620
+
621
+    /**
622
+     * Test that the Elgg database is installed
623
+     *
624
+     * @return void
625
+     * @throws \InstallationException
626
+     * @access private
627
+     */
628
+    public function assertInstalled() {
629
+
630
+        if ($this->installed) {
631
+            return;
632
+        }
633
+
634
+        try {
635
+            $sql = "SELECT value FROM {$this->table_prefix}config WHERE name = 'installed'";
636
+            $this->getConnection('read')->query($sql);
637
+        } catch (\DatabaseException $e) {
638
+            throw new \InstallationException("Unable to handle this request. This site is not "
639
+                . "configured or the database is down.");
640
+        }
641
+
642
+        $this->installed = true;
643
+    }
644
+
645
+    /**
646
+     * Get the number of queries made to the database
647
+     *
648
+     * @return int
649
+     * @access private
650
+     */
651
+    public function getQueryCount() {
652
+        return $this->query_count;
653
+    }
654
+
655
+    /**
656
+     * Sanitizes an integer value for use in a query
657
+     *
658
+     * @param int  $value  Value to sanitize
659
+     * @param bool $signed Whether negative values are allowed (default: true)
660
+     * @return int
661
+     * @deprecated Use query parameters where possible
662
+     */
663
+    public function sanitizeInt($value, $signed = true) {
664
+        $value = (int) $value;
665
+
666
+        if ($signed === false) {
667
+            if ($value < 0) {
668
+                $value = 0;
669
+            }
670
+        }
671
+
672
+        return $value;
673
+    }
674
+
675
+    /**
676
+     * Sanitizes a string for use in a query
677
+     *
678
+     * @param string $value Value to escape
679
+     * @return string
680
+     * @throws \DatabaseException
681
+     * @deprecated Use query parameters where possible
682
+     */
683
+    public function sanitizeString($value) {
684
+        $quoted = $this->getConnection('read')->quote($value);
685
+        if ($quoted[0] !== "'" || substr($quoted, -1) !== "'") {
686
+            throw new \DatabaseException("PDO::quote did not return surrounding single quotes.");
687
+        }
688
+        return substr($quoted, 1, -1);
689
+    }
690
+
691
+    /**
692
+     * Get the server version number
693
+     *
694
+     * @param string $type Connection type (Config constants, e.g. Config::READ_WRITE)
695
+     *
696
+     * @return string Empty if version cannot be determined
697
+     * @access private
698
+     */
699
+    public function getServerVersion($type) {
700
+        $driver = $this->getConnection($type)->getWrappedConnection();
701
+        if ($driver instanceof ServerInfoAwareConnection) {
702
+            return $driver->getServerVersion();
703
+        }
704
+
705
+        return null;
706
+    }
707
+
708
+    /**
709
+     * Handle magic property reads
710
+     *
711
+     * @param string $name Property name
712
+     * @return mixed
713
+     */
714
+    public function __get($name) {
715
+        if ($name === 'prefix') {
716
+            return $this->table_prefix;
717
+        }
718
+
719
+        throw new \RuntimeException("Cannot read property '$name'");
720
+    }
721
+
722
+    /**
723
+     * Handle magic property writes
724
+     *
725
+     * @param string $name  Property name
726
+     * @param mixed  $value Value
727
+     * @return void
728
+     */
729
+    public function __set($name, $value) {
730
+        throw new \RuntimeException("Cannot write property '$name'");
731
+    }
732 732
 }
Please login to merge, or discard this patch.
engine/classes/ElggInstaller.php 1 patch
Indentation   +1578 added lines, -1578 removed lines patch added patch discarded remove patch
@@ -31,1612 +31,1612 @@
 block discarded – undo
31 31
  */
32 32
 class ElggInstaller {
33 33
 	
34
-	protected $steps = [
35
-		'welcome',
36
-		'requirements',
37
-		'database',
38
-		'settings',
39
-		'admin',
40
-		'complete',
41
-		];
42
-
43
-	protected $status = [
44
-		'config' => false,
45
-		'database' => false,
46
-		'settings' => false,
47
-		'admin' => false,
48
-	];
49
-
50
-	protected $isAction = false;
51
-
52
-	protected $autoLogin = true;
53
-
54
-	private $view_path = '';
55
-
56
-	/**
57
-	 * Global Elgg configuration
58
-	 *
59
-	 * @var \stdClass
60
-	 */
61
-	private $CONFIG;
62
-
63
-	/**
64
-	 * Constructor bootstraps the Elgg engine
65
-	 */
66
-	public function __construct() {
67
-		global $CONFIG;
68
-		if (!isset($CONFIG)) {
69
-			$CONFIG = new stdClass;
70
-		}
34
+    protected $steps = [
35
+        'welcome',
36
+        'requirements',
37
+        'database',
38
+        'settings',
39
+        'admin',
40
+        'complete',
41
+        ];
42
+
43
+    protected $status = [
44
+        'config' => false,
45
+        'database' => false,
46
+        'settings' => false,
47
+        'admin' => false,
48
+    ];
49
+
50
+    protected $isAction = false;
51
+
52
+    protected $autoLogin = true;
53
+
54
+    private $view_path = '';
55
+
56
+    /**
57
+     * Global Elgg configuration
58
+     *
59
+     * @var \stdClass
60
+     */
61
+    private $CONFIG;
62
+
63
+    /**
64
+     * Constructor bootstraps the Elgg engine
65
+     */
66
+    public function __construct() {
67
+        global $CONFIG;
68
+        if (!isset($CONFIG)) {
69
+            $CONFIG = new stdClass;
70
+        }
71 71
 		
72
-		global $_ELGG;
73
-		if (!isset($_ELGG)) {
74
-			$_ELGG = new stdClass;
75
-		}
72
+        global $_ELGG;
73
+        if (!isset($_ELGG)) {
74
+            $_ELGG = new stdClass;
75
+        }
76 76
 
77
-		$this->CONFIG = $CONFIG;
77
+        $this->CONFIG = $CONFIG;
78 78
 
79
-		$this->isAction = isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST';
79
+        $this->isAction = isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST';
80 80
 
81
-		$this->bootstrapConfig();
81
+        $this->bootstrapConfig();
82 82
 
83
-		$this->bootstrapEngine();
83
+        $this->bootstrapEngine();
84 84
 
85
-		_elgg_services()->views->view_path = $this->view_path;
85
+        _elgg_services()->views->view_path = $this->view_path;
86 86
 		
87
-		_elgg_services()->setValue('session', \ElggSession::getMock());
87
+        _elgg_services()->setValue('session', \ElggSession::getMock());
88 88
 
89
-		elgg_set_viewtype('installation');
89
+        elgg_set_viewtype('installation');
90 90
 
91
-		set_error_handler('_elgg_php_error_handler');
92
-		set_exception_handler('_elgg_php_exception_handler');
91
+        set_error_handler('_elgg_php_error_handler');
92
+        set_exception_handler('_elgg_php_exception_handler');
93 93
 
94
-		_elgg_services()->config->set('simplecache_enabled', false);
95
-		_elgg_services()->translator->registerTranslations(\Elgg\Application::elggDir()->getPath("/install/languages/"), true);
96
-		_elgg_services()->views->registerPluginViews(\Elgg\Application::elggDir()->getPath("/"));
97
-	}
94
+        _elgg_services()->config->set('simplecache_enabled', false);
95
+        _elgg_services()->translator->registerTranslations(\Elgg\Application::elggDir()->getPath("/install/languages/"), true);
96
+        _elgg_services()->views->registerPluginViews(\Elgg\Application::elggDir()->getPath("/"));
97
+    }
98 98
 	
99
-	/**
100
-	 * Dispatches a request to one of the step controllers
101
-	 *
102
-	 * @param string $step The installation step to run
103
-	 *
104
-	 * @return void
105
-	 * @throws InstallationException
106
-	 */
107
-	public function run($step) {
108
-		global $CONFIG;
99
+    /**
100
+     * Dispatches a request to one of the step controllers
101
+     *
102
+     * @param string $step The installation step to run
103
+     *
104
+     * @return void
105
+     * @throws InstallationException
106
+     */
107
+    public function run($step) {
108
+        global $CONFIG;
109 109
 		
110
-		// language needs to be set before the first call to elgg_echo()
111
-		$CONFIG->language = 'en';
110
+        // language needs to be set before the first call to elgg_echo()
111
+        $CONFIG->language = 'en';
112 112
 
113
-		// check if this is a URL rewrite test coming in
114
-		$this->processRewriteTest();
113
+        // check if this is a URL rewrite test coming in
114
+        $this->processRewriteTest();
115 115
 
116
-		if (!in_array($step, $this->getSteps())) {
117
-			$msg = _elgg_services()->translator->translate('InstallationException:UnknownStep', [$step]);
118
-			throw new InstallationException($msg);
119
-		}
116
+        if (!in_array($step, $this->getSteps())) {
117
+            $msg = _elgg_services()->translator->translate('InstallationException:UnknownStep', [$step]);
118
+            throw new InstallationException($msg);
119
+        }
120 120
 
121
-		$this->setInstallStatus();
121
+        $this->setInstallStatus();
122 122
 	
123
-		$this->checkInstallCompletion($step);
124
-
125
-		// check if this is an install being resumed
126
-		$this->resumeInstall($step);
127
-
128
-		$this->finishBootstrapping($step);
129
-
130
-		$params = $this->getPostVariables();
131
-
132
-		$this->$step($params);
133
-	}
134
-
135
-	/**
136
-	 * Set the auto login flag
137
-	 *
138
-	 * @param bool $flag Auto login
139
-	 *
140
-	 * @return void
141
-	 */
142
-	public function setAutoLogin($flag) {
143
-		$this->autoLogin = (bool) $flag;
144
-	}
145
-
146
-	/**
147
-	 * A batch install of Elgg
148
-	 *
149
-	 * All required parameters must be passed in as an associative array. See
150
-	 * $requiredParams for a list of them. This creates the necessary files,
151
-	 * loads the database, configures the site settings, and creates the admin
152
-	 * account. If it fails, an exception is thrown. It does not check any of
153
-	 * the requirements as the multiple step web installer does.
154
-	 *
155
-	 * If the settings.php file exists, it will use that rather than the parameters
156
-	 * passed to this function.
157
-	 *
158
-	 * @param array $params         Array of key value pairs
159
-	 * @param bool  $createHtaccess Should .htaccess be created
160
-	 *
161
-	 * @return void
162
-	 * @throws InstallationException
163
-	 */
164
-	public function batchInstall(array $params, $createHtaccess = false) {
123
+        $this->checkInstallCompletion($step);
124
+
125
+        // check if this is an install being resumed
126
+        $this->resumeInstall($step);
127
+
128
+        $this->finishBootstrapping($step);
129
+
130
+        $params = $this->getPostVariables();
131
+
132
+        $this->$step($params);
133
+    }
134
+
135
+    /**
136
+     * Set the auto login flag
137
+     *
138
+     * @param bool $flag Auto login
139
+     *
140
+     * @return void
141
+     */
142
+    public function setAutoLogin($flag) {
143
+        $this->autoLogin = (bool) $flag;
144
+    }
145
+
146
+    /**
147
+     * A batch install of Elgg
148
+     *
149
+     * All required parameters must be passed in as an associative array. See
150
+     * $requiredParams for a list of them. This creates the necessary files,
151
+     * loads the database, configures the site settings, and creates the admin
152
+     * account. If it fails, an exception is thrown. It does not check any of
153
+     * the requirements as the multiple step web installer does.
154
+     *
155
+     * If the settings.php file exists, it will use that rather than the parameters
156
+     * passed to this function.
157
+     *
158
+     * @param array $params         Array of key value pairs
159
+     * @param bool  $createHtaccess Should .htaccess be created
160
+     *
161
+     * @return void
162
+     * @throws InstallationException
163
+     */
164
+    public function batchInstall(array $params, $createHtaccess = false) {
165 165
 		
166 166
 
167
-		restore_error_handler();
168
-		restore_exception_handler();
169
-
170
-		$defaults = [
171
-			'dbhost' => 'localhost',
172
-			'dbprefix' => 'elgg_',
173
-			'language' => 'en',
174
-			'siteaccess' => ACCESS_PUBLIC,
175
-			'site_guid' => 1,
176
-		];
177
-		$params = array_merge($defaults, $params);
178
-
179
-		$requiredParams = [
180
-			'dbuser',
181
-			'dbpassword',
182
-			'dbname',
183
-			'sitename',
184
-			'wwwroot',
185
-			'dataroot',
186
-			'displayname',
187
-			'email',
188
-			'username',
189
-			'password',
190
-		];
191
-		foreach ($requiredParams as $key) {
192
-			if (empty($params[$key])) {
193
-				$msg = _elgg_services()->translator->translate('install:error:requiredfield', [$key]);
194
-				throw new InstallationException($msg);
195
-			}
196
-		}
197
-
198
-		// password is passed in once
199
-		$params['password1'] = $params['password2'] = $params['password'];
200
-
201
-		if ($createHtaccess) {
202
-			$rewriteTester = new ElggRewriteTester();
203
-			if (!$rewriteTester->createHtaccess($params['wwwroot'], Directory\Local::root()->getPath())) {
204
-				throw new InstallationException(_elgg_services()->translator->translate('install:error:htaccess'));
205
-			}
206
-		}
207
-
208
-		$this->setInstallStatus();
209
-
210
-		if (!$this->status['config']) {
211
-			if (!$this->createSettingsFile($params)) {
212
-				throw new InstallationException(_elgg_services()->translator->translate('install:error:settings'));
213
-			}
214
-		}
215
-
216
-		if (!$this->connectToDatabase()) {
217
-			throw new InstallationException(_elgg_services()->translator->translate('install:error:databasesettings'));
218
-		}
219
-
220
-		if (!$this->status['database']) {
221
-			if (!$this->installDatabase()) {
222
-				throw new InstallationException(_elgg_services()->translator->translate('install:error:cannotloadtables'));
223
-			}
224
-		}
225
-
226
-		// load remaining core libraries
227
-		$this->finishBootstrapping('settings');
228
-
229
-		if (!$this->saveSiteSettings($params)) {
230
-			throw new InstallationException(_elgg_services()->translator->translate('install:error:savesitesettings'));
231
-		}
232
-
233
-		if (!$this->createAdminAccount($params)) {
234
-			throw new InstallationException(_elgg_services()->translator->translate('install:admin:cannot_create'));
235
-		}
236
-	}
237
-
238
-	/**
239
-	 * Renders the data passed by a controller
240
-	 *
241
-	 * @param string $step The current step
242
-	 * @param array  $vars Array of vars to pass to the view
243
-	 *
244
-	 * @return void
245
-	 */
246
-	protected function render($step, $vars = []) {
247
-		$vars['next_step'] = $this->getNextStep($step);
248
-
249
-		$title = _elgg_services()->translator->translate("install:$step");
250
-		$body = elgg_view("install/pages/$step", $vars);
167
+        restore_error_handler();
168
+        restore_exception_handler();
169
+
170
+        $defaults = [
171
+            'dbhost' => 'localhost',
172
+            'dbprefix' => 'elgg_',
173
+            'language' => 'en',
174
+            'siteaccess' => ACCESS_PUBLIC,
175
+            'site_guid' => 1,
176
+        ];
177
+        $params = array_merge($defaults, $params);
178
+
179
+        $requiredParams = [
180
+            'dbuser',
181
+            'dbpassword',
182
+            'dbname',
183
+            'sitename',
184
+            'wwwroot',
185
+            'dataroot',
186
+            'displayname',
187
+            'email',
188
+            'username',
189
+            'password',
190
+        ];
191
+        foreach ($requiredParams as $key) {
192
+            if (empty($params[$key])) {
193
+                $msg = _elgg_services()->translator->translate('install:error:requiredfield', [$key]);
194
+                throw new InstallationException($msg);
195
+            }
196
+        }
197
+
198
+        // password is passed in once
199
+        $params['password1'] = $params['password2'] = $params['password'];
200
+
201
+        if ($createHtaccess) {
202
+            $rewriteTester = new ElggRewriteTester();
203
+            if (!$rewriteTester->createHtaccess($params['wwwroot'], Directory\Local::root()->getPath())) {
204
+                throw new InstallationException(_elgg_services()->translator->translate('install:error:htaccess'));
205
+            }
206
+        }
207
+
208
+        $this->setInstallStatus();
209
+
210
+        if (!$this->status['config']) {
211
+            if (!$this->createSettingsFile($params)) {
212
+                throw new InstallationException(_elgg_services()->translator->translate('install:error:settings'));
213
+            }
214
+        }
215
+
216
+        if (!$this->connectToDatabase()) {
217
+            throw new InstallationException(_elgg_services()->translator->translate('install:error:databasesettings'));
218
+        }
219
+
220
+        if (!$this->status['database']) {
221
+            if (!$this->installDatabase()) {
222
+                throw new InstallationException(_elgg_services()->translator->translate('install:error:cannotloadtables'));
223
+            }
224
+        }
225
+
226
+        // load remaining core libraries
227
+        $this->finishBootstrapping('settings');
228
+
229
+        if (!$this->saveSiteSettings($params)) {
230
+            throw new InstallationException(_elgg_services()->translator->translate('install:error:savesitesettings'));
231
+        }
232
+
233
+        if (!$this->createAdminAccount($params)) {
234
+            throw new InstallationException(_elgg_services()->translator->translate('install:admin:cannot_create'));
235
+        }
236
+    }
237
+
238
+    /**
239
+     * Renders the data passed by a controller
240
+     *
241
+     * @param string $step The current step
242
+     * @param array  $vars Array of vars to pass to the view
243
+     *
244
+     * @return void
245
+     */
246
+    protected function render($step, $vars = []) {
247
+        $vars['next_step'] = $this->getNextStep($step);
248
+
249
+        $title = _elgg_services()->translator->translate("install:$step");
250
+        $body = elgg_view("install/pages/$step", $vars);
251 251
 				
252
-		echo elgg_view_page(
253
-				$title,
254
-				$body,
255
-				'default',
256
-				[
257
-					'step' => $step,
258
-					'steps' => $this->getSteps(),
259
-					]
260
-				);
261
-		exit;
262
-	}
263
-
264
-	/**
265
-	 * Step controllers
266
-	 */
267
-
268
-	/**
269
-	 * Welcome controller
270
-	 *
271
-	 * @param array $vars Not used
272
-	 *
273
-	 * @return void
274
-	 */
275
-	protected function welcome($vars) {
276
-		$this->render('welcome');
277
-	}
278
-
279
-	/**
280
-	 * Requirements controller
281
-	 *
282
-	 * Checks version of php, libraries, permissions, and rewrite rules
283
-	 *
284
-	 * @param array $vars Vars
285
-	 *
286
-	 * @return void
287
-	 */
288
-	protected function requirements($vars) {
289
-
290
-		$report = [];
291
-
292
-		// check PHP parameters and libraries
293
-		$this->checkPHP($report);
294
-
295
-		// check URL rewriting
296
-		$this->checkRewriteRules($report);
297
-
298
-		// check for existence of settings file
299
-		if ($this->checkSettingsFile($report) != true) {
300
-			// no file, so check permissions on engine directory
301
-			$this->isInstallDirWritable($report);
302
-		}
303
-
304
-		// check the database later
305
-		$report['database'] = [[
306
-			'severity' => 'info',
307
-			'message' => _elgg_services()->translator->translate('install:check:database')
308
-		]];
309
-
310
-		// any failures?
311
-		$numFailures = $this->countNumConditions($report, 'failure');
312
-
313
-		// any warnings
314
-		$numWarnings = $this->countNumConditions($report, 'warning');
315
-
316
-
317
-		$params = [
318
-			'report' => $report,
319
-			'num_failures' => $numFailures,
320
-			'num_warnings' => $numWarnings,
321
-		];
322
-
323
-		$this->render('requirements', $params);
324
-	}
325
-
326
-	/**
327
-	 * Database set up controller
328
-	 *
329
-	 * Creates the settings.php file and creates the database tables
330
-	 *
331
-	 * @param array $submissionVars Submitted form variables
332
-	 *
333
-	 * @return void
334
-	 */
335
-	protected function database($submissionVars) {
336
-
337
-		$formVars = [
338
-			'dbuser' => [
339
-				'type' => 'text',
340
-				'value' => '',
341
-				'required' => true,
342
-				],
343
-			'dbpassword' => [
344
-				'type' => 'password',
345
-				'value' => '',
346
-				'required' => false,
347
-				],
348
-			'dbname' => [
349
-				'type' => 'text',
350
-				'value' => '',
351
-				'required' => true,
352
-				],
353
-			'dbhost' => [
354
-				'type' => 'text',
355
-				'value' => 'localhost',
356
-				'required' => true,
357
-				],
358
-			'dbprefix' => [
359
-				'type' => 'text',
360
-				'value' => 'elgg_',
361
-				'required' => true,
362
-				],
363
-			'dataroot' => [
364
-				'type' => 'text',
365
-				'value' => '',
366
-				'required' => true,
367
-			],
368
-			'wwwroot' => [
369
-				'type' => 'url',
370
-				'value' => _elgg_services()->config->getSiteUrl(),
371
-				'required' => true,
372
-			],
373
-			'timezone' => [
374
-				'type' => 'dropdown',
375
-				'value' => 'UTC',
376
-				'options' => \DateTimeZone::listIdentifiers(),
377
-				'required' => true
378
-			]
379
-		];
380
-
381
-		if ($this->checkSettingsFile()) {
382
-			// user manually created settings file so we fake out action test
383
-			$this->isAction = true;
384
-		}
385
-
386
-		if ($this->isAction) {
387
-			do {
388
-				// only create settings file if it doesn't exist
389
-				if (!$this->checkSettingsFile()) {
390
-					if (!$this->validateDatabaseVars($submissionVars, $formVars)) {
391
-						// error so we break out of action and serve same page
392
-						break;
393
-					}
394
-
395
-					if (!$this->createSettingsFile($submissionVars)) {
396
-						break;
397
-					}
398
-				}
399
-
400
-				// check db version and connect
401
-				if (!$this->connectToDatabase()) {
402
-					break;
403
-				}
404
-
405
-				if (!$this->installDatabase()) {
406
-					break;
407
-				}
408
-
409
-				system_message(_elgg_services()->translator->translate('install:success:database'));
410
-
411
-				$this->continueToNextStep('database');
412
-			} while (false);  // PHP doesn't support breaking out of if statements
413
-		}
414
-
415
-		$formVars = $this->makeFormSticky($formVars, $submissionVars);
416
-
417
-		$params = ['variables' => $formVars,];
418
-
419
-		if ($this->checkSettingsFile()) {
420
-			// settings file exists and we're here so failed to create database
421
-			$params['failure'] = true;
422
-		}
423
-
424
-		$this->render('database', $params);
425
-	}
426
-
427
-	/**
428
-	 * Site settings controller
429
-	 *
430
-	 * Sets the site name, URL, data directory, etc.
431
-	 *
432
-	 * @param array $submissionVars Submitted vars
433
-	 *
434
-	 * @return void
435
-	 */
436
-	protected function settings($submissionVars) {
437
-		$formVars = [
438
-			'sitename' => [
439
-				'type' => 'text',
440
-				'value' => 'My New Community',
441
-				'required' => true,
442
-				],
443
-			'siteemail' => [
444
-				'type' => 'email',
445
-				'value' => '',
446
-				'required' => false,
447
-				],
448
-			'siteaccess' => [
449
-				'type' => 'access',
450
-				'value' => ACCESS_PUBLIC,
451
-				'required' => true,
452
-				],
453
-		];
454
-
455
-		// if Apache, we give user option of having Elgg create data directory
456
-		//if (ElggRewriteTester::guessWebServer() == 'apache') {
457
-		//	$formVars['dataroot']['type'] = 'combo';
458
-		//	$GLOBALS['_ELGG']->translations['en']['install:settings:help:dataroot'] =
459
-		//			$GLOBALS['_ELGG']->translations['en']['install:settings:help:dataroot:apache'];
460
-		//}
461
-
462
-		if ($this->isAction) {
463
-			do {
464
-				//if (!$this->createDataDirectory($submissionVars, $formVars)) {
465
-				//	break;
466
-				//}
467
-
468
-				if (!$this->validateSettingsVars($submissionVars, $formVars)) {
469
-					break;
470
-				}
471
-
472
-				if (!$this->saveSiteSettings($submissionVars)) {
473
-					break;
474
-				}
475
-
476
-				system_message(_elgg_services()->translator->translate('install:success:settings'));
477
-
478
-				$this->continueToNextStep('settings');
479
-			} while (false);  // PHP doesn't support breaking out of if statements
480
-		}
481
-
482
-		$formVars = $this->makeFormSticky($formVars, $submissionVars);
483
-
484
-		$this->render('settings', ['variables' => $formVars]);
485
-	}
486
-
487
-	/**
488
-	 * Admin account controller
489
-	 *
490
-	 * Creates an admin user account
491
-	 *
492
-	 * @param array $submissionVars Submitted vars
493
-	 *
494
-	 * @return void
495
-	 */
496
-	protected function admin($submissionVars) {
497
-		$formVars = [
498
-			'displayname' => [
499
-				'type' => 'text',
500
-				'value' => '',
501
-				'required' => true,
502
-				],
503
-			'email' => [
504
-				'type' => 'email',
505
-				'value' => '',
506
-				'required' => true,
507
-				],
508
-			'username' => [
509
-				'type' => 'text',
510
-				'value' => '',
511
-				'required' => true,
512
-				],
513
-			'password1' => [
514
-				'type' => 'password',
515
-				'value' => '',
516
-				'required' => true,
517
-				'pattern' => '.{6,}',
518
-				],
519
-			'password2' => [
520
-				'type' => 'password',
521
-				'value' => '',
522
-				'required' => true,
523
-				],
524
-		];
252
+        echo elgg_view_page(
253
+                $title,
254
+                $body,
255
+                'default',
256
+                [
257
+                    'step' => $step,
258
+                    'steps' => $this->getSteps(),
259
+                    ]
260
+                );
261
+        exit;
262
+    }
263
+
264
+    /**
265
+     * Step controllers
266
+     */
267
+
268
+    /**
269
+     * Welcome controller
270
+     *
271
+     * @param array $vars Not used
272
+     *
273
+     * @return void
274
+     */
275
+    protected function welcome($vars) {
276
+        $this->render('welcome');
277
+    }
278
+
279
+    /**
280
+     * Requirements controller
281
+     *
282
+     * Checks version of php, libraries, permissions, and rewrite rules
283
+     *
284
+     * @param array $vars Vars
285
+     *
286
+     * @return void
287
+     */
288
+    protected function requirements($vars) {
289
+
290
+        $report = [];
291
+
292
+        // check PHP parameters and libraries
293
+        $this->checkPHP($report);
294
+
295
+        // check URL rewriting
296
+        $this->checkRewriteRules($report);
297
+
298
+        // check for existence of settings file
299
+        if ($this->checkSettingsFile($report) != true) {
300
+            // no file, so check permissions on engine directory
301
+            $this->isInstallDirWritable($report);
302
+        }
303
+
304
+        // check the database later
305
+        $report['database'] = [[
306
+            'severity' => 'info',
307
+            'message' => _elgg_services()->translator->translate('install:check:database')
308
+        ]];
309
+
310
+        // any failures?
311
+        $numFailures = $this->countNumConditions($report, 'failure');
312
+
313
+        // any warnings
314
+        $numWarnings = $this->countNumConditions($report, 'warning');
315
+
316
+
317
+        $params = [
318
+            'report' => $report,
319
+            'num_failures' => $numFailures,
320
+            'num_warnings' => $numWarnings,
321
+        ];
322
+
323
+        $this->render('requirements', $params);
324
+    }
325
+
326
+    /**
327
+     * Database set up controller
328
+     *
329
+     * Creates the settings.php file and creates the database tables
330
+     *
331
+     * @param array $submissionVars Submitted form variables
332
+     *
333
+     * @return void
334
+     */
335
+    protected function database($submissionVars) {
336
+
337
+        $formVars = [
338
+            'dbuser' => [
339
+                'type' => 'text',
340
+                'value' => '',
341
+                'required' => true,
342
+                ],
343
+            'dbpassword' => [
344
+                'type' => 'password',
345
+                'value' => '',
346
+                'required' => false,
347
+                ],
348
+            'dbname' => [
349
+                'type' => 'text',
350
+                'value' => '',
351
+                'required' => true,
352
+                ],
353
+            'dbhost' => [
354
+                'type' => 'text',
355
+                'value' => 'localhost',
356
+                'required' => true,
357
+                ],
358
+            'dbprefix' => [
359
+                'type' => 'text',
360
+                'value' => 'elgg_',
361
+                'required' => true,
362
+                ],
363
+            'dataroot' => [
364
+                'type' => 'text',
365
+                'value' => '',
366
+                'required' => true,
367
+            ],
368
+            'wwwroot' => [
369
+                'type' => 'url',
370
+                'value' => _elgg_services()->config->getSiteUrl(),
371
+                'required' => true,
372
+            ],
373
+            'timezone' => [
374
+                'type' => 'dropdown',
375
+                'value' => 'UTC',
376
+                'options' => \DateTimeZone::listIdentifiers(),
377
+                'required' => true
378
+            ]
379
+        ];
380
+
381
+        if ($this->checkSettingsFile()) {
382
+            // user manually created settings file so we fake out action test
383
+            $this->isAction = true;
384
+        }
385
+
386
+        if ($this->isAction) {
387
+            do {
388
+                // only create settings file if it doesn't exist
389
+                if (!$this->checkSettingsFile()) {
390
+                    if (!$this->validateDatabaseVars($submissionVars, $formVars)) {
391
+                        // error so we break out of action and serve same page
392
+                        break;
393
+                    }
394
+
395
+                    if (!$this->createSettingsFile($submissionVars)) {
396
+                        break;
397
+                    }
398
+                }
399
+
400
+                // check db version and connect
401
+                if (!$this->connectToDatabase()) {
402
+                    break;
403
+                }
404
+
405
+                if (!$this->installDatabase()) {
406
+                    break;
407
+                }
408
+
409
+                system_message(_elgg_services()->translator->translate('install:success:database'));
410
+
411
+                $this->continueToNextStep('database');
412
+            } while (false);  // PHP doesn't support breaking out of if statements
413
+        }
414
+
415
+        $formVars = $this->makeFormSticky($formVars, $submissionVars);
416
+
417
+        $params = ['variables' => $formVars,];
418
+
419
+        if ($this->checkSettingsFile()) {
420
+            // settings file exists and we're here so failed to create database
421
+            $params['failure'] = true;
422
+        }
423
+
424
+        $this->render('database', $params);
425
+    }
426
+
427
+    /**
428
+     * Site settings controller
429
+     *
430
+     * Sets the site name, URL, data directory, etc.
431
+     *
432
+     * @param array $submissionVars Submitted vars
433
+     *
434
+     * @return void
435
+     */
436
+    protected function settings($submissionVars) {
437
+        $formVars = [
438
+            'sitename' => [
439
+                'type' => 'text',
440
+                'value' => 'My New Community',
441
+                'required' => true,
442
+                ],
443
+            'siteemail' => [
444
+                'type' => 'email',
445
+                'value' => '',
446
+                'required' => false,
447
+                ],
448
+            'siteaccess' => [
449
+                'type' => 'access',
450
+                'value' => ACCESS_PUBLIC,
451
+                'required' => true,
452
+                ],
453
+        ];
454
+
455
+        // if Apache, we give user option of having Elgg create data directory
456
+        //if (ElggRewriteTester::guessWebServer() == 'apache') {
457
+        //	$formVars['dataroot']['type'] = 'combo';
458
+        //	$GLOBALS['_ELGG']->translations['en']['install:settings:help:dataroot'] =
459
+        //			$GLOBALS['_ELGG']->translations['en']['install:settings:help:dataroot:apache'];
460
+        //}
461
+
462
+        if ($this->isAction) {
463
+            do {
464
+                //if (!$this->createDataDirectory($submissionVars, $formVars)) {
465
+                //	break;
466
+                //}
467
+
468
+                if (!$this->validateSettingsVars($submissionVars, $formVars)) {
469
+                    break;
470
+                }
471
+
472
+                if (!$this->saveSiteSettings($submissionVars)) {
473
+                    break;
474
+                }
475
+
476
+                system_message(_elgg_services()->translator->translate('install:success:settings'));
477
+
478
+                $this->continueToNextStep('settings');
479
+            } while (false);  // PHP doesn't support breaking out of if statements
480
+        }
481
+
482
+        $formVars = $this->makeFormSticky($formVars, $submissionVars);
483
+
484
+        $this->render('settings', ['variables' => $formVars]);
485
+    }
486
+
487
+    /**
488
+     * Admin account controller
489
+     *
490
+     * Creates an admin user account
491
+     *
492
+     * @param array $submissionVars Submitted vars
493
+     *
494
+     * @return void
495
+     */
496
+    protected function admin($submissionVars) {
497
+        $formVars = [
498
+            'displayname' => [
499
+                'type' => 'text',
500
+                'value' => '',
501
+                'required' => true,
502
+                ],
503
+            'email' => [
504
+                'type' => 'email',
505
+                'value' => '',
506
+                'required' => true,
507
+                ],
508
+            'username' => [
509
+                'type' => 'text',
510
+                'value' => '',
511
+                'required' => true,
512
+                ],
513
+            'password1' => [
514
+                'type' => 'password',
515
+                'value' => '',
516
+                'required' => true,
517
+                'pattern' => '.{6,}',
518
+                ],
519
+            'password2' => [
520
+                'type' => 'password',
521
+                'value' => '',
522
+                'required' => true,
523
+                ],
524
+        ];
525 525
 		
526
-		if ($this->isAction) {
527
-			do {
528
-				if (!$this->validateAdminVars($submissionVars, $formVars)) {
529
-					break;
530
-				}
526
+        if ($this->isAction) {
527
+            do {
528
+                if (!$this->validateAdminVars($submissionVars, $formVars)) {
529
+                    break;
530
+                }
531 531
 
532
-				if (!$this->createAdminAccount($submissionVars, $this->autoLogin)) {
533
-					break;
534
-				}
532
+                if (!$this->createAdminAccount($submissionVars, $this->autoLogin)) {
533
+                    break;
534
+                }
535 535
 
536
-				system_message(_elgg_services()->translator->translate('install:success:admin'));
536
+                system_message(_elgg_services()->translator->translate('install:success:admin'));
537 537
 
538
-				$this->continueToNextStep('admin');
539
-			} while (false);  // PHP doesn't support breaking out of if statements
540
-		}
538
+                $this->continueToNextStep('admin');
539
+            } while (false);  // PHP doesn't support breaking out of if statements
540
+        }
541 541
 
542
-		// bit of a hack to get the password help to show right number of characters
542
+        // bit of a hack to get the password help to show right number of characters
543 543
 		
544
-		$lang = _elgg_services()->translator->getCurrentLanguage();
545
-		$GLOBALS['_ELGG']->translations[$lang]['install:admin:help:password1'] =
546
-				sprintf($GLOBALS['_ELGG']->translations[$lang]['install:admin:help:password1'],
547
-				$this->CONFIG->min_password_length);
548
-
549
-		$formVars = $this->makeFormSticky($formVars, $submissionVars);
550
-
551
-		$this->render('admin', ['variables' => $formVars]);
552
-	}
553
-
554
-	/**
555
-	 * Controller for last step
556
-	 *
557
-	 * @return void
558
-	 */
559
-	protected function complete() {
560
-
561
-		$params = [];
562
-		if ($this->autoLogin) {
563
-			$params['destination'] = 'admin';
564
-		} else {
565
-			$params['destination'] = 'index.php';
566
-		}
567
-
568
-		$this->render('complete', $params);
569
-	}
570
-
571
-	/**
572
-	 * Step management
573
-	 */
574
-
575
-	/**
576
-	 * Get an array of steps
577
-	 *
578
-	 * @return array
579
-	 */
580
-	protected function getSteps() {
581
-		return $this->steps;
582
-	}
583
-
584
-	/**
585
-	 * Forwards the browser to the next step
586
-	 *
587
-	 * @param string $currentStep Current installation step
588
-	 *
589
-	 * @return void
590
-	 */
591
-	protected function continueToNextStep($currentStep) {
592
-		$this->isAction = false;
593
-		forward($this->getNextStepUrl($currentStep));
594
-	}
595
-
596
-	/**
597
-	 * Get the next step as a string
598
-	 *
599
-	 * @param string $currentStep Current installation step
600
-	 *
601
-	 * @return string
602
-	 */
603
-	protected function getNextStep($currentStep) {
604
-		$index = 1 + array_search($currentStep, $this->steps);
605
-		if (isset($this->steps[$index])) {
606
-			return $this->steps[$index];
607
-		} else {
608
-			return null;
609
-		}
610
-	}
611
-
612
-	/**
613
-	 * Get the URL of the next step
614
-	 *
615
-	 * @param string $currentStep Current installation step
616
-	 *
617
-	 * @return string
618
-	 */
619
-	protected function getNextStepUrl($currentStep) {
620
-		$nextStep = $this->getNextStep($currentStep);
621
-		return _elgg_services()->config->getSiteUrl() . "install.php?step=$nextStep";
622
-	}
623
-
624
-	/**
625
-	 * Check the different install steps for completion
626
-	 *
627
-	 * @return void
628
-	 * @throws InstallationException
629
-	 */
630
-	protected function setInstallStatus() {
631
-		if (!is_readable($this->getSettingsPath())) {
632
-			return;
633
-		}
634
-
635
-		$this->loadSettingsFile();
636
-
637
-		$this->status['config'] = true;
638
-
639
-		// must be able to connect to database to jump install steps
640
-		$dbSettingsPass = $this->checkDatabaseSettings(
641
-				$this->CONFIG->dbuser,
642
-				$this->CONFIG->dbpass,
643
-				$this->CONFIG->dbname,
644
-				$this->CONFIG->dbhost
645
-				);
646
-
647
-		if ($dbSettingsPass == false) {
648
-			return;
649
-		}
650
-
651
-		if (!include_once(\Elgg\Application::elggDir()->getPath("engine/lib/database.php"))) {
652
-			throw new InstallationException(_elgg_services()->translator->translate('InstallationException:MissingLibrary', ['database.php']));
653
-		}
654
-
655
-		// check that the config table has been created
656
-		$query = "show tables";
657
-		$result = _elgg_services()->db->getData($query);
658
-		if ($result) {
659
-			foreach ($result as $table) {
660
-				$table = (array) $table;
661
-				if (in_array("{$this->CONFIG->dbprefix}config", $table)) {
662
-					$this->status['database'] = true;
663
-				}
664
-			}
665
-			if ($this->status['database'] == false) {
666
-				return;
667
-			}
668
-		} else {
669
-			// no tables
670
-			return;
671
-		}
672
-
673
-		// check that the config table has entries
674
-		$query = "SELECT COUNT(*) AS total FROM {$this->CONFIG->dbprefix}config";
675
-		$result = _elgg_services()->db->getData($query);
676
-		if ($result && $result[0]->total > 0) {
677
-			$this->status['settings'] = true;
678
-		} else {
679
-			return;
680
-		}
681
-
682
-		// check that the users entity table has an entry
683
-		$query = "SELECT COUNT(*) AS total FROM {$this->CONFIG->dbprefix}users_entity";
684
-		$result = _elgg_services()->db->getData($query);
685
-		if ($result && $result[0]->total > 0) {
686
-			$this->status['admin'] = true;
687
-		} else {
688
-			return;
689
-		}
690
-	}
691
-
692
-	/**
693
-	 * Security check to ensure the installer cannot be run after installation
694
-	 * has finished. If this is detected, the viewer is sent to the front page.
695
-	 *
696
-	 * @param string $step Installation step to check against
697
-	 *
698
-	 * @return void
699
-	 */
700
-	protected function checkInstallCompletion($step) {
701
-		if ($step != 'complete') {
702
-			if (!in_array(false, $this->status)) {
703
-				// install complete but someone is trying to view an install page
704
-				forward();
705
-			}
706
-		}
707
-	}
708
-
709
-	/**
710
-	 * Check if this is a case of a install being resumed and figure
711
-	 * out where to continue from. Returns the best guess on the step.
712
-	 *
713
-	 * @param string $step Installation step to resume from
714
-	 *
715
-	 * @return string
716
-	 */
717
-	protected function resumeInstall($step) {
718
-		// only do a resume from the first step
719
-		if ($step !== 'welcome') {
720
-			return;
721
-		}
722
-
723
-		if ($this->status['database'] == false) {
724
-			return;
725
-		}
726
-
727
-		if ($this->status['settings'] == false) {
728
-			forward("install.php?step=settings");
729
-		}
730
-
731
-		if ($this->status['admin'] == false) {
732
-			forward("install.php?step=admin");
733
-		}
734
-
735
-		// everything appears to be set up
736
-		forward("install.php?step=complete");
737
-	}
738
-
739
-	/**
740
-	 * Bootstraping
741
-	 */
742
-
743
-	/**
744
-	 * Load the essential libraries of the engine
745
-	 *
746
-	 * @return void
747
-	 */
748
-	protected function bootstrapEngine() {
749
-		$config = new \Elgg\Config($this->CONFIG);
750
-		$services = new \Elgg\Di\ServiceProvider($config);
751
-		(new \Elgg\Application($services))->loadCore();
752
-	}
753
-
754
-	/**
755
-	 * Load remaining engine libraries and complete bootstrapping
756
-	 *
757
-	 * @param string $step Which step to boot strap for. Required because
758
-	 *                     boot strapping is different until the DB is populated.
759
-	 *
760
-	 * @return void
761
-	 * @throws InstallationException
762
-	 */
763
-	protected function finishBootstrapping($step) {
764
-
765
-		$dbIndex = array_search('database', $this->getSteps());
766
-		$settingsIndex = array_search('settings', $this->getSteps());
767
-		$adminIndex = array_search('admin', $this->getSteps());
768
-		$completeIndex = array_search('complete', $this->getSteps());
769
-		$stepIndex = array_search($step, $this->getSteps());
770
-
771
-		// To log in the user, we need to use the Elgg core session handling.
772
-		// Otherwise, use default php session handling
773
-		$useElggSession = ($stepIndex == $adminIndex && $this->isAction) ||
774
-				$stepIndex == $completeIndex;
775
-		if (!$useElggSession) {
776
-			session_name('Elgg_install');
777
-			session_start();
778
-			_elgg_services()->events->unregisterHandler('boot', 'system', 'session_init');
779
-		}
780
-
781
-		if ($stepIndex > $dbIndex) {
782
-			// once the database has been created, load rest of engine
544
+        $lang = _elgg_services()->translator->getCurrentLanguage();
545
+        $GLOBALS['_ELGG']->translations[$lang]['install:admin:help:password1'] =
546
+                sprintf($GLOBALS['_ELGG']->translations[$lang]['install:admin:help:password1'],
547
+                $this->CONFIG->min_password_length);
548
+
549
+        $formVars = $this->makeFormSticky($formVars, $submissionVars);
550
+
551
+        $this->render('admin', ['variables' => $formVars]);
552
+    }
553
+
554
+    /**
555
+     * Controller for last step
556
+     *
557
+     * @return void
558
+     */
559
+    protected function complete() {
560
+
561
+        $params = [];
562
+        if ($this->autoLogin) {
563
+            $params['destination'] = 'admin';
564
+        } else {
565
+            $params['destination'] = 'index.php';
566
+        }
567
+
568
+        $this->render('complete', $params);
569
+    }
570
+
571
+    /**
572
+     * Step management
573
+     */
574
+
575
+    /**
576
+     * Get an array of steps
577
+     *
578
+     * @return array
579
+     */
580
+    protected function getSteps() {
581
+        return $this->steps;
582
+    }
583
+
584
+    /**
585
+     * Forwards the browser to the next step
586
+     *
587
+     * @param string $currentStep Current installation step
588
+     *
589
+     * @return void
590
+     */
591
+    protected function continueToNextStep($currentStep) {
592
+        $this->isAction = false;
593
+        forward($this->getNextStepUrl($currentStep));
594
+    }
595
+
596
+    /**
597
+     * Get the next step as a string
598
+     *
599
+     * @param string $currentStep Current installation step
600
+     *
601
+     * @return string
602
+     */
603
+    protected function getNextStep($currentStep) {
604
+        $index = 1 + array_search($currentStep, $this->steps);
605
+        if (isset($this->steps[$index])) {
606
+            return $this->steps[$index];
607
+        } else {
608
+            return null;
609
+        }
610
+    }
611
+
612
+    /**
613
+     * Get the URL of the next step
614
+     *
615
+     * @param string $currentStep Current installation step
616
+     *
617
+     * @return string
618
+     */
619
+    protected function getNextStepUrl($currentStep) {
620
+        $nextStep = $this->getNextStep($currentStep);
621
+        return _elgg_services()->config->getSiteUrl() . "install.php?step=$nextStep";
622
+    }
623
+
624
+    /**
625
+     * Check the different install steps for completion
626
+     *
627
+     * @return void
628
+     * @throws InstallationException
629
+     */
630
+    protected function setInstallStatus() {
631
+        if (!is_readable($this->getSettingsPath())) {
632
+            return;
633
+        }
634
+
635
+        $this->loadSettingsFile();
636
+
637
+        $this->status['config'] = true;
638
+
639
+        // must be able to connect to database to jump install steps
640
+        $dbSettingsPass = $this->checkDatabaseSettings(
641
+                $this->CONFIG->dbuser,
642
+                $this->CONFIG->dbpass,
643
+                $this->CONFIG->dbname,
644
+                $this->CONFIG->dbhost
645
+                );
646
+
647
+        if ($dbSettingsPass == false) {
648
+            return;
649
+        }
650
+
651
+        if (!include_once(\Elgg\Application::elggDir()->getPath("engine/lib/database.php"))) {
652
+            throw new InstallationException(_elgg_services()->translator->translate('InstallationException:MissingLibrary', ['database.php']));
653
+        }
654
+
655
+        // check that the config table has been created
656
+        $query = "show tables";
657
+        $result = _elgg_services()->db->getData($query);
658
+        if ($result) {
659
+            foreach ($result as $table) {
660
+                $table = (array) $table;
661
+                if (in_array("{$this->CONFIG->dbprefix}config", $table)) {
662
+                    $this->status['database'] = true;
663
+                }
664
+            }
665
+            if ($this->status['database'] == false) {
666
+                return;
667
+            }
668
+        } else {
669
+            // no tables
670
+            return;
671
+        }
672
+
673
+        // check that the config table has entries
674
+        $query = "SELECT COUNT(*) AS total FROM {$this->CONFIG->dbprefix}config";
675
+        $result = _elgg_services()->db->getData($query);
676
+        if ($result && $result[0]->total > 0) {
677
+            $this->status['settings'] = true;
678
+        } else {
679
+            return;
680
+        }
681
+
682
+        // check that the users entity table has an entry
683
+        $query = "SELECT COUNT(*) AS total FROM {$this->CONFIG->dbprefix}users_entity";
684
+        $result = _elgg_services()->db->getData($query);
685
+        if ($result && $result[0]->total > 0) {
686
+            $this->status['admin'] = true;
687
+        } else {
688
+            return;
689
+        }
690
+    }
691
+
692
+    /**
693
+     * Security check to ensure the installer cannot be run after installation
694
+     * has finished. If this is detected, the viewer is sent to the front page.
695
+     *
696
+     * @param string $step Installation step to check against
697
+     *
698
+     * @return void
699
+     */
700
+    protected function checkInstallCompletion($step) {
701
+        if ($step != 'complete') {
702
+            if (!in_array(false, $this->status)) {
703
+                // install complete but someone is trying to view an install page
704
+                forward();
705
+            }
706
+        }
707
+    }
708
+
709
+    /**
710
+     * Check if this is a case of a install being resumed and figure
711
+     * out where to continue from. Returns the best guess on the step.
712
+     *
713
+     * @param string $step Installation step to resume from
714
+     *
715
+     * @return string
716
+     */
717
+    protected function resumeInstall($step) {
718
+        // only do a resume from the first step
719
+        if ($step !== 'welcome') {
720
+            return;
721
+        }
722
+
723
+        if ($this->status['database'] == false) {
724
+            return;
725
+        }
726
+
727
+        if ($this->status['settings'] == false) {
728
+            forward("install.php?step=settings");
729
+        }
730
+
731
+        if ($this->status['admin'] == false) {
732
+            forward("install.php?step=admin");
733
+        }
734
+
735
+        // everything appears to be set up
736
+        forward("install.php?step=complete");
737
+    }
738
+
739
+    /**
740
+     * Bootstraping
741
+     */
742
+
743
+    /**
744
+     * Load the essential libraries of the engine
745
+     *
746
+     * @return void
747
+     */
748
+    protected function bootstrapEngine() {
749
+        $config = new \Elgg\Config($this->CONFIG);
750
+        $services = new \Elgg\Di\ServiceProvider($config);
751
+        (new \Elgg\Application($services))->loadCore();
752
+    }
753
+
754
+    /**
755
+     * Load remaining engine libraries and complete bootstrapping
756
+     *
757
+     * @param string $step Which step to boot strap for. Required because
758
+     *                     boot strapping is different until the DB is populated.
759
+     *
760
+     * @return void
761
+     * @throws InstallationException
762
+     */
763
+    protected function finishBootstrapping($step) {
764
+
765
+        $dbIndex = array_search('database', $this->getSteps());
766
+        $settingsIndex = array_search('settings', $this->getSteps());
767
+        $adminIndex = array_search('admin', $this->getSteps());
768
+        $completeIndex = array_search('complete', $this->getSteps());
769
+        $stepIndex = array_search($step, $this->getSteps());
770
+
771
+        // To log in the user, we need to use the Elgg core session handling.
772
+        // Otherwise, use default php session handling
773
+        $useElggSession = ($stepIndex == $adminIndex && $this->isAction) ||
774
+                $stepIndex == $completeIndex;
775
+        if (!$useElggSession) {
776
+            session_name('Elgg_install');
777
+            session_start();
778
+            _elgg_services()->events->unregisterHandler('boot', 'system', 'session_init');
779
+        }
780
+
781
+        if ($stepIndex > $dbIndex) {
782
+            // once the database has been created, load rest of engine
783 783
 			
784
-			$lib_dir = \Elgg\Application::elggDir()->chroot('/engine/lib/');
785
-
786
-			$this->loadSettingsFile();
787
-
788
-			$lib_files = [
789
-				// these want to be loaded first apparently?
790
-				'autoloader.php',
791
-				'database.php',
792
-				'actions.php',
793
-
794
-				'admin.php',
795
-				'annotations.php',
796
-				'cron.php',
797
-				'entities.php',
798
-				'extender.php',
799
-				'filestore.php',
800
-				'group.php',
801
-				'mb_wrapper.php',
802
-				'memcache.php',
803
-				'metadata.php',
804
-				'metastrings.php',
805
-				'navigation.php',
806
-				'notification.php',
807
-				'objects.php',
808
-				'pagehandler.php',
809
-				'pam.php',
810
-				'plugins.php',
811
-				'private_settings.php',
812
-				'relationships.php',
813
-				'river.php',
814
-				'sites.php',
815
-				'statistics.php',
816
-				'tags.php',
817
-				'user_settings.php',
818
-				'users.php',
819
-				'upgrade.php',
820
-				'widgets.php',
821
-			];
822
-
823
-			foreach ($lib_files as $file) {
824
-				if (!include_once($lib_dir->getPath($file))) {
825
-					throw new InstallationException('InstallationException:MissingLibrary', [$file]);
826
-				}
827
-			}
828
-
829
-			_elgg_services()->db->setupConnections();
830
-			_elgg_services()->translator->registerTranslations(\Elgg\Application::elggDir()->getPath("/languages/"));
831
-			$this->CONFIG->language = 'en';
832
-
833
-			if ($stepIndex > $settingsIndex) {
834
-				$this->CONFIG->site_guid = 1;
835
-				$this->CONFIG->site = get_entity(1);
836
-				_elgg_services()->config->getCookieConfig();
837
-				_elgg_session_boot();
838
-			}
839
-
840
-			_elgg_services()->events->trigger('init', 'system');
841
-		}
842
-	}
843
-
844
-	/**
845
-	 * Set up configuration variables
846
-	 *
847
-	 * @return void
848
-	 */
849
-	protected function bootstrapConfig() {
850
-		$this->CONFIG->installer_running = true;
851
-
852
-		if (empty($this->CONFIG->dbencoding)) {
853
-			$this->CONFIG->dbencoding = 'utf8mb4';
854
-		}
855
-		$this->CONFIG->wwwroot = $this->getBaseUrl();
856
-		$this->CONFIG->url = $this->CONFIG->wwwroot;
857
-		$this->CONFIG->path = Directory\Local::root()->getPath('/');
858
-		$this->view_path = $this->CONFIG->path . 'views/';
859
-		$this->CONFIG->pluginspath = $this->CONFIG->path . 'mod/';
860
-		$this->CONFIG->context = [];
861
-		$this->CONFIG->entity_types = ['group', 'object', 'site', 'user'];
862
-
863
-		// required by elgg_view_page()
864
-		$this->CONFIG->sitename = '';
865
-		$this->CONFIG->sitedescription = '';
866
-
867
-		// required by Elgg\Config::get
868
-		$this->CONFIG->site_guid = 1;
869
-	}
784
+            $lib_dir = \Elgg\Application::elggDir()->chroot('/engine/lib/');
785
+
786
+            $this->loadSettingsFile();
787
+
788
+            $lib_files = [
789
+                // these want to be loaded first apparently?
790
+                'autoloader.php',
791
+                'database.php',
792
+                'actions.php',
793
+
794
+                'admin.php',
795
+                'annotations.php',
796
+                'cron.php',
797
+                'entities.php',
798
+                'extender.php',
799
+                'filestore.php',
800
+                'group.php',
801
+                'mb_wrapper.php',
802
+                'memcache.php',
803
+                'metadata.php',
804
+                'metastrings.php',
805
+                'navigation.php',
806
+                'notification.php',
807
+                'objects.php',
808
+                'pagehandler.php',
809
+                'pam.php',
810
+                'plugins.php',
811
+                'private_settings.php',
812
+                'relationships.php',
813
+                'river.php',
814
+                'sites.php',
815
+                'statistics.php',
816
+                'tags.php',
817
+                'user_settings.php',
818
+                'users.php',
819
+                'upgrade.php',
820
+                'widgets.php',
821
+            ];
822
+
823
+            foreach ($lib_files as $file) {
824
+                if (!include_once($lib_dir->getPath($file))) {
825
+                    throw new InstallationException('InstallationException:MissingLibrary', [$file]);
826
+                }
827
+            }
828
+
829
+            _elgg_services()->db->setupConnections();
830
+            _elgg_services()->translator->registerTranslations(\Elgg\Application::elggDir()->getPath("/languages/"));
831
+            $this->CONFIG->language = 'en';
832
+
833
+            if ($stepIndex > $settingsIndex) {
834
+                $this->CONFIG->site_guid = 1;
835
+                $this->CONFIG->site = get_entity(1);
836
+                _elgg_services()->config->getCookieConfig();
837
+                _elgg_session_boot();
838
+            }
839
+
840
+            _elgg_services()->events->trigger('init', 'system');
841
+        }
842
+    }
843
+
844
+    /**
845
+     * Set up configuration variables
846
+     *
847
+     * @return void
848
+     */
849
+    protected function bootstrapConfig() {
850
+        $this->CONFIG->installer_running = true;
851
+
852
+        if (empty($this->CONFIG->dbencoding)) {
853
+            $this->CONFIG->dbencoding = 'utf8mb4';
854
+        }
855
+        $this->CONFIG->wwwroot = $this->getBaseUrl();
856
+        $this->CONFIG->url = $this->CONFIG->wwwroot;
857
+        $this->CONFIG->path = Directory\Local::root()->getPath('/');
858
+        $this->view_path = $this->CONFIG->path . 'views/';
859
+        $this->CONFIG->pluginspath = $this->CONFIG->path . 'mod/';
860
+        $this->CONFIG->context = [];
861
+        $this->CONFIG->entity_types = ['group', 'object', 'site', 'user'];
862
+
863
+        // required by elgg_view_page()
864
+        $this->CONFIG->sitename = '';
865
+        $this->CONFIG->sitedescription = '';
866
+
867
+        // required by Elgg\Config::get
868
+        $this->CONFIG->site_guid = 1;
869
+    }
870 870
 	
871
-	/**
872
-	 * @return bool Whether the install process is encrypted.
873
-	 */
874
-	private function isHttps() {
875
-		return (!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") ||
876
-			(!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443);
877
-	}
878
-
879
-	/**
880
-	 * Get the best guess at the base URL
881
-	 *
882
-	 * @note Cannot use current_page_url() because it depends on $this->CONFIG->wwwroot
883
-	 * @todo Should this be a core function?
884
-	 *
885
-	 * @return string
886
-	 */
887
-	protected function getBaseUrl() {
888
-		$protocol = $this->isHttps() ? 'https' : 'http';
871
+    /**
872
+     * @return bool Whether the install process is encrypted.
873
+     */
874
+    private function isHttps() {
875
+        return (!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") ||
876
+            (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443);
877
+    }
878
+
879
+    /**
880
+     * Get the best guess at the base URL
881
+     *
882
+     * @note Cannot use current_page_url() because it depends on $this->CONFIG->wwwroot
883
+     * @todo Should this be a core function?
884
+     *
885
+     * @return string
886
+     */
887
+    protected function getBaseUrl() {
888
+        $protocol = $this->isHttps() ? 'https' : 'http';
889 889
 		
890
-		if (isset($_SERVER["SERVER_PORT"])) {
891
-			$port = ':' . $_SERVER["SERVER_PORT"];
892
-		} else {
893
-			$port = '';
894
-		}
895
-		if ($port == ':80' || $port == ':443') {
896
-			$port = '';
897
-		}
898
-		$uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
899
-		$cutoff = strpos($uri, 'install.php');
900
-		$uri = substr($uri, 0, $cutoff);
901
-		$serverName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '';
902
-
903
-		return "$protocol://{$serverName}$port{$uri}";
904
-	}
905
-
906
-	/**
907
-	 * Load settings.php
908
-	 *
909
-	 * @return void
910
-	 * @throws InstallationException
911
-	 */
912
-	protected function loadSettingsFile() {
913
-		if (!include_once($this->getSettingsPath())) {
914
-			throw new InstallationException(_elgg_services()->translator->translate('InstallationException:CannotLoadSettings'));
915
-		}
916
-	}
917
-
918
-	/**
919
-	 * Action handling methods
920
-	 */
921
-
922
-	/**
923
-	 * Return an associative array of post variables
924
-	 * (could be selective based on expected variables)
925
-	 *
926
-	 * Does not filter as person installing the site should not be attempting
927
-	 * XSS attacks. If filtering is added, it should not be done for passwords.
928
-	 *
929
-	 * @return array
930
-	 */
931
-	protected function getPostVariables() {
932
-		$vars = [];
933
-		foreach ($_POST as $k => $v) {
934
-			$vars[$k] = $v;
935
-		}
936
-		return $vars;
937
-	}
938
-
939
-	/**
940
-	 * If form is reshown, remember previously submitted variables
941
-	 *
942
-	 * @param array $formVars       Vars int he form
943
-	 * @param array $submissionVars Submitted vars
944
-	 *
945
-	 * @return array
946
-	 */
947
-	protected function makeFormSticky($formVars, $submissionVars) {
948
-		foreach ($submissionVars as $field => $value) {
949
-			$formVars[$field]['value'] = $value;
950
-		}
951
-		return $formVars;
952
-	}
953
-
954
-	/* Requirement checks support methods */
955
-
956
-	/**
957
-	 * Indicates whether the webserver can add settings.php on its own or not.
958
-	 *
959
-	 * @param array $report The requirements report object
960
-	 *
961
-	 * @return bool
962
-	 */
963
-	protected function isInstallDirWritable(&$report) {
964
-		$root = Directory\Local::root()->getPath();
965
-		$abs_path = \Elgg\Application::elggDir()->getPath('elgg-config');
966
-
967
-		if (0 === strpos($abs_path, $root)) {
968
-			$relative_path = substr($abs_path, strlen($root));
969
-		} else {
970
-			$relative_path = $abs_path;
971
-		}
972
-		$relative_path = rtrim($relative_path, '/\\');
973
-
974
-		$writable = is_writable(Directory\Local::root()->getPath('elgg-config'));
975
-		if (!$writable) {
976
-			$report['settings'] = [
977
-				[
978
-					'severity' => 'failure',
979
-					'message' => _elgg_services()->translator->translate('install:check:installdir', [$relative_path]),
980
-				]
981
-			];
982
-			return false;
983
-		}
984
-
985
-		return true;
986
-	}
987
-
988
-	/**
989
-	 * Check that the settings file exists
990
-	 *
991
-	 * @param array $report The requirements report array
992
-	 *
993
-	 * @return bool
994
-	 */
995
-	protected function checkSettingsFile(&$report = []) {
996
-		if (!file_exists($this->getSettingsPath())) {
997
-			return false;
998
-		}
999
-
1000
-		if (!is_readable($this->getSettingsPath())) {
1001
-			$report['settings'] = [
1002
-				[
1003
-					'severity' => 'failure',
1004
-					'message' => _elgg_services()->translator->translate('install:check:readsettings'),
1005
-				]
1006
-			];
1007
-		}
890
+        if (isset($_SERVER["SERVER_PORT"])) {
891
+            $port = ':' . $_SERVER["SERVER_PORT"];
892
+        } else {
893
+            $port = '';
894
+        }
895
+        if ($port == ':80' || $port == ':443') {
896
+            $port = '';
897
+        }
898
+        $uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
899
+        $cutoff = strpos($uri, 'install.php');
900
+        $uri = substr($uri, 0, $cutoff);
901
+        $serverName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '';
902
+
903
+        return "$protocol://{$serverName}$port{$uri}";
904
+    }
905
+
906
+    /**
907
+     * Load settings.php
908
+     *
909
+     * @return void
910
+     * @throws InstallationException
911
+     */
912
+    protected function loadSettingsFile() {
913
+        if (!include_once($this->getSettingsPath())) {
914
+            throw new InstallationException(_elgg_services()->translator->translate('InstallationException:CannotLoadSettings'));
915
+        }
916
+    }
917
+
918
+    /**
919
+     * Action handling methods
920
+     */
921
+
922
+    /**
923
+     * Return an associative array of post variables
924
+     * (could be selective based on expected variables)
925
+     *
926
+     * Does not filter as person installing the site should not be attempting
927
+     * XSS attacks. If filtering is added, it should not be done for passwords.
928
+     *
929
+     * @return array
930
+     */
931
+    protected function getPostVariables() {
932
+        $vars = [];
933
+        foreach ($_POST as $k => $v) {
934
+            $vars[$k] = $v;
935
+        }
936
+        return $vars;
937
+    }
938
+
939
+    /**
940
+     * If form is reshown, remember previously submitted variables
941
+     *
942
+     * @param array $formVars       Vars int he form
943
+     * @param array $submissionVars Submitted vars
944
+     *
945
+     * @return array
946
+     */
947
+    protected function makeFormSticky($formVars, $submissionVars) {
948
+        foreach ($submissionVars as $field => $value) {
949
+            $formVars[$field]['value'] = $value;
950
+        }
951
+        return $formVars;
952
+    }
953
+
954
+    /* Requirement checks support methods */
955
+
956
+    /**
957
+     * Indicates whether the webserver can add settings.php on its own or not.
958
+     *
959
+     * @param array $report The requirements report object
960
+     *
961
+     * @return bool
962
+     */
963
+    protected function isInstallDirWritable(&$report) {
964
+        $root = Directory\Local::root()->getPath();
965
+        $abs_path = \Elgg\Application::elggDir()->getPath('elgg-config');
966
+
967
+        if (0 === strpos($abs_path, $root)) {
968
+            $relative_path = substr($abs_path, strlen($root));
969
+        } else {
970
+            $relative_path = $abs_path;
971
+        }
972
+        $relative_path = rtrim($relative_path, '/\\');
973
+
974
+        $writable = is_writable(Directory\Local::root()->getPath('elgg-config'));
975
+        if (!$writable) {
976
+            $report['settings'] = [
977
+                [
978
+                    'severity' => 'failure',
979
+                    'message' => _elgg_services()->translator->translate('install:check:installdir', [$relative_path]),
980
+                ]
981
+            ];
982
+            return false;
983
+        }
984
+
985
+        return true;
986
+    }
987
+
988
+    /**
989
+     * Check that the settings file exists
990
+     *
991
+     * @param array $report The requirements report array
992
+     *
993
+     * @return bool
994
+     */
995
+    protected function checkSettingsFile(&$report = []) {
996
+        if (!file_exists($this->getSettingsPath())) {
997
+            return false;
998
+        }
999
+
1000
+        if (!is_readable($this->getSettingsPath())) {
1001
+            $report['settings'] = [
1002
+                [
1003
+                    'severity' => 'failure',
1004
+                    'message' => _elgg_services()->translator->translate('install:check:readsettings'),
1005
+                ]
1006
+            ];
1007
+        }
1008 1008
 		
1009
-		return true;
1010
-	}
1009
+        return true;
1010
+    }
1011 1011
 	
1012
-	/**
1013
-	 * Returns the path to the root settings.php file.
1014
-	 *
1015
-	 * @return string
1016
-	 */
1017
-	private function getSettingsPath() {
1018
-		return Directory\Local::root()->getPath("elgg-config/settings.php");
1019
-	}
1020
-
1021
-	/**
1022
-	 * Check version of PHP, extensions, and variables
1023
-	 *
1024
-	 * @param array $report The requirements report array
1025
-	 *
1026
-	 * @return void
1027
-	 */
1028
-	protected function checkPHP(&$report) {
1029
-		$phpReport = [];
1030
-
1031
-		$min_php_version = '5.6.0';
1032
-		if (version_compare(PHP_VERSION, $min_php_version, '<')) {
1033
-			$phpReport[] = [
1034
-				'severity' => 'failure',
1035
-				'message' => _elgg_services()->translator->translate('install:check:php:version', [$min_php_version, PHP_VERSION])
1036
-			];
1037
-		}
1038
-
1039
-		$this->checkPhpExtensions($phpReport);
1040
-
1041
-		$this->checkPhpDirectives($phpReport);
1042
-
1043
-		if (count($phpReport) == 0) {
1044
-			$phpReport[] = [
1045
-				'severity' => 'pass',
1046
-				'message' => _elgg_services()->translator->translate('install:check:php:success')
1047
-			];
1048
-		}
1049
-
1050
-		$report['php'] = $phpReport;
1051
-	}
1052
-
1053
-	/**
1054
-	 * Check the server's PHP extensions
1055
-	 *
1056
-	 * @param array $phpReport The PHP requirements report array
1057
-	 *
1058
-	 * @return void
1059
-	 */
1060
-	protected function checkPhpExtensions(&$phpReport) {
1061
-		$extensions = get_loaded_extensions();
1062
-		$requiredExtensions = [
1063
-			'pdo_mysql',
1064
-			'json',
1065
-			'xml',
1066
-			'gd',
1067
-		];
1068
-		foreach ($requiredExtensions as $extension) {
1069
-			if (!in_array($extension, $extensions)) {
1070
-				$phpReport[] = [
1071
-					'severity' => 'failure',
1072
-					'message' => _elgg_services()->translator->translate('install:check:php:extension', [$extension])
1073
-				];
1074
-			}
1075
-		}
1076
-
1077
-		$recommendedExtensions = [
1078
-			'mbstring',
1079
-		];
1080
-		foreach ($recommendedExtensions as $extension) {
1081
-			if (!in_array($extension, $extensions)) {
1082
-				$phpReport[] = [
1083
-					'severity' => 'warning',
1084
-					'message' => _elgg_services()->translator->translate('install:check:php:extension:recommend', [$extension])
1085
-				];
1086
-			}
1087
-		}
1088
-	}
1089
-
1090
-	/**
1091
-	 * Check PHP parameters
1092
-	 *
1093
-	 * @param array $phpReport The PHP requirements report array
1094
-	 *
1095
-	 * @return void
1096
-	 */
1097
-	protected function checkPhpDirectives(&$phpReport) {
1098
-		if (ini_get('open_basedir')) {
1099
-			$phpReport[] = [
1100
-				'severity' => 'warning',
1101
-				'message' => _elgg_services()->translator->translate("install:check:php:open_basedir")
1102
-			];
1103
-		}
1104
-
1105
-		if (ini_get('safe_mode')) {
1106
-			$phpReport[] = [
1107
-				'severity' => 'warning',
1108
-				'message' => _elgg_services()->translator->translate("install:check:php:safe_mode")
1109
-			];
1110
-		}
1111
-
1112
-		if (ini_get('arg_separator.output') !== '&') {
1113
-			$separator = htmlspecialchars(ini_get('arg_separator.output'));
1114
-			$msg = _elgg_services()->translator->translate("install:check:php:arg_separator", [$separator]);
1115
-			$phpReport[] = [
1116
-				'severity' => 'failure',
1117
-				'message' => $msg,
1118
-			];
1119
-		}
1120
-
1121
-		if (ini_get('register_globals')) {
1122
-			$phpReport[] = [
1123
-				'severity' => 'failure',
1124
-				'message' => _elgg_services()->translator->translate("install:check:php:register_globals")
1125
-			];
1126
-		}
1127
-
1128
-		if (ini_get('session.auto_start')) {
1129
-			$phpReport[] = [
1130
-				'severity' => 'failure',
1131
-				'message' => _elgg_services()->translator->translate("install:check:php:session.auto_start")
1132
-			];
1133
-		}
1134
-	}
1135
-
1136
-	/**
1137
-	 * Confirm that the rewrite rules are firing
1138
-	 *
1139
-	 * @param array $report The requirements report array
1140
-	 *
1141
-	 * @return void
1142
-	 */
1143
-	protected function checkRewriteRules(&$report) {
1144
-		$tester = new ElggRewriteTester();
1145
-		$url = _elgg_services()->config->getSiteUrl() . "rewrite.php";
1146
-		$report['rewrite'] = [$tester->run($url, Directory\Local::root()->getPath())];
1147
-	}
1148
-
1149
-	/**
1150
-	 * Check if the request is coming from the URL rewrite test on the
1151
-	 * requirements page.
1152
-	 *
1153
-	 * @return void
1154
-	 */
1155
-	protected function processRewriteTest() {
1156
-		if (strpos($_SERVER['REQUEST_URI'], 'rewrite.php') !== false) {
1157
-			echo \Elgg\Application::REWRITE_TEST_OUTPUT;
1158
-			exit;
1159
-		}
1160
-	}
1161
-
1162
-	/**
1163
-	 * Count the number of failures in the requirements report
1164
-	 *
1165
-	 * @param array  $report    The requirements report array
1166
-	 * @param string $condition 'failure' or 'warning'
1167
-	 *
1168
-	 * @return int
1169
-	 */
1170
-	protected function countNumConditions($report, $condition) {
1171
-		$count = 0;
1172
-		foreach ($report as $category => $checks) {
1173
-			foreach ($checks as $check) {
1174
-				if ($check['severity'] === $condition) {
1175
-					$count++;
1176
-				}
1177
-			}
1178
-		}
1179
-
1180
-		return $count;
1181
-	}
1182
-
1183
-
1184
-	/**
1185
-	 * Database support methods
1186
-	 */
1187
-
1188
-	/**
1189
-	 * Validate the variables for the database step
1190
-	 *
1191
-	 * @param array $submissionVars Submitted vars
1192
-	 * @param array $formVars       Vars in the form
1193
-	 *
1194
-	 * @return bool
1195
-	 */
1196
-	protected function validateDatabaseVars($submissionVars, $formVars) {
1197
-
1198
-		foreach ($formVars as $field => $info) {
1199
-			if ($info['required'] == true && !$submissionVars[$field]) {
1200
-				$name = _elgg_services()->translator->translate("install:database:label:$field");
1201
-				register_error(_elgg_services()->translator->translate('install:error:requiredfield', [$name]));
1202
-				return false;
1203
-			}
1204
-		}
1205
-
1206
-		// check that data root is absolute path
1207
-		if (stripos(PHP_OS, 'win') === 0) {
1208
-			if (strpos($submissionVars['dataroot'], ':') !== 1) {
1209
-				$msg = _elgg_services()->translator->translate('install:error:relative_path', [$submissionVars['dataroot']]);
1210
-				register_error($msg);
1211
-				return false;
1212
-			}
1213
-		} else {
1214
-			if (strpos($submissionVars['dataroot'], '/') !== 0) {
1215
-				$msg = _elgg_services()->translator->translate('install:error:relative_path', [$submissionVars['dataroot']]);
1216
-				register_error($msg);
1217
-				return false;
1218
-			}
1219
-		}
1220
-
1221
-		// check that data root exists
1222
-		if (!is_dir($submissionVars['dataroot'])) {
1223
-			$msg = _elgg_services()->translator->translate('install:error:datadirectoryexists', [$submissionVars['dataroot']]);
1224
-			register_error($msg);
1225
-			return false;
1226
-		}
1227
-
1228
-		// check that data root is writable
1229
-		if (!is_writable($submissionVars['dataroot'])) {
1230
-			$msg = _elgg_services()->translator->translate('install:error:writedatadirectory', [$submissionVars['dataroot']]);
1231
-			register_error($msg);
1232
-			return false;
1233
-		}
1234
-
1235
-		if (!isset($this->CONFIG->data_dir_override) || !$this->CONFIG->data_dir_override) {
1236
-			// check that data root is not subdirectory of Elgg root
1237
-			if (stripos($submissionVars['dataroot'], $this->CONFIG->path) === 0) {
1238
-				$msg = _elgg_services()->translator->translate('install:error:locationdatadirectory', [$submissionVars['dataroot']]);
1239
-				register_error($msg);
1240
-				return false;
1241
-			}
1242
-		}
1243
-
1244
-		// according to postgres documentation: SQL identifiers and key words must
1245
-		// begin with a letter (a-z, but also letters with diacritical marks and
1246
-		// non-Latin letters) or an underscore (_). Subsequent characters in an
1247
-		// identifier or key word can be letters, underscores, digits (0-9), or dollar signs ($).
1248
-		// Refs #4994
1249
-		if (!preg_match("/^[a-zA-Z_][\w]*$/", $submissionVars['dbprefix'])) {
1250
-			register_error(_elgg_services()->translator->translate('install:error:database_prefix'));
1251
-			return false;
1252
-		}
1253
-
1254
-		return $this->checkDatabaseSettings(
1255
-					$submissionVars['dbuser'],
1256
-					$submissionVars['dbpassword'],
1257
-					$submissionVars['dbname'],
1258
-					$submissionVars['dbhost']
1259
-				);
1260
-	}
1261
-
1262
-	/**
1263
-	 * Confirm the settings for the database
1264
-	 *
1265
-	 * @param string $user     Username
1266
-	 * @param string $password Password
1267
-	 * @param string $dbname   Database name
1268
-	 * @param string $host     Host
1269
-	 *
1270
-	 * @return bool
1271
-	 */
1272
-	protected function checkDatabaseSettings($user, $password, $dbname, $host) {
1273
-		$config = new \Elgg\Database\Config((object) [
1274
-			'dbhost' => $host,
1275
-			'dbuser' => $user,
1276
-			'dbpass' => $password,
1277
-			'dbname' => $dbname,
1278
-			'dbencoding' => 'utf8mb4',
1279
-		]);
1280
-		$db = new \Elgg\Database($config);
1281
-
1282
-		try {
1283
-			$db->getDataRow("SELECT 1");
1284
-		} catch (DatabaseException $e) {
1285
-			if (0 === strpos($e->getMessage(), "Elgg couldn't connect")) {
1286
-				register_error(_elgg_services()->translator->translate('install:error:databasesettings'));
1287
-			} else {
1288
-				register_error(_elgg_services()->translator->translate('install:error:nodatabase', [$dbname]));
1289
-			}
1290
-			return false;
1291
-		}
1292
-
1293
-		// check MySQL version
1294
-		$version = $db->getServerVersion(\Elgg\Database\Config::READ_WRITE);
1295
-		if (version_compare($version, '5.5.3', '<')) {
1296
-			register_error(_elgg_services()->translator->translate('install:error:oldmysql2', [$version]));
1297
-			return false;
1298
-		}
1299
-
1300
-		return true;
1301
-	}
1302
-
1303
-	/**
1304
-	 * Writes the settings file to the engine directory
1305
-	 *
1306
-	 * @param array $params Array of inputted params from the user
1307
-	 *
1308
-	 * @return bool
1309
-	 */
1310
-	protected function createSettingsFile($params) {
1311
-		$template = \Elgg\Application::elggDir()->getContents("elgg-config/settings.example.php");
1312
-		if (!$template) {
1313
-			register_error(_elgg_services()->translator->translate('install:error:readsettingsphp'));
1314
-			return false;
1315
-		}
1316
-
1317
-		foreach ($params as $k => $v) {
1318
-			$template = str_replace("{{" . $k . "}}", $v, $template);
1319
-		}
1320
-
1321
-		$result = file_put_contents($this->getSettingsPath(), $template);
1322
-		if (!$result) {
1323
-			register_error(_elgg_services()->translator->translate('install:error:writesettingphp'));
1324
-			return false;
1325
-		}
1326
-
1327
-		return true;
1328
-	}
1329
-
1330
-	/**
1331
-	 * Bootstrap database connection before entire engine is available
1332
-	 *
1333
-	 * @return bool
1334
-	 */
1335
-	protected function connectToDatabase() {
1336
-		if (!include_once($this->getSettingsPath())) {
1337
-			register_error('Elgg could not load the settings file. It does not exist or there is a file permissions issue.');
1338
-			return false;
1339
-		}
1340
-
1341
-		if (!include_once(\Elgg\Application::elggDir()->getPath("engine/lib/database.php"))) {
1342
-			register_error('Could not load database.php');
1343
-			return false;
1344
-		}
1345
-
1346
-		try {
1347
-			_elgg_services()->db->setupConnections();
1348
-		} catch (DatabaseException $e) {
1349
-			register_error($e->getMessage());
1350
-			return false;
1351
-		}
1352
-
1353
-		return true;
1354
-	}
1355
-
1356
-	/**
1357
-	 * Create the database tables
1358
-	 *
1359
-	 * @return bool
1360
-	 */
1361
-	protected function installDatabase() {
1362
-		try {
1363
-			_elgg_services()->db->runSqlScript(\Elgg\Application::elggDir()->getPath("/engine/schema/mysql.sql"));
1364
-		} catch (Exception $e) {
1365
-			$msg = $e->getMessage();
1366
-			if (strpos($msg, 'already exists')) {
1367
-				$msg = _elgg_services()->translator->translate('install:error:tables_exist');
1368
-			}
1369
-			register_error($msg);
1370
-			return false;
1371
-		}
1372
-
1373
-		return true;
1374
-	}
1375
-
1376
-	/**
1377
-	 * Site settings support methods
1378
-	 */
1379
-
1380
-	/**
1381
-	 * Create the data directory if requested
1382
-	 *
1383
-	 * @param array $submissionVars Submitted vars
1384
-	 * @param array $formVars       Variables in the form
1385
-	 *
1386
-	 * @return bool
1387
-	 */
1388
-	protected function createDataDirectory(&$submissionVars, $formVars) {
1389
-		// did the user have option of Elgg creating the data directory
1390
-		if ($formVars['dataroot']['type'] != 'combo') {
1391
-			return true;
1392
-		}
1393
-
1394
-		// did the user select the option
1395
-		if ($submissionVars['dataroot'] != 'dataroot-checkbox') {
1396
-			return true;
1397
-		}
1398
-
1399
-		$dir = sanitise_filepath($submissionVars['path']) . 'data';
1400
-		if (file_exists($dir) || mkdir($dir, 0700)) {
1401
-			$submissionVars['dataroot'] = $dir;
1402
-			if (!file_exists("$dir/.htaccess")) {
1403
-				$htaccess = "Order Deny,Allow\nDeny from All\n";
1404
-				if (!file_put_contents("$dir/.htaccess", $htaccess)) {
1405
-					return false;
1406
-				}
1407
-			}
1408
-			return true;
1409
-		}
1410
-
1411
-		return false;
1412
-	}
1413
-
1414
-	/**
1415
-	 * Validate the site settings form variables
1416
-	 *
1417
-	 * @param array $submissionVars Submitted vars
1418
-	 * @param array $formVars       Vars in the form
1419
-	 *
1420
-	 * @return bool
1421
-	 */
1422
-	protected function validateSettingsVars($submissionVars, $formVars) {
1423
-		foreach ($formVars as $field => $info) {
1424
-			$submissionVars[$field] = trim($submissionVars[$field]);
1425
-			if ($info['required'] == true && $submissionVars[$field] === '') {
1426
-				$name = _elgg_services()->translator->translate("install:settings:label:$field");
1427
-				register_error(_elgg_services()->translator->translate('install:error:requiredfield', [$name]));
1428
-				return false;
1429
-			}
1430
-		}
1431
-
1432
-		// check that email address is email address
1433
-		if ($submissionVars['siteemail'] && !is_email_address($submissionVars['siteemail'])) {
1434
-			$msg = _elgg_services()->translator->translate('install:error:emailaddress', [$submissionVars['siteemail']]);
1435
-			register_error($msg);
1436
-			return false;
1437
-		}
1438
-
1439
-		// @todo check that url is a url
1440
-		// @note filter_var cannot be used because it doesn't work on international urls
1441
-
1442
-		return true;
1443
-	}
1444
-
1445
-	/**
1446
-	 * Initialize the site including site entity, plugins, and configuration
1447
-	 *
1448
-	 * @param array $submissionVars Submitted vars
1449
-	 *
1450
-	 * @return bool
1451
-	 */
1452
-	protected function saveSiteSettings($submissionVars) {
1453
-		$site = new ElggSite();
1454
-		$site->name = strip_tags($submissionVars['sitename']);
1455
-		$site->access_id = ACCESS_PUBLIC;
1456
-		$site->email = $submissionVars['siteemail'];
1457
-		$guid = $site->save();
1458
-
1459
-		if ($guid !== 1) {
1460
-			register_error(_elgg_services()->translator->translate('install:error:createsite'));
1461
-			return false;
1462
-		}
1463
-
1464
-		// bootstrap site info
1465
-		$this->CONFIG->site_guid = 1;
1466
-		$this->CONFIG->site = $site;
1467
-
1468
-		_elgg_services()->configTable->set('installed', time());
1469
-		_elgg_services()->configTable->set('version', elgg_get_version());
1470
-		_elgg_services()->configTable->set('simplecache_enabled', 1);
1471
-		_elgg_services()->configTable->set('system_cache_enabled', 1);
1472
-		_elgg_services()->configTable->set('simplecache_lastupdate', time());
1473
-
1474
-		// new installations have run all the upgrades
1475
-		$upgrades = elgg_get_upgrade_files(\Elgg\Application::elggDir()->getPath("/engine/lib/upgrades/"));
1476
-		_elgg_services()->configTable->set('processed_upgrades', $upgrades);
1477
-
1478
-		_elgg_services()->configTable->set('view', 'default');
1479
-		_elgg_services()->configTable->set('language', 'en');
1480
-		_elgg_services()->configTable->set('default_access', $submissionVars['siteaccess']);
1481
-		_elgg_services()->configTable->set('allow_registration', true);
1482
-		_elgg_services()->configTable->set('walled_garden', false);
1483
-		_elgg_services()->configTable->set('allow_user_default_access', '');
1484
-		_elgg_services()->configTable->set('default_limit', 10);
1485
-		_elgg_services()->configTable->set('security_protect_upgrade', true);
1486
-		_elgg_services()->configTable->set('security_notify_admins', true);
1487
-		_elgg_services()->configTable->set('security_notify_user_password', true);
1488
-		_elgg_services()->configTable->set('security_email_require_password', true);
1489
-
1490
-		$this->setSubtypeClasses();
1491
-
1492
-		$this->enablePlugins();
1493
-
1494
-		return true;
1495
-	}
1496
-
1497
-	/**
1498
-	 * Register classes for core objects
1499
-	 *
1500
-	 * @return void
1501
-	 */
1502
-	protected function setSubtypeClasses() {
1503
-		add_subtype("object", "plugin", "ElggPlugin");
1504
-		add_subtype("object", "file", "ElggFile");
1505
-		add_subtype("object", "widget", "ElggWidget");
1506
-		add_subtype("object", "comment", "ElggComment");
1507
-		add_subtype("object", "elgg_upgrade", 'ElggUpgrade');
1508
-	}
1509
-
1510
-	/**
1511
-	 * Enable a set of default plugins
1512
-	 *
1513
-	 * @return void
1514
-	 */
1515
-	protected function enablePlugins() {
1516
-		_elgg_generate_plugin_entities();
1517
-		$plugins = elgg_get_plugins('any');
1518
-		foreach ($plugins as $plugin) {
1519
-			if ($plugin->getManifest()) {
1520
-				if ($plugin->getManifest()->getActivateOnInstall()) {
1521
-					$plugin->activate();
1522
-				}
1523
-				if (in_array('theme', $plugin->getManifest()->getCategories())) {
1524
-					$plugin->setPriority('last');
1525
-				}
1526
-			}
1527
-		}
1528
-	}
1529
-
1530
-	/**
1531
-	 * Admin account support methods
1532
-	 */
1533
-
1534
-	/**
1535
-	 * Validate account form variables
1536
-	 *
1537
-	 * @param array $submissionVars Submitted vars
1538
-	 * @param array $formVars       Form vars
1539
-	 *
1540
-	 * @return bool
1541
-	 */
1542
-	protected function validateAdminVars($submissionVars, $formVars) {
1543
-
1544
-		foreach ($formVars as $field => $info) {
1545
-			if ($info['required'] == true && !$submissionVars[$field]) {
1546
-				$name = _elgg_services()->translator->translate("install:admin:label:$field");
1547
-				register_error(_elgg_services()->translator->translate('install:error:requiredfield', [$name]));
1548
-				return false;
1549
-			}
1550
-		}
1551
-
1552
-		if ($submissionVars['password1'] !== $submissionVars['password2']) {
1553
-			register_error(_elgg_services()->translator->translate('install:admin:password:mismatch'));
1554
-			return false;
1555
-		}
1556
-
1557
-		if (trim($submissionVars['password1']) == "") {
1558
-			register_error(_elgg_services()->translator->translate('install:admin:password:empty'));
1559
-			return false;
1560
-		}
1561
-
1562
-		$minLength = _elgg_services()->configTable->get('min_password_length');
1563
-		if (strlen($submissionVars['password1']) < $minLength) {
1564
-			register_error(_elgg_services()->translator->translate('install:admin:password:tooshort'));
1565
-			return false;
1566
-		}
1567
-
1568
-		// check that email address is email address
1569
-		if ($submissionVars['email'] && !is_email_address($submissionVars['email'])) {
1570
-			$msg = _elgg_services()->translator->translate('install:error:emailaddress', [$submissionVars['email']]);
1571
-			register_error($msg);
1572
-			return false;
1573
-		}
1574
-
1575
-		return true;
1576
-	}
1577
-
1578
-	/**
1579
-	 * Create a user account for the admin
1580
-	 *
1581
-	 * @param array $submissionVars Submitted vars
1582
-	 * @param bool  $login          Login in the admin user?
1583
-	 *
1584
-	 * @return bool
1585
-	 */
1586
-	protected function createAdminAccount($submissionVars, $login = false) {
1587
-		try {
1588
-			$guid = register_user(
1589
-					$submissionVars['username'],
1590
-					$submissionVars['password1'],
1591
-					$submissionVars['displayname'],
1592
-					$submissionVars['email']
1593
-					);
1594
-		} catch (Exception $e) {
1595
-			register_error($e->getMessage());
1596
-			return false;
1597
-		}
1598
-
1599
-		if (!$guid) {
1600
-			register_error(_elgg_services()->translator->translate('install:admin:cannot_create'));
1601
-			return false;
1602
-		}
1603
-
1604
-		$user = get_entity($guid);
1605
-		if (!$user instanceof ElggUser) {
1606
-			register_error(_elgg_services()->translator->translate('install:error:loadadmin'));
1607
-			return false;
1608
-		}
1609
-
1610
-		elgg_set_ignore_access(true);
1611
-		if ($user->makeAdmin() == false) {
1612
-			register_error(_elgg_services()->translator->translate('install:error:adminaccess'));
1613
-		} else {
1614
-			_elgg_services()->configTable->set('admin_registered', 1);
1615
-		}
1616
-		elgg_set_ignore_access(false);
1617
-
1618
-		// add validation data to satisfy user validation plugins
1619
-		$user->validated = 1;
1620
-		$user->validated_method = 'admin_user';
1621
-
1622
-		if ($login) {
1623
-			$handler = new Elgg\Http\DatabaseSessionHandler(_elgg_services()->db);
1624
-
1625
-			// session.cache_limiter is unfortunately set to "" by the NativeSessionStorage constructor,
1626
-			// so we must capture and inject it directly.
1627
-			$options = [
1628
-				'cache_limiter' => session_cache_limiter(),
1629
-			];
1630
-			$storage = new Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage($options, $handler);
1631
-
1632
-			$session = new ElggSession(new Symfony\Component\HttpFoundation\Session\Session($storage));
1633
-			$session->setName('Elgg');
1634
-			_elgg_services()->setValue('session', $session);
1635
-			if (login($user) == false) {
1636
-				register_error(_elgg_services()->translator->translate('install:error:adminlogin'));
1637
-			}
1638
-		}
1639
-
1640
-		return true;
1641
-	}
1012
+    /**
1013
+     * Returns the path to the root settings.php file.
1014
+     *
1015
+     * @return string
1016
+     */
1017
+    private function getSettingsPath() {
1018
+        return Directory\Local::root()->getPath("elgg-config/settings.php");
1019
+    }
1020
+
1021
+    /**
1022
+     * Check version of PHP, extensions, and variables
1023
+     *
1024
+     * @param array $report The requirements report array
1025
+     *
1026
+     * @return void
1027
+     */
1028
+    protected function checkPHP(&$report) {
1029
+        $phpReport = [];
1030
+
1031
+        $min_php_version = '5.6.0';
1032
+        if (version_compare(PHP_VERSION, $min_php_version, '<')) {
1033
+            $phpReport[] = [
1034
+                'severity' => 'failure',
1035
+                'message' => _elgg_services()->translator->translate('install:check:php:version', [$min_php_version, PHP_VERSION])
1036
+            ];
1037
+        }
1038
+
1039
+        $this->checkPhpExtensions($phpReport);
1040
+
1041
+        $this->checkPhpDirectives($phpReport);
1042
+
1043
+        if (count($phpReport) == 0) {
1044
+            $phpReport[] = [
1045
+                'severity' => 'pass',
1046
+                'message' => _elgg_services()->translator->translate('install:check:php:success')
1047
+            ];
1048
+        }
1049
+
1050
+        $report['php'] = $phpReport;
1051
+    }
1052
+
1053
+    /**
1054
+     * Check the server's PHP extensions
1055
+     *
1056
+     * @param array $phpReport The PHP requirements report array
1057
+     *
1058
+     * @return void
1059
+     */
1060
+    protected function checkPhpExtensions(&$phpReport) {
1061
+        $extensions = get_loaded_extensions();
1062
+        $requiredExtensions = [
1063
+            'pdo_mysql',
1064
+            'json',
1065
+            'xml',
1066
+            'gd',
1067
+        ];
1068
+        foreach ($requiredExtensions as $extension) {
1069
+            if (!in_array($extension, $extensions)) {
1070
+                $phpReport[] = [
1071
+                    'severity' => 'failure',
1072
+                    'message' => _elgg_services()->translator->translate('install:check:php:extension', [$extension])
1073
+                ];
1074
+            }
1075
+        }
1076
+
1077
+        $recommendedExtensions = [
1078
+            'mbstring',
1079
+        ];
1080
+        foreach ($recommendedExtensions as $extension) {
1081
+            if (!in_array($extension, $extensions)) {
1082
+                $phpReport[] = [
1083
+                    'severity' => 'warning',
1084
+                    'message' => _elgg_services()->translator->translate('install:check:php:extension:recommend', [$extension])
1085
+                ];
1086
+            }
1087
+        }
1088
+    }
1089
+
1090
+    /**
1091
+     * Check PHP parameters
1092
+     *
1093
+     * @param array $phpReport The PHP requirements report array
1094
+     *
1095
+     * @return void
1096
+     */
1097
+    protected function checkPhpDirectives(&$phpReport) {
1098
+        if (ini_get('open_basedir')) {
1099
+            $phpReport[] = [
1100
+                'severity' => 'warning',
1101
+                'message' => _elgg_services()->translator->translate("install:check:php:open_basedir")
1102
+            ];
1103
+        }
1104
+
1105
+        if (ini_get('safe_mode')) {
1106
+            $phpReport[] = [
1107
+                'severity' => 'warning',
1108
+                'message' => _elgg_services()->translator->translate("install:check:php:safe_mode")
1109
+            ];
1110
+        }
1111
+
1112
+        if (ini_get('arg_separator.output') !== '&') {
1113
+            $separator = htmlspecialchars(ini_get('arg_separator.output'));
1114
+            $msg = _elgg_services()->translator->translate("install:check:php:arg_separator", [$separator]);
1115
+            $phpReport[] = [
1116
+                'severity' => 'failure',
1117
+                'message' => $msg,
1118
+            ];
1119
+        }
1120
+
1121
+        if (ini_get('register_globals')) {
1122
+            $phpReport[] = [
1123
+                'severity' => 'failure',
1124
+                'message' => _elgg_services()->translator->translate("install:check:php:register_globals")
1125
+            ];
1126
+        }
1127
+
1128
+        if (ini_get('session.auto_start')) {
1129
+            $phpReport[] = [
1130
+                'severity' => 'failure',
1131
+                'message' => _elgg_services()->translator->translate("install:check:php:session.auto_start")
1132
+            ];
1133
+        }
1134
+    }
1135
+
1136
+    /**
1137
+     * Confirm that the rewrite rules are firing
1138
+     *
1139
+     * @param array $report The requirements report array
1140
+     *
1141
+     * @return void
1142
+     */
1143
+    protected function checkRewriteRules(&$report) {
1144
+        $tester = new ElggRewriteTester();
1145
+        $url = _elgg_services()->config->getSiteUrl() . "rewrite.php";
1146
+        $report['rewrite'] = [$tester->run($url, Directory\Local::root()->getPath())];
1147
+    }
1148
+
1149
+    /**
1150
+     * Check if the request is coming from the URL rewrite test on the
1151
+     * requirements page.
1152
+     *
1153
+     * @return void
1154
+     */
1155
+    protected function processRewriteTest() {
1156
+        if (strpos($_SERVER['REQUEST_URI'], 'rewrite.php') !== false) {
1157
+            echo \Elgg\Application::REWRITE_TEST_OUTPUT;
1158
+            exit;
1159
+        }
1160
+    }
1161
+
1162
+    /**
1163
+     * Count the number of failures in the requirements report
1164
+     *
1165
+     * @param array  $report    The requirements report array
1166
+     * @param string $condition 'failure' or 'warning'
1167
+     *
1168
+     * @return int
1169
+     */
1170
+    protected function countNumConditions($report, $condition) {
1171
+        $count = 0;
1172
+        foreach ($report as $category => $checks) {
1173
+            foreach ($checks as $check) {
1174
+                if ($check['severity'] === $condition) {
1175
+                    $count++;
1176
+                }
1177
+            }
1178
+        }
1179
+
1180
+        return $count;
1181
+    }
1182
+
1183
+
1184
+    /**
1185
+     * Database support methods
1186
+     */
1187
+
1188
+    /**
1189
+     * Validate the variables for the database step
1190
+     *
1191
+     * @param array $submissionVars Submitted vars
1192
+     * @param array $formVars       Vars in the form
1193
+     *
1194
+     * @return bool
1195
+     */
1196
+    protected function validateDatabaseVars($submissionVars, $formVars) {
1197
+
1198
+        foreach ($formVars as $field => $info) {
1199
+            if ($info['required'] == true && !$submissionVars[$field]) {
1200
+                $name = _elgg_services()->translator->translate("install:database:label:$field");
1201
+                register_error(_elgg_services()->translator->translate('install:error:requiredfield', [$name]));
1202
+                return false;
1203
+            }
1204
+        }
1205
+
1206
+        // check that data root is absolute path
1207
+        if (stripos(PHP_OS, 'win') === 0) {
1208
+            if (strpos($submissionVars['dataroot'], ':') !== 1) {
1209
+                $msg = _elgg_services()->translator->translate('install:error:relative_path', [$submissionVars['dataroot']]);
1210
+                register_error($msg);
1211
+                return false;
1212
+            }
1213
+        } else {
1214
+            if (strpos($submissionVars['dataroot'], '/') !== 0) {
1215
+                $msg = _elgg_services()->translator->translate('install:error:relative_path', [$submissionVars['dataroot']]);
1216
+                register_error($msg);
1217
+                return false;
1218
+            }
1219
+        }
1220
+
1221
+        // check that data root exists
1222
+        if (!is_dir($submissionVars['dataroot'])) {
1223
+            $msg = _elgg_services()->translator->translate('install:error:datadirectoryexists', [$submissionVars['dataroot']]);
1224
+            register_error($msg);
1225
+            return false;
1226
+        }
1227
+
1228
+        // check that data root is writable
1229
+        if (!is_writable($submissionVars['dataroot'])) {
1230
+            $msg = _elgg_services()->translator->translate('install:error:writedatadirectory', [$submissionVars['dataroot']]);
1231
+            register_error($msg);
1232
+            return false;
1233
+        }
1234
+
1235
+        if (!isset($this->CONFIG->data_dir_override) || !$this->CONFIG->data_dir_override) {
1236
+            // check that data root is not subdirectory of Elgg root
1237
+            if (stripos($submissionVars['dataroot'], $this->CONFIG->path) === 0) {
1238
+                $msg = _elgg_services()->translator->translate('install:error:locationdatadirectory', [$submissionVars['dataroot']]);
1239
+                register_error($msg);
1240
+                return false;
1241
+            }
1242
+        }
1243
+
1244
+        // according to postgres documentation: SQL identifiers and key words must
1245
+        // begin with a letter (a-z, but also letters with diacritical marks and
1246
+        // non-Latin letters) or an underscore (_). Subsequent characters in an
1247
+        // identifier or key word can be letters, underscores, digits (0-9), or dollar signs ($).
1248
+        // Refs #4994
1249
+        if (!preg_match("/^[a-zA-Z_][\w]*$/", $submissionVars['dbprefix'])) {
1250
+            register_error(_elgg_services()->translator->translate('install:error:database_prefix'));
1251
+            return false;
1252
+        }
1253
+
1254
+        return $this->checkDatabaseSettings(
1255
+                    $submissionVars['dbuser'],
1256
+                    $submissionVars['dbpassword'],
1257
+                    $submissionVars['dbname'],
1258
+                    $submissionVars['dbhost']
1259
+                );
1260
+    }
1261
+
1262
+    /**
1263
+     * Confirm the settings for the database
1264
+     *
1265
+     * @param string $user     Username
1266
+     * @param string $password Password
1267
+     * @param string $dbname   Database name
1268
+     * @param string $host     Host
1269
+     *
1270
+     * @return bool
1271
+     */
1272
+    protected function checkDatabaseSettings($user, $password, $dbname, $host) {
1273
+        $config = new \Elgg\Database\Config((object) [
1274
+            'dbhost' => $host,
1275
+            'dbuser' => $user,
1276
+            'dbpass' => $password,
1277
+            'dbname' => $dbname,
1278
+            'dbencoding' => 'utf8mb4',
1279
+        ]);
1280
+        $db = new \Elgg\Database($config);
1281
+
1282
+        try {
1283
+            $db->getDataRow("SELECT 1");
1284
+        } catch (DatabaseException $e) {
1285
+            if (0 === strpos($e->getMessage(), "Elgg couldn't connect")) {
1286
+                register_error(_elgg_services()->translator->translate('install:error:databasesettings'));
1287
+            } else {
1288
+                register_error(_elgg_services()->translator->translate('install:error:nodatabase', [$dbname]));
1289
+            }
1290
+            return false;
1291
+        }
1292
+
1293
+        // check MySQL version
1294
+        $version = $db->getServerVersion(\Elgg\Database\Config::READ_WRITE);
1295
+        if (version_compare($version, '5.5.3', '<')) {
1296
+            register_error(_elgg_services()->translator->translate('install:error:oldmysql2', [$version]));
1297
+            return false;
1298
+        }
1299
+
1300
+        return true;
1301
+    }
1302
+
1303
+    /**
1304
+     * Writes the settings file to the engine directory
1305
+     *
1306
+     * @param array $params Array of inputted params from the user
1307
+     *
1308
+     * @return bool
1309
+     */
1310
+    protected function createSettingsFile($params) {
1311
+        $template = \Elgg\Application::elggDir()->getContents("elgg-config/settings.example.php");
1312
+        if (!$template) {
1313
+            register_error(_elgg_services()->translator->translate('install:error:readsettingsphp'));
1314
+            return false;
1315
+        }
1316
+
1317
+        foreach ($params as $k => $v) {
1318
+            $template = str_replace("{{" . $k . "}}", $v, $template);
1319
+        }
1320
+
1321
+        $result = file_put_contents($this->getSettingsPath(), $template);
1322
+        if (!$result) {
1323
+            register_error(_elgg_services()->translator->translate('install:error:writesettingphp'));
1324
+            return false;
1325
+        }
1326
+
1327
+        return true;
1328
+    }
1329
+
1330
+    /**
1331
+     * Bootstrap database connection before entire engine is available
1332
+     *
1333
+     * @return bool
1334
+     */
1335
+    protected function connectToDatabase() {
1336
+        if (!include_once($this->getSettingsPath())) {
1337
+            register_error('Elgg could not load the settings file. It does not exist or there is a file permissions issue.');
1338
+            return false;
1339
+        }
1340
+
1341
+        if (!include_once(\Elgg\Application::elggDir()->getPath("engine/lib/database.php"))) {
1342
+            register_error('Could not load database.php');
1343
+            return false;
1344
+        }
1345
+
1346
+        try {
1347
+            _elgg_services()->db->setupConnections();
1348
+        } catch (DatabaseException $e) {
1349
+            register_error($e->getMessage());
1350
+            return false;
1351
+        }
1352
+
1353
+        return true;
1354
+    }
1355
+
1356
+    /**
1357
+     * Create the database tables
1358
+     *
1359
+     * @return bool
1360
+     */
1361
+    protected function installDatabase() {
1362
+        try {
1363
+            _elgg_services()->db->runSqlScript(\Elgg\Application::elggDir()->getPath("/engine/schema/mysql.sql"));
1364
+        } catch (Exception $e) {
1365
+            $msg = $e->getMessage();
1366
+            if (strpos($msg, 'already exists')) {
1367
+                $msg = _elgg_services()->translator->translate('install:error:tables_exist');
1368
+            }
1369
+            register_error($msg);
1370
+            return false;
1371
+        }
1372
+
1373
+        return true;
1374
+    }
1375
+
1376
+    /**
1377
+     * Site settings support methods
1378
+     */
1379
+
1380
+    /**
1381
+     * Create the data directory if requested
1382
+     *
1383
+     * @param array $submissionVars Submitted vars
1384
+     * @param array $formVars       Variables in the form
1385
+     *
1386
+     * @return bool
1387
+     */
1388
+    protected function createDataDirectory(&$submissionVars, $formVars) {
1389
+        // did the user have option of Elgg creating the data directory
1390
+        if ($formVars['dataroot']['type'] != 'combo') {
1391
+            return true;
1392
+        }
1393
+
1394
+        // did the user select the option
1395
+        if ($submissionVars['dataroot'] != 'dataroot-checkbox') {
1396
+            return true;
1397
+        }
1398
+
1399
+        $dir = sanitise_filepath($submissionVars['path']) . 'data';
1400
+        if (file_exists($dir) || mkdir($dir, 0700)) {
1401
+            $submissionVars['dataroot'] = $dir;
1402
+            if (!file_exists("$dir/.htaccess")) {
1403
+                $htaccess = "Order Deny,Allow\nDeny from All\n";
1404
+                if (!file_put_contents("$dir/.htaccess", $htaccess)) {
1405
+                    return false;
1406
+                }
1407
+            }
1408
+            return true;
1409
+        }
1410
+
1411
+        return false;
1412
+    }
1413
+
1414
+    /**
1415
+     * Validate the site settings form variables
1416
+     *
1417
+     * @param array $submissionVars Submitted vars
1418
+     * @param array $formVars       Vars in the form
1419
+     *
1420
+     * @return bool
1421
+     */
1422
+    protected function validateSettingsVars($submissionVars, $formVars) {
1423
+        foreach ($formVars as $field => $info) {
1424
+            $submissionVars[$field] = trim($submissionVars[$field]);
1425
+            if ($info['required'] == true && $submissionVars[$field] === '') {
1426
+                $name = _elgg_services()->translator->translate("install:settings:label:$field");
1427
+                register_error(_elgg_services()->translator->translate('install:error:requiredfield', [$name]));
1428
+                return false;
1429
+            }
1430
+        }
1431
+
1432
+        // check that email address is email address
1433
+        if ($submissionVars['siteemail'] && !is_email_address($submissionVars['siteemail'])) {
1434
+            $msg = _elgg_services()->translator->translate('install:error:emailaddress', [$submissionVars['siteemail']]);
1435
+            register_error($msg);
1436
+            return false;
1437
+        }
1438
+
1439
+        // @todo check that url is a url
1440
+        // @note filter_var cannot be used because it doesn't work on international urls
1441
+
1442
+        return true;
1443
+    }
1444
+
1445
+    /**
1446
+     * Initialize the site including site entity, plugins, and configuration
1447
+     *
1448
+     * @param array $submissionVars Submitted vars
1449
+     *
1450
+     * @return bool
1451
+     */
1452
+    protected function saveSiteSettings($submissionVars) {
1453
+        $site = new ElggSite();
1454
+        $site->name = strip_tags($submissionVars['sitename']);
1455
+        $site->access_id = ACCESS_PUBLIC;
1456
+        $site->email = $submissionVars['siteemail'];
1457
+        $guid = $site->save();
1458
+
1459
+        if ($guid !== 1) {
1460
+            register_error(_elgg_services()->translator->translate('install:error:createsite'));
1461
+            return false;
1462
+        }
1463
+
1464
+        // bootstrap site info
1465
+        $this->CONFIG->site_guid = 1;
1466
+        $this->CONFIG->site = $site;
1467
+
1468
+        _elgg_services()->configTable->set('installed', time());
1469
+        _elgg_services()->configTable->set('version', elgg_get_version());
1470
+        _elgg_services()->configTable->set('simplecache_enabled', 1);
1471
+        _elgg_services()->configTable->set('system_cache_enabled', 1);
1472
+        _elgg_services()->configTable->set('simplecache_lastupdate', time());
1473
+
1474
+        // new installations have run all the upgrades
1475
+        $upgrades = elgg_get_upgrade_files(\Elgg\Application::elggDir()->getPath("/engine/lib/upgrades/"));
1476
+        _elgg_services()->configTable->set('processed_upgrades', $upgrades);
1477
+
1478
+        _elgg_services()->configTable->set('view', 'default');
1479
+        _elgg_services()->configTable->set('language', 'en');
1480
+        _elgg_services()->configTable->set('default_access', $submissionVars['siteaccess']);
1481
+        _elgg_services()->configTable->set('allow_registration', true);
1482
+        _elgg_services()->configTable->set('walled_garden', false);
1483
+        _elgg_services()->configTable->set('allow_user_default_access', '');
1484
+        _elgg_services()->configTable->set('default_limit', 10);
1485
+        _elgg_services()->configTable->set('security_protect_upgrade', true);
1486
+        _elgg_services()->configTable->set('security_notify_admins', true);
1487
+        _elgg_services()->configTable->set('security_notify_user_password', true);
1488
+        _elgg_services()->configTable->set('security_email_require_password', true);
1489
+
1490
+        $this->setSubtypeClasses();
1491
+
1492
+        $this->enablePlugins();
1493
+
1494
+        return true;
1495
+    }
1496
+
1497
+    /**
1498
+     * Register classes for core objects
1499
+     *
1500
+     * @return void
1501
+     */
1502
+    protected function setSubtypeClasses() {
1503
+        add_subtype("object", "plugin", "ElggPlugin");
1504
+        add_subtype("object", "file", "ElggFile");
1505
+        add_subtype("object", "widget", "ElggWidget");
1506
+        add_subtype("object", "comment", "ElggComment");
1507
+        add_subtype("object", "elgg_upgrade", 'ElggUpgrade');
1508
+    }
1509
+
1510
+    /**
1511
+     * Enable a set of default plugins
1512
+     *
1513
+     * @return void
1514
+     */
1515
+    protected function enablePlugins() {
1516
+        _elgg_generate_plugin_entities();
1517
+        $plugins = elgg_get_plugins('any');
1518
+        foreach ($plugins as $plugin) {
1519
+            if ($plugin->getManifest()) {
1520
+                if ($plugin->getManifest()->getActivateOnInstall()) {
1521
+                    $plugin->activate();
1522
+                }
1523
+                if (in_array('theme', $plugin->getManifest()->getCategories())) {
1524
+                    $plugin->setPriority('last');
1525
+                }
1526
+            }
1527
+        }
1528
+    }
1529
+
1530
+    /**
1531
+     * Admin account support methods
1532
+     */
1533
+
1534
+    /**
1535
+     * Validate account form variables
1536
+     *
1537
+     * @param array $submissionVars Submitted vars
1538
+     * @param array $formVars       Form vars
1539
+     *
1540
+     * @return bool
1541
+     */
1542
+    protected function validateAdminVars($submissionVars, $formVars) {
1543
+
1544
+        foreach ($formVars as $field => $info) {
1545
+            if ($info['required'] == true && !$submissionVars[$field]) {
1546
+                $name = _elgg_services()->translator->translate("install:admin:label:$field");
1547
+                register_error(_elgg_services()->translator->translate('install:error:requiredfield', [$name]));
1548
+                return false;
1549
+            }
1550
+        }
1551
+
1552
+        if ($submissionVars['password1'] !== $submissionVars['password2']) {
1553
+            register_error(_elgg_services()->translator->translate('install:admin:password:mismatch'));
1554
+            return false;
1555
+        }
1556
+
1557
+        if (trim($submissionVars['password1']) == "") {
1558
+            register_error(_elgg_services()->translator->translate('install:admin:password:empty'));
1559
+            return false;
1560
+        }
1561
+
1562
+        $minLength = _elgg_services()->configTable->get('min_password_length');
1563
+        if (strlen($submissionVars['password1']) < $minLength) {
1564
+            register_error(_elgg_services()->translator->translate('install:admin:password:tooshort'));
1565
+            return false;
1566
+        }
1567
+
1568
+        // check that email address is email address
1569
+        if ($submissionVars['email'] && !is_email_address($submissionVars['email'])) {
1570
+            $msg = _elgg_services()->translator->translate('install:error:emailaddress', [$submissionVars['email']]);
1571
+            register_error($msg);
1572
+            return false;
1573
+        }
1574
+
1575
+        return true;
1576
+    }
1577
+
1578
+    /**
1579
+     * Create a user account for the admin
1580
+     *
1581
+     * @param array $submissionVars Submitted vars
1582
+     * @param bool  $login          Login in the admin user?
1583
+     *
1584
+     * @return bool
1585
+     */
1586
+    protected function createAdminAccount($submissionVars, $login = false) {
1587
+        try {
1588
+            $guid = register_user(
1589
+                    $submissionVars['username'],
1590
+                    $submissionVars['password1'],
1591
+                    $submissionVars['displayname'],
1592
+                    $submissionVars['email']
1593
+                    );
1594
+        } catch (Exception $e) {
1595
+            register_error($e->getMessage());
1596
+            return false;
1597
+        }
1598
+
1599
+        if (!$guid) {
1600
+            register_error(_elgg_services()->translator->translate('install:admin:cannot_create'));
1601
+            return false;
1602
+        }
1603
+
1604
+        $user = get_entity($guid);
1605
+        if (!$user instanceof ElggUser) {
1606
+            register_error(_elgg_services()->translator->translate('install:error:loadadmin'));
1607
+            return false;
1608
+        }
1609
+
1610
+        elgg_set_ignore_access(true);
1611
+        if ($user->makeAdmin() == false) {
1612
+            register_error(_elgg_services()->translator->translate('install:error:adminaccess'));
1613
+        } else {
1614
+            _elgg_services()->configTable->set('admin_registered', 1);
1615
+        }
1616
+        elgg_set_ignore_access(false);
1617
+
1618
+        // add validation data to satisfy user validation plugins
1619
+        $user->validated = 1;
1620
+        $user->validated_method = 'admin_user';
1621
+
1622
+        if ($login) {
1623
+            $handler = new Elgg\Http\DatabaseSessionHandler(_elgg_services()->db);
1624
+
1625
+            // session.cache_limiter is unfortunately set to "" by the NativeSessionStorage constructor,
1626
+            // so we must capture and inject it directly.
1627
+            $options = [
1628
+                'cache_limiter' => session_cache_limiter(),
1629
+            ];
1630
+            $storage = new Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage($options, $handler);
1631
+
1632
+            $session = new ElggSession(new Symfony\Component\HttpFoundation\Session\Session($storage));
1633
+            $session->setName('Elgg');
1634
+            _elgg_services()->setValue('session', $session);
1635
+            if (login($user) == false) {
1636
+                register_error(_elgg_services()->translator->translate('install:error:adminlogin'));
1637
+            }
1638
+        }
1639
+
1640
+        return true;
1641
+    }
1642 1642
 }
Please login to merge, or discard this patch.
install/languages/nl.php 1 patch
Indentation   +137 added lines, -137 removed lines patch added patch discarded remove patch
@@ -1,159 +1,159 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3
-	'install:title' => 'Elgg installatie',
4
-	'install:welcome' => 'Welkom',
5
-	'install:requirements' => 'Nakijken van de vereisten',
6
-	'install:database' => 'Database-installatie',
7
-	'install:settings' => 'Configureer site',
8
-	'install:admin' => 'Maak een adminaccount aan',
9
-	'install:complete' => 'Afgerond',
3
+    'install:title' => 'Elgg installatie',
4
+    'install:welcome' => 'Welkom',
5
+    'install:requirements' => 'Nakijken van de vereisten',
6
+    'install:database' => 'Database-installatie',
7
+    'install:settings' => 'Configureer site',
8
+    'install:admin' => 'Maak een adminaccount aan',
9
+    'install:complete' => 'Afgerond',
10 10
 
11
-	'install:next' => 'Volgende',
12
-	'install:refresh' => 'Vernieuw',
11
+    'install:next' => 'Volgende',
12
+    'install:refresh' => 'Vernieuw',
13 13
 
14
-	'install:welcome:instructions' => "Elgg installeren bestaat uit 6 simpele stappen. Het lezen van deze welkomsttekst is de eerste!
14
+    'install:welcome:instructions' => "Elgg installeren bestaat uit 6 simpele stappen. Het lezen van deze welkomsttekst is de eerste!
15 15
 
16 16
 Als je het nog niet gedaan hebt, lees dan even de installatie-instructies door die meegeleverd zijn met Elgg (of klik op de link naar de instructies aan het einde van deze pagina).
17 17
 
18 18
 Klaar om door te gaan? Klik dan op 'Volgende'.",
19
-	'install:requirements:instructions:success' => "Jouw server voldoet aan de systeemeisen!",
20
-	'install:requirements:instructions:failure' => "Jouw server heeft de systeemeisentest niet doorstaan. Vernieuw de pagina nadat je onderstaande problemen hebt opgelost. Controleer de links met betrekking tot foutopsporing onderaan deze pagina als je hulp nodig hebt.",
21
-	'install:requirements:instructions:warning' => "Jouw server heeft de systeemeisentest doorstaan, maar er is minstens één waarschuwing. We raden je aan om de pagina met foutoplossingen te bekijken. ",
19
+    'install:requirements:instructions:success' => "Jouw server voldoet aan de systeemeisen!",
20
+    'install:requirements:instructions:failure' => "Jouw server heeft de systeemeisentest niet doorstaan. Vernieuw de pagina nadat je onderstaande problemen hebt opgelost. Controleer de links met betrekking tot foutopsporing onderaan deze pagina als je hulp nodig hebt.",
21
+    'install:requirements:instructions:warning' => "Jouw server heeft de systeemeisentest doorstaan, maar er is minstens één waarschuwing. We raden je aan om de pagina met foutoplossingen te bekijken. ",
22 22
 
23
-	'install:require:php' => 'PHP',
24
-	'install:require:rewrite' => 'Webserver',
25
-	'install:require:settings' => 'Instellingenbestand',
26
-	'install:require:database' => 'Database',
23
+    'install:require:php' => 'PHP',
24
+    'install:require:rewrite' => 'Webserver',
25
+    'install:require:settings' => 'Instellingenbestand',
26
+    'install:require:database' => 'Database',
27 27
 
28
-	'install:check:root' => 'Jouw webserver heeft geen toelating om een .htaccess bestand aan te maken in de hoofdfolder van Elgg. Je hebt twee keuzes:
28
+    'install:check:root' => 'Jouw webserver heeft geen toelating om een .htaccess bestand aan te maken in de hoofdfolder van Elgg. Je hebt twee keuzes:
29 29
 
30 30
 1. Verander de bevoegdheden van de hoofd folder.
31 31
 
32 32
 2. Kopieer het bestand install/config/htaccess.dist naar .htaccess',
33 33
 
34
-	'install:check:php:version' => 'Elgg vereist PHP-versie %s of nieuwer. Jouw server gebruikt versie %s.',
35
-	'install:check:php:extension' => 'Elgg vereist de PHP-uitbreiding %s.',
36
-	'install:check:php:extension:recommend' => 'We raden aan om de PHP-uitbreiding %s te installeren.',
37
-	'install:check:php:open_basedir' => 'De open_basedir PHP-aanwijzing kan voorkomen dat Elgg bestanden in de datamap opslaat.',
38
-	'install:check:php:safe_mode' => 'We raden het af om PHP in veilige modus te draaien. Dat kan problemen met Elgg veroorzaken. ',
39
-	'install:check:php:arg_separator' => 'arg_separator.output moet & zijn om Elgg te laten werken. Jouw server is %s.',
40
-	'install:check:php:register_globals' => 'Register globals moet uitgeschakeld zijn.',
41
-	'install:check:php:session.auto_start' => "session.auto_start moet uitgeschakeld zijn om Elgg te laten werken. Verander de configuratie van je server of voeg deze richtlijn toe aan het .htaccess bestand van Elgg.",
34
+    'install:check:php:version' => 'Elgg vereist PHP-versie %s of nieuwer. Jouw server gebruikt versie %s.',
35
+    'install:check:php:extension' => 'Elgg vereist de PHP-uitbreiding %s.',
36
+    'install:check:php:extension:recommend' => 'We raden aan om de PHP-uitbreiding %s te installeren.',
37
+    'install:check:php:open_basedir' => 'De open_basedir PHP-aanwijzing kan voorkomen dat Elgg bestanden in de datamap opslaat.',
38
+    'install:check:php:safe_mode' => 'We raden het af om PHP in veilige modus te draaien. Dat kan problemen met Elgg veroorzaken. ',
39
+    'install:check:php:arg_separator' => 'arg_separator.output moet & zijn om Elgg te laten werken. Jouw server is %s.',
40
+    'install:check:php:register_globals' => 'Register globals moet uitgeschakeld zijn.',
41
+    'install:check:php:session.auto_start' => "session.auto_start moet uitgeschakeld zijn om Elgg te laten werken. Verander de configuratie van je server of voeg deze richtlijn toe aan het .htaccess bestand van Elgg.",
42 42
 
43
-	'install:check:installdir' => 'Jouw webserver heeft onvoldoende rechten om het settings.php bestand in de engine map aan te maken. Je hebt twee keuzes:
43
+    'install:check:installdir' => 'Jouw webserver heeft onvoldoende rechten om het settings.php bestand in de engine map aan te maken. Je hebt twee keuzes:
44 44
 
45 45
 1. Wijzig de bevoegdheden van de elgg-config map
46 46
 
47 47
 2. Kopieer het bestand %s/settings.example.php naar elgg-config/settings.php en volg de aanwijzingen in het bestand om je databasegegevens in te stellen.',
48
-	'install:check:readsettings' => 'Er staat een instellingenbestand in de installatie map, maar de webserver kan dit niet lezen. Je kunt het bestand verwijderen of de leesbevoegdheden ervan wijzigen.',
49
-
50
-	'install:check:php:success' => "De PHP van jouw webserver voldoet aan de eisen van Elgg.",
51
-	'install:check:rewrite:success' => 'De test voor de rewrite rules is geslaagd.',
52
-	'install:check:database' => 'De database-eisen worden gecontroleerd wanneer Elgg de database laadt.',
53
-
54
-	'install:database:instructions' => "Als je nog geen database aangemaakt hebt voor Elgg, doe dit dan nu. Daarna vul je de gegevens hieronder in om de database van Elgg te initialiseren.",
55
-	'install:database:error' => 'Er was een fout bij het aanmaken van de Elgg-database. De installatie kan niet verdergaan. Bekijk de boodschap hierboven en verhelp de problemen. Als je meer hulp nodig hebt, klik dan op de installatie hulplink hieronder of vraag hulp in de Elgg community-fora.',
56
-
57
-	'install:database:label:dbuser' =>  'Database gebruikersnaam',
58
-	'install:database:label:dbpassword' => 'Database wachtwoord',
59
-	'install:database:label:dbname' => 'Database naam',
60
-	'install:database:label:dbhost' => 'Database host',
61
-	'install:database:label:dbprefix' => 'Database table voorvoegsel',
62
-	'install:database:label:timezone' => "Tijdzone",
63
-
64
-	'install:database:help:dbuser' => 'De gebruiker die de volledige bevoegdheid heeft tot de MySQL-database die je aangemaakt hebt voor Elgg',
65
-	'install:database:help:dbpassword' => 'Wachtwoord voor de databasegebruiker hierboven',
66
-	'install:database:help:dbname' => 'Naam van de Elgg-database',
67
-	'install:database:help:dbhost' => 'Hostnaam van de MySQL-server (meestal localhost)',
68
-	'install:database:help:dbprefix' => "Het voorvoegsel dat voor alle tabellen van Elgg gebruikt wordt (meestal elgg_)",
69
-	'install:database:help:timezone' => "De standaard tijdzone waarin de site zal werken",
70
-
71
-	'install:settings:instructions' => 'We hebben wat informatie nodig over de site terwijl we Elgg configureren. Als je nog geen <a href="http://learn.elgg.org/en/1.x/intro/install.html#create-a-data-folder" target="_blank">datamap hebt aangemaakt</a> voor Elgg, moet je dit nu doen.',
72
-
73
-	'install:settings:label:sitename' => 'Sitenaam',
74
-	'install:settings:label:siteemail' => 'Site e-mailadres',
75
-	'install:database:label:wwwroot' => 'Site URL',
76
-	'install:settings:label:path' => 'Elgg installatiemap',
77
-	'install:database:label:dataroot' => 'Datamap',
78
-	'install:settings:label:language' => 'Sitetaal',
79
-	'install:settings:label:siteaccess' => 'Standaard toegangsniveau van de site',
80
-	'install:label:combo:dataroot' => 'Elgg maakt de datamap aan',
81
-
82
-	'install:settings:help:sitename' => 'De naam van je nieuwe Elgg site',
83
-	'install:settings:help:siteemail' => 'E-mail adres gebruikt door Elgg voor de communicatie met gebruikers ',
84
-	'install:database:help:wwwroot' => 'Het adres van de site (Elgg raadt dit meestal correct)',
85
-	'install:settings:help:path' => 'De map waar je de Elgg code opgeladen hebt (Elgg raadt dit meestal correct)',
86
-	'install:database:help:dataroot' => 'De map die je aanmaakte voor Elgg om bestanden op te slaan (de bevoegdheden van deze map zullen nagekeken worden als je op volgende klik). Dit moet een absoluut path zijn.',
87
-	'install:settings:help:dataroot:apache' => 'Je hebt de optie dat Elgg de datamap aanmaakt of Elgg gebruikt de map die jij al aanmaakte om gebruikers bestanden in op te slaan (de bevoegdheden van deze map zullen nagekeken worden als je op volgende klik)',
88
-	'install:settings:help:language' => 'De standaard taal van de site',
89
-	'install:settings:help:siteaccess' => 'Het standaard toegangsniveau voor nieuwe gegevens aangemaakt door gebruikers',
90
-
91
-	'install:admin:instructions' => "Nu is het tijd om een administrator account aan te maken.",
92
-
93
-	'install:admin:label:displayname' => 'Weergavenaam',
94
-	'install:admin:label:email' => 'E-mailadres',
95
-	'install:admin:label:username' => 'Gebruikersnaam',
96
-	'install:admin:label:password1' => 'Wachtwoord',
97
-	'install:admin:label:password2' => 'Wachtwoord opnieuw',
98
-
99
-	'install:admin:help:displayname' => 'De naam die weergegeven wordt op deze site voor dit account',
100
-	'install:admin:help:email' => '',
101
-	'install:admin:help:username' => 'Account gebruikersnaam gebruikt om in te loggen',
102
-	'install:admin:help:password1' => "Het wachtwoord van het account moet minimaal %u karakters lang zijn.",
103
-	'install:admin:help:password2' => 'Typ het wachtwoord nogmaals in om te bevestigen',
104
-
105
-	'install:admin:password:mismatch' => 'Wachtwoorden moeten gelijk zijn',
106
-	'install:admin:password:empty' => 'Wachtwoord mag niet leeg zijn',
107
-	'install:admin:password:tooshort' => 'Het wachtwoord is te kort',
108
-	'install:admin:cannot_create' => 'Een admin account kon niet aangemaakt worden.',
109
-
110
-	'install:complete:instructions' => 'Jouw Elgg site is nu klaar om gebruikt te worden. Klik op de knop hier onder om naar jouw site te gaan.',
111
-	'install:complete:gotosite' => 'Ga naar de site',
112
-
113
-	'InstallationException:UnknownStep' => '%s is een onbekende installatie stap.',
114
-	'InstallationException:MissingLibrary' => 'Kon %s niet laden',
115
-	'InstallationException:CannotLoadSettings' => 'Elgg kon het instellingen bestand niet laden. Ofwel bestaat het niet, ofwel is er een probleem met de bevoegdheden.',
116
-
117
-	'install:success:database' => 'Database is geïnstalleerd.',
118
-	'install:success:settings' => 'De site instellingen zijn opgeslagen.',
119
-	'install:success:admin' => 'Admin account is aangemaakt.',
120
-
121
-	'install:error:htaccess' => 'Er kon geen .htaccess bestand aangemaakt worden',
122
-	'install:error:settings' => 'Er kon geen instellingen bestand aangemaakt worden',
123
-	'install:error:databasesettings' => 'Kon met deze instellingen niet met de database verbinden.',
124
-	'install:error:database_prefix' => 'Ongeldige karakters in het database voorvoegsel',
125
-	'install:error:oldmysql2' => 'MySQL moet versie 5.5.3 zijn of hoger. Jouw server gebruikt %s.',
126
-	'install:error:nodatabase' => 'Niet mogelijk om database %s te gebruiken. Mogelijk bestaat hij niet.',
127
-	'install:error:cannotloadtables' => 'Kan de database tables niet laden',
128
-	'install:error:tables_exist' => 'Er bestaan alreeds Elgg tabellen in de database. Je moet eerst deze tabellen verwijderen of herstart de installatie en we zullen proberen deze tabellen te gebruiken. Om de installatie te herstarten verwijder \'?step=database\' uit de URL in de adresbalk van je browser en druk op Enter.',
129
-	'install:error:readsettingsphp' => 'Kan /elgg-config/settings.example.php niet lezen',
130
-	'install:error:writesettingphp' => 'Kan niet naar /elgg-config/settings.php schrijven',
131
-	'install:error:requiredfield' => '%s is vereist',
132
-	'install:error:relative_path' => 'We denken dat "%s" niet een absoluut pad is naar je data map',
133
-	'install:error:datadirectoryexists' => 'Je data map %s bestaat niet.',
134
-	'install:error:writedatadirectory' => 'Je data map %s is niet schrijfbaar door de webserver.',
135
-	'install:error:locationdatadirectory' => 'Je data map %s moet buiten je installatie pad staan voor veiligheidsredenen.',
136
-	'install:error:emailaddress' => '%s is geen geldig e-mailadres',
137
-	'install:error:createsite' => 'Kan site niet aanmaken',
138
-	'install:error:savesitesettings' => 'Site instellingen konden niet worden opgeslagen',
139
-	'install:error:loadadmin' => 'De admin gebruiker kan niet worden ingeladen.',
140
-	'install:error:adminaccess' => 'Het is niet gelukt om het nieuwe account beheerrechten te geven.',
141
-	'install:error:adminlogin' => 'De beheerder kon niet automatisch worden aangemeld.',
142
-	'install:error:rewrite:apache' => 'We denken dat je server op Apache draait.',
143
-	'install:error:rewrite:nginx' => 'We denken dat je server op Nginx draait.',
144
-	'install:error:rewrite:lighttpd' => 'We denken dat je server op Lighttpd draait.',
145
-	'install:error:rewrite:iis' => 'We denken dat je server op IIS draait.',
146
-	'install:error:rewrite:allowoverride' => "De rewrite test is mislukt en de meest waarschijnlijke reden is dat AllowOverride niet op All is ingesteld voor de map van Elgg. Dit weerhoudt Apache ervan om het .htaccess bestand te verwerken. Hierin staat de rewrite regels.				\n\nEen minder waarschijnlijke reden is dat Apache geconfigureerd is met een alias voor de Elgg map and dat je RewriteBase in het .htaccess bestand moet instellen. Aanvullende instructies kun je in het .htaccess bestand in de Elgg map terugvinden.",
147
-	'install:error:rewrite:htaccess:write_permission' => 'Je webserver heeft onvoldoende rechten om een .htaccess-bestand in de hoofdmap van Elgg te plaatsen. Je zult handmatig het bestand vanuit install/config/htaccess.dist naar .htaccess moeten kopiëren of je moet de rechten op de installatie map aanpassen.',
148
-	'install:error:rewrite:htaccess:read_permission' => 'Er is een .htaccess bestand in de Elgg map, maar de webserver mag het niet lezen.',
149
-	'install:error:rewrite:htaccess:non_elgg_htaccess' => 'Er is een .htaccess bestand in de Elgg map, maar die is niet door Elgg aangemaakt. Verwijder het bestand.',
150
-	'install:error:rewrite:htaccess:old_elgg_htaccess' => 'Het lijkt er op dat er een oude versie van Elgg\'s .htaccess bestand in de Elgg map staat. Het bevat niet de rewrite rule zodat de webserver getest kan worden.',
151
-	'install:error:rewrite:htaccess:cannot_copy' => 'Een onbekende fout is opgetreden tijdens het aanmaken van het .htaccess bestand. Je zult deze handmatig vanuit install/config/htaccess.dist naar .htaccess moeten kopieren.',
152
-	'install:error:rewrite:altserver' => 'De rewrite rules test is mislukt. Je moet de webserver configureren met de juiste rewrite rules en het opnieuw proberen.',
153
-	'install:error:rewrite:unknown' => 'Oef. We kunnen niet bepalen welke webserver op je site draait en de rewrite rules test is gefaald. We kunnen je geen specifiek advies geven om het op te lossen. Check de troubleshooting link voor meer informatie.',
154
-	'install:warning:rewrite:unknown' => 'Je server ondersteunt niet het automatisch testen van de rewrite rules en je browser ondersteunt niet de controle via JavaScript. Je kunt de installatie vervolgen, maar je kunt problemen met je site ervaren. Je kunt de rewrite rules handmatig testen via deze link: <a href="%s" target="_blank">test</a>. Je zult het woord success zien als het werkt.',
48
+    'install:check:readsettings' => 'Er staat een instellingenbestand in de installatie map, maar de webserver kan dit niet lezen. Je kunt het bestand verwijderen of de leesbevoegdheden ervan wijzigen.',
49
+
50
+    'install:check:php:success' => "De PHP van jouw webserver voldoet aan de eisen van Elgg.",
51
+    'install:check:rewrite:success' => 'De test voor de rewrite rules is geslaagd.',
52
+    'install:check:database' => 'De database-eisen worden gecontroleerd wanneer Elgg de database laadt.',
53
+
54
+    'install:database:instructions' => "Als je nog geen database aangemaakt hebt voor Elgg, doe dit dan nu. Daarna vul je de gegevens hieronder in om de database van Elgg te initialiseren.",
55
+    'install:database:error' => 'Er was een fout bij het aanmaken van de Elgg-database. De installatie kan niet verdergaan. Bekijk de boodschap hierboven en verhelp de problemen. Als je meer hulp nodig hebt, klik dan op de installatie hulplink hieronder of vraag hulp in de Elgg community-fora.',
56
+
57
+    'install:database:label:dbuser' =>  'Database gebruikersnaam',
58
+    'install:database:label:dbpassword' => 'Database wachtwoord',
59
+    'install:database:label:dbname' => 'Database naam',
60
+    'install:database:label:dbhost' => 'Database host',
61
+    'install:database:label:dbprefix' => 'Database table voorvoegsel',
62
+    'install:database:label:timezone' => "Tijdzone",
63
+
64
+    'install:database:help:dbuser' => 'De gebruiker die de volledige bevoegdheid heeft tot de MySQL-database die je aangemaakt hebt voor Elgg',
65
+    'install:database:help:dbpassword' => 'Wachtwoord voor de databasegebruiker hierboven',
66
+    'install:database:help:dbname' => 'Naam van de Elgg-database',
67
+    'install:database:help:dbhost' => 'Hostnaam van de MySQL-server (meestal localhost)',
68
+    'install:database:help:dbprefix' => "Het voorvoegsel dat voor alle tabellen van Elgg gebruikt wordt (meestal elgg_)",
69
+    'install:database:help:timezone' => "De standaard tijdzone waarin de site zal werken",
70
+
71
+    'install:settings:instructions' => 'We hebben wat informatie nodig over de site terwijl we Elgg configureren. Als je nog geen <a href="http://learn.elgg.org/en/1.x/intro/install.html#create-a-data-folder" target="_blank">datamap hebt aangemaakt</a> voor Elgg, moet je dit nu doen.',
72
+
73
+    'install:settings:label:sitename' => 'Sitenaam',
74
+    'install:settings:label:siteemail' => 'Site e-mailadres',
75
+    'install:database:label:wwwroot' => 'Site URL',
76
+    'install:settings:label:path' => 'Elgg installatiemap',
77
+    'install:database:label:dataroot' => 'Datamap',
78
+    'install:settings:label:language' => 'Sitetaal',
79
+    'install:settings:label:siteaccess' => 'Standaard toegangsniveau van de site',
80
+    'install:label:combo:dataroot' => 'Elgg maakt de datamap aan',
81
+
82
+    'install:settings:help:sitename' => 'De naam van je nieuwe Elgg site',
83
+    'install:settings:help:siteemail' => 'E-mail adres gebruikt door Elgg voor de communicatie met gebruikers ',
84
+    'install:database:help:wwwroot' => 'Het adres van de site (Elgg raadt dit meestal correct)',
85
+    'install:settings:help:path' => 'De map waar je de Elgg code opgeladen hebt (Elgg raadt dit meestal correct)',
86
+    'install:database:help:dataroot' => 'De map die je aanmaakte voor Elgg om bestanden op te slaan (de bevoegdheden van deze map zullen nagekeken worden als je op volgende klik). Dit moet een absoluut path zijn.',
87
+    'install:settings:help:dataroot:apache' => 'Je hebt de optie dat Elgg de datamap aanmaakt of Elgg gebruikt de map die jij al aanmaakte om gebruikers bestanden in op te slaan (de bevoegdheden van deze map zullen nagekeken worden als je op volgende klik)',
88
+    'install:settings:help:language' => 'De standaard taal van de site',
89
+    'install:settings:help:siteaccess' => 'Het standaard toegangsniveau voor nieuwe gegevens aangemaakt door gebruikers',
90
+
91
+    'install:admin:instructions' => "Nu is het tijd om een administrator account aan te maken.",
92
+
93
+    'install:admin:label:displayname' => 'Weergavenaam',
94
+    'install:admin:label:email' => 'E-mailadres',
95
+    'install:admin:label:username' => 'Gebruikersnaam',
96
+    'install:admin:label:password1' => 'Wachtwoord',
97
+    'install:admin:label:password2' => 'Wachtwoord opnieuw',
98
+
99
+    'install:admin:help:displayname' => 'De naam die weergegeven wordt op deze site voor dit account',
100
+    'install:admin:help:email' => '',
101
+    'install:admin:help:username' => 'Account gebruikersnaam gebruikt om in te loggen',
102
+    'install:admin:help:password1' => "Het wachtwoord van het account moet minimaal %u karakters lang zijn.",
103
+    'install:admin:help:password2' => 'Typ het wachtwoord nogmaals in om te bevestigen',
104
+
105
+    'install:admin:password:mismatch' => 'Wachtwoorden moeten gelijk zijn',
106
+    'install:admin:password:empty' => 'Wachtwoord mag niet leeg zijn',
107
+    'install:admin:password:tooshort' => 'Het wachtwoord is te kort',
108
+    'install:admin:cannot_create' => 'Een admin account kon niet aangemaakt worden.',
109
+
110
+    'install:complete:instructions' => 'Jouw Elgg site is nu klaar om gebruikt te worden. Klik op de knop hier onder om naar jouw site te gaan.',
111
+    'install:complete:gotosite' => 'Ga naar de site',
112
+
113
+    'InstallationException:UnknownStep' => '%s is een onbekende installatie stap.',
114
+    'InstallationException:MissingLibrary' => 'Kon %s niet laden',
115
+    'InstallationException:CannotLoadSettings' => 'Elgg kon het instellingen bestand niet laden. Ofwel bestaat het niet, ofwel is er een probleem met de bevoegdheden.',
116
+
117
+    'install:success:database' => 'Database is geïnstalleerd.',
118
+    'install:success:settings' => 'De site instellingen zijn opgeslagen.',
119
+    'install:success:admin' => 'Admin account is aangemaakt.',
120
+
121
+    'install:error:htaccess' => 'Er kon geen .htaccess bestand aangemaakt worden',
122
+    'install:error:settings' => 'Er kon geen instellingen bestand aangemaakt worden',
123
+    'install:error:databasesettings' => 'Kon met deze instellingen niet met de database verbinden.',
124
+    'install:error:database_prefix' => 'Ongeldige karakters in het database voorvoegsel',
125
+    'install:error:oldmysql2' => 'MySQL moet versie 5.5.3 zijn of hoger. Jouw server gebruikt %s.',
126
+    'install:error:nodatabase' => 'Niet mogelijk om database %s te gebruiken. Mogelijk bestaat hij niet.',
127
+    'install:error:cannotloadtables' => 'Kan de database tables niet laden',
128
+    'install:error:tables_exist' => 'Er bestaan alreeds Elgg tabellen in de database. Je moet eerst deze tabellen verwijderen of herstart de installatie en we zullen proberen deze tabellen te gebruiken. Om de installatie te herstarten verwijder \'?step=database\' uit de URL in de adresbalk van je browser en druk op Enter.',
129
+    'install:error:readsettingsphp' => 'Kan /elgg-config/settings.example.php niet lezen',
130
+    'install:error:writesettingphp' => 'Kan niet naar /elgg-config/settings.php schrijven',
131
+    'install:error:requiredfield' => '%s is vereist',
132
+    'install:error:relative_path' => 'We denken dat "%s" niet een absoluut pad is naar je data map',
133
+    'install:error:datadirectoryexists' => 'Je data map %s bestaat niet.',
134
+    'install:error:writedatadirectory' => 'Je data map %s is niet schrijfbaar door de webserver.',
135
+    'install:error:locationdatadirectory' => 'Je data map %s moet buiten je installatie pad staan voor veiligheidsredenen.',
136
+    'install:error:emailaddress' => '%s is geen geldig e-mailadres',
137
+    'install:error:createsite' => 'Kan site niet aanmaken',
138
+    'install:error:savesitesettings' => 'Site instellingen konden niet worden opgeslagen',
139
+    'install:error:loadadmin' => 'De admin gebruiker kan niet worden ingeladen.',
140
+    'install:error:adminaccess' => 'Het is niet gelukt om het nieuwe account beheerrechten te geven.',
141
+    'install:error:adminlogin' => 'De beheerder kon niet automatisch worden aangemeld.',
142
+    'install:error:rewrite:apache' => 'We denken dat je server op Apache draait.',
143
+    'install:error:rewrite:nginx' => 'We denken dat je server op Nginx draait.',
144
+    'install:error:rewrite:lighttpd' => 'We denken dat je server op Lighttpd draait.',
145
+    'install:error:rewrite:iis' => 'We denken dat je server op IIS draait.',
146
+    'install:error:rewrite:allowoverride' => "De rewrite test is mislukt en de meest waarschijnlijke reden is dat AllowOverride niet op All is ingesteld voor de map van Elgg. Dit weerhoudt Apache ervan om het .htaccess bestand te verwerken. Hierin staat de rewrite regels.				\n\nEen minder waarschijnlijke reden is dat Apache geconfigureerd is met een alias voor de Elgg map and dat je RewriteBase in het .htaccess bestand moet instellen. Aanvullende instructies kun je in het .htaccess bestand in de Elgg map terugvinden.",
147
+    'install:error:rewrite:htaccess:write_permission' => 'Je webserver heeft onvoldoende rechten om een .htaccess-bestand in de hoofdmap van Elgg te plaatsen. Je zult handmatig het bestand vanuit install/config/htaccess.dist naar .htaccess moeten kopiëren of je moet de rechten op de installatie map aanpassen.',
148
+    'install:error:rewrite:htaccess:read_permission' => 'Er is een .htaccess bestand in de Elgg map, maar de webserver mag het niet lezen.',
149
+    'install:error:rewrite:htaccess:non_elgg_htaccess' => 'Er is een .htaccess bestand in de Elgg map, maar die is niet door Elgg aangemaakt. Verwijder het bestand.',
150
+    'install:error:rewrite:htaccess:old_elgg_htaccess' => 'Het lijkt er op dat er een oude versie van Elgg\'s .htaccess bestand in de Elgg map staat. Het bevat niet de rewrite rule zodat de webserver getest kan worden.',
151
+    'install:error:rewrite:htaccess:cannot_copy' => 'Een onbekende fout is opgetreden tijdens het aanmaken van het .htaccess bestand. Je zult deze handmatig vanuit install/config/htaccess.dist naar .htaccess moeten kopieren.',
152
+    'install:error:rewrite:altserver' => 'De rewrite rules test is mislukt. Je moet de webserver configureren met de juiste rewrite rules en het opnieuw proberen.',
153
+    'install:error:rewrite:unknown' => 'Oef. We kunnen niet bepalen welke webserver op je site draait en de rewrite rules test is gefaald. We kunnen je geen specifiek advies geven om het op te lossen. Check de troubleshooting link voor meer informatie.',
154
+    'install:warning:rewrite:unknown' => 'Je server ondersteunt niet het automatisch testen van de rewrite rules en je browser ondersteunt niet de controle via JavaScript. Je kunt de installatie vervolgen, maar je kunt problemen met je site ervaren. Je kunt de rewrite rules handmatig testen via deze link: <a href="%s" target="_blank">test</a>. Je zult het woord success zien als het werkt.',
155 155
 	
156
-	// Bring over some error messages you might see in setup
157
-	'exception:contact_admin' => 'Er is een onherstelbare fout opgetreden en gelogd. Indien je de beheerder bent, controleer je settings bestand. Ben je geen beheerder, neem dan contact op met een sitebeheerder met de volgende informatie:',
158
-	'DatabaseException:WrongCredentials' => "Elgg kan met deze instellingen niet met de database verbinden. Controleer het settings bestand.",
156
+    // Bring over some error messages you might see in setup
157
+    'exception:contact_admin' => 'Er is een onherstelbare fout opgetreden en gelogd. Indien je de beheerder bent, controleer je settings bestand. Ben je geen beheerder, neem dan contact op met een sitebeheerder met de volgende informatie:',
158
+    'DatabaseException:WrongCredentials' => "Elgg kan met deze instellingen niet met de database verbinden. Controleer het settings bestand.",
159 159
 ];
Please login to merge, or discard this patch.
install/languages/pt_BR.php 1 patch
Indentation   +137 added lines, -137 removed lines patch added patch discarded remove patch
@@ -1,160 +1,160 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3
-	'install:title' => 'Instalação do Elgg',
4
-	'install:welcome' => 'Bem-vindo',
5
-	'install:requirements' => 'Verificando requisitos',
6
-	'install:database' => 'Instalação do Banco de Dados',
7
-	'install:settings' => 'Configurar o site',
8
-	'install:admin' => 'Criar conta do administrador',
9
-	'install:complete' => 'Finalizado',
3
+    'install:title' => 'Instalação do Elgg',
4
+    'install:welcome' => 'Bem-vindo',
5
+    'install:requirements' => 'Verificando requisitos',
6
+    'install:database' => 'Instalação do Banco de Dados',
7
+    'install:settings' => 'Configurar o site',
8
+    'install:admin' => 'Criar conta do administrador',
9
+    'install:complete' => 'Finalizado',
10 10
 
11
-	'install:next' => 'Proximo',
12
-	'install:refresh' => 'Atualiza',
11
+    'install:next' => 'Proximo',
12
+    'install:refresh' => 'Atualiza',
13 13
 
14
-	'install:welcome:instructions' => "A instalacao do Elgg possui 6 fases simples e ler esta mensagem de boas vindas e o primeiro passo!
14
+    'install:welcome:instructions' => "A instalacao do Elgg possui 6 fases simples e ler esta mensagem de boas vindas e o primeiro passo!
15 15
 
16 16
 Se você ainda não fez, leia através da instalação as instrucoes incluidas com Elgg (ou clique no link de instrucoes no final da pagina).
17 17
 
18 18
 Se você está pronto para prosseguir, clique no botão PROXIMO.",
19
-	'install:requirements:instructions:success' => "Seu servidor passou na verificacao de requisitos.",
20
-	'install:requirements:instructions:failure' => "Seu servidor falhou na verificacao de requisitos. Depois que voce corrigir as situacoes apontadas abaixo, atualize a pagina. Verifique os links de solucao de problemas <i>(troubleshooting links)</i> no final da pagina se voce necessitar de ajuda adicional.",
21
-	'install:requirements:instructions:warning' => "Seu servidor passou na verificacao de requisitos, mas existe pelo menos um aviso. Recomendamos que verifique a pagina de de solucao de problemas <i>(troubleshooting page)</i> para mais detalhes.",
19
+    'install:requirements:instructions:success' => "Seu servidor passou na verificacao de requisitos.",
20
+    'install:requirements:instructions:failure' => "Seu servidor falhou na verificacao de requisitos. Depois que voce corrigir as situacoes apontadas abaixo, atualize a pagina. Verifique os links de solucao de problemas <i>(troubleshooting links)</i> no final da pagina se voce necessitar de ajuda adicional.",
21
+    'install:requirements:instructions:warning' => "Seu servidor passou na verificacao de requisitos, mas existe pelo menos um aviso. Recomendamos que verifique a pagina de de solucao de problemas <i>(troubleshooting page)</i> para mais detalhes.",
22 22
 
23
-	'install:require:php' => 'PHP ',
24
-	'install:require:rewrite' => 'Servidor Web',
25
-	'install:require:settings' => 'Arquivos de configuração',
26
-	'install:require:database' => 'Banco de dados',
23
+    'install:require:php' => 'PHP ',
24
+    'install:require:rewrite' => 'Servidor Web',
25
+    'install:require:settings' => 'Arquivos de configuração',
26
+    'install:require:database' => 'Banco de dados',
27 27
 
28
-	'install:check:root' => 'Seu servidor web nao possui permissao para criar o arquivo <b>.htaccess</b> no diretorio raiz do Elgg. Voce tem duas opcoes:
28
+    'install:check:root' => 'Seu servidor web nao possui permissao para criar o arquivo <b>.htaccess</b> no diretorio raiz do Elgg. Voce tem duas opcoes:
29 29
 
30 30
 		1. Altere as permissoes do diretorio raiz
31 31
 
32 32
 		2. Copie o arquivo htaccess_dist para \'.htaccess',
33 33
 
34
-	'install:check:php:version' => 'O Elgg necessita que esteja instalado o PHP %s ou superior. Este servidor esta usando a versao %s.',
35
-	'install:check:php:extension' => 'O Elgg necessita a extensao PHP %s ativada.',
36
-	'install:check:php:extension:recommend' => 'É recomendado que a extensao PHP %s esteja instalada.',
37
-	'install:check:php:open_basedir' => 'A diretiva PHP <b>open_basedir</b> <i>(PHP directive)</i> pode prevenir que o Elgg salve arquivos para o diretório de dados <i>(data directory)</i>.',
38
-	'install:check:php:safe_mode' => 'Executar o PHP no modo \'safe mode\' nao e recomendado e pode causar problemas com o Elgg.',
39
-	'install:check:php:arg_separator' => '<b>arg_separator.output</b> deve ser <b>&amp;</b> para o Elgg executar e o valor do seu servidor e %s',
40
-	'install:check:php:register_globals' => '<b>Register globals</b> deve ser desligado.',
41
-	'install:check:php:session.auto_start' => "<b>session.auto_start</b> deve estar desligado para o Elgg executar. Senão <i>(Either)</i> altere a configuracao do seu servidor e adicione esta diretiva no arquivo <b>.htaccess</b> do Elgg.",
34
+    'install:check:php:version' => 'O Elgg necessita que esteja instalado o PHP %s ou superior. Este servidor esta usando a versao %s.',
35
+    'install:check:php:extension' => 'O Elgg necessita a extensao PHP %s ativada.',
36
+    'install:check:php:extension:recommend' => 'É recomendado que a extensao PHP %s esteja instalada.',
37
+    'install:check:php:open_basedir' => 'A diretiva PHP <b>open_basedir</b> <i>(PHP directive)</i> pode prevenir que o Elgg salve arquivos para o diretório de dados <i>(data directory)</i>.',
38
+    'install:check:php:safe_mode' => 'Executar o PHP no modo \'safe mode\' nao e recomendado e pode causar problemas com o Elgg.',
39
+    'install:check:php:arg_separator' => '<b>arg_separator.output</b> deve ser <b>&amp;</b> para o Elgg executar e o valor do seu servidor e %s',
40
+    'install:check:php:register_globals' => '<b>Register globals</b> deve ser desligado.',
41
+    'install:check:php:session.auto_start' => "<b>session.auto_start</b> deve estar desligado para o Elgg executar. Senão <i>(Either)</i> altere a configuracao do seu servidor e adicione esta diretiva no arquivo <b>.htaccess</b> do Elgg.",
42 42
 
43
-	'install:check:installdir' => 'Your web server does not have permission to create the settings.php file in your installation directory. You have two choices:
43
+    'install:check:installdir' => 'Your web server does not have permission to create the settings.php file in your installation directory. You have two choices:
44 44
 
45 45
 		1. Change the permissions on the elgg-config directory of your Elgg installation
46 46
 
47 47
 		2. Copy the file %s/settings.example.php to elgg-config/settings.php and follow the instructions in it for setting your database parameters.',
48
-	'install:check:readsettings' => 'Um arquivo de configuração existe no diretorio <b>engine</b>, mas o servidor web nao pode executar a leitura. Voce pode apagar o arquivo ou alterar as permissoes de leitura dele.',
49
-
50
-	'install:check:php:success' => "Seu servidor de PHP satisfaz todas as necessidades do Elgg.",
51
-	'install:check:rewrite:success' => 'O teste de regras de escrita foi um sucesso <i>(rewrite rules)</i>.',
52
-	'install:check:database' => 'As necessidades do banco de dados sao verificadas quando o Elgg carrega esta base.',
53
-
54
-	'install:database:instructions' => "Se voce ainda nao criou a base de dados para o Elgg, faca isso agora.  Entao preencha os valores abaixo para iniciar o banco de dados do Elgg.",
55
-	'install:database:error' => 'Aconteceu um erro ao criar a base de dados do Elgg e a instalacao nao pode continuar. Revise a mensagem abaixo e corriga os problemas. se voce precisar de mais ajuda, visite o link de solucao de problemas de instalacao <i>(Install troubleshooting link)</i> ou envie mensagem no forum da comundade Elgg.',
56
-
57
-	'install:database:label:dbuser' =>  'Usuário no banco de dados <i>(Database Username)</i>',
58
-	'install:database:label:dbpassword' => 'Senha no banco de dados <i>(Database Password)</i>',
59
-	'install:database:label:dbname' => 'Nome da base de dados <i>(Database Name)</i>',
60
-	'install:database:label:dbhost' => 'Hospedagem da base de dados <i>(Database Host)</i>',
61
-	'install:database:label:dbprefix' => 'Prefixo das tabelas no banco de dados <i>(Database Table Prefix)</i>',
62
-	'install:database:label:timezone' => "Timezone",
63
-
64
-	'install:database:help:dbuser' => 'Usuario que possui acesso pleno ao banco de dados MySQL que voce criou para o Elgg',
65
-	'install:database:help:dbpassword' => 'Senha para a conta do usuário da base de dados definida acima',
66
-	'install:database:help:dbname' => 'Nome da base de dados do Elgg',
67
-	'install:database:help:dbhost' => 'Hospedagem do servidor MySQL (geralmente <b>localhost</b>)',
68
-	'install:database:help:dbprefix' => "O prefixo a ser atribuido para todas as tabelas do Elgg (geralmente <b>elgg_</b>)",
69
-	'install:database:help:timezone' => "The default timezone in which the site will operate",
70
-
71
-	'install:settings:instructions' => 'Precisamos de algumas informacoes sobre o site assim que configuramos o Elgg. Se voce ainda nao criou um diretorio de dados <i>(data directory)</i> para o Elgg, por favor faca isso antes de completar esta etapa.',
72
-
73
-	'install:settings:label:sitename' => 'Nome do Site <i>(Site Name)</i>',
74
-	'install:settings:label:siteemail' => 'Endereco de email do site <i>(Site Email Address)</i>',
75
-	'install:database:label:wwwroot' => 'URL do site <i>(Site URL)</i>',
76
-	'install:settings:label:path' => 'Diretorio de instalacão do Elgg <i>(Install Directory)</i>',
77
-	'install:database:label:dataroot' => 'Diretorio de dados <i>(Data Directory)</i>',
78
-	'install:settings:label:language' => 'Linguagem do site <i>(Site Language)</i>',
79
-	'install:settings:label:siteaccess' => 'Acesso padrão de segurança do site <i>(Default Site Access)</i>',
80
-	'install:label:combo:dataroot' => 'Elgg cria um diretório de dados',
81
-
82
-	'install:settings:help:sitename' => 'O nome do seu novo site Elgg',
83
-	'install:settings:help:siteemail' => 'Endereço de email usado pelo Elgg para comunicação com os usuários',
84
-	'install:database:help:wwwroot' => 'O endereço do site (Elgg geralmente atribui isto corretamente)',
85
-	'install:settings:help:path' => 'O diretório onde voce pretende colocar o código do Elgg (Elgg geralmente atribui isto corretamente)',
86
-	'install:database:help:dataroot' => 'O diretorio que voce criou para o Elgg salvar os arquivos (as permissões deste diretório serão verificadas quando voce clicar em PROXIMO)',
87
-	'install:settings:help:dataroot:apache' => 'Você possui a opção do Elgg criar o diretório de dados ou entrar com o diretório que você já havia criada para guardar os arquivos (as permissões deste diretório serão checadas quando você clicar em PROXIMO)',
88
-	'install:settings:help:language' => 'A linguagem padrao do site',
89
-	'install:settings:help:siteaccess' => 'O nivel de acesso padrao para os novos conteúdos criados pelos usuários',
90
-
91
-	'install:admin:instructions' => "Agora é o momento de criar a conta do administrador.",
92
-
93
-	'install:admin:label:displayname' => 'Nome de exibição',
94
-	'install:admin:label:email' => 'Endereço de email',
95
-	'install:admin:label:username' => 'Usuário',
96
-	'install:admin:label:password1' => 'Senha',
97
-	'install:admin:label:password2' => 'Repetir a senha',
98
-
99
-	'install:admin:help:displayname' => 'O nome que sera apresentado no site para esta conta',
100
-	'install:admin:help:email' => '',
101
-	'install:admin:help:username' => 'O login que sera usado pelo usuario para entrar na rede',
102
-	'install:admin:help:password1' => "Senhas devem ter pelo menos %u caracteres.  <b>Não devem conter caracteres especiais ou espacos em branco</b>",
103
-	'install:admin:help:password2' => 'Redigite a senha para confirmar',
104
-
105
-	'install:admin:password:mismatch' => 'Senhas devem ser iguais.',
106
-	'install:admin:password:empty' => 'A senha nao pode estar vazia.',
107
-	'install:admin:password:tooshort' => 'Sua senha é muito pequena',
108
-	'install:admin:cannot_create' => 'Não foi possível criar a conta do administrador.',
109
-
110
-	'install:complete:instructions' => 'Seu site Elgg esta agora pronto para ser usado. Clique no botao abaixo para entrar no seu site.',
111
-	'install:complete:gotosite' => 'Ir para o  site',
112
-
113
-	'InstallationException:UnknownStep' => '%s é uma etapa desconhecida na instalação.',
114
-	'InstallationException:MissingLibrary' => 'Nao foi possivel acessar %s',
115
-	'InstallationException:CannotLoadSettings' => 'Elgg nao pode carregar os arquivos de configuracao. Ele nao existe ou existe uma questao de permissao de acesso ao arquivo.',
116
-
117
-	'install:success:database' => 'Base de dados foi instalada.',
118
-	'install:success:settings' => 'Configurações do site foram salvas.',
119
-	'install:success:admin' => 'Conta do administrador foi criada.',
120
-
121
-	'install:error:htaccess' => 'Não foi possivel criar o arquivo <b>.htaccess</b>',
122
-	'install:error:settings' => 'Não foi possivel criar o arquivo de configurações <i>(settings file)</i>',
123
-	'install:error:databasesettings' => 'Não foi possivel conectar ao banco de dados com estas configurações.',
124
-	'install:error:database_prefix' => 'Caracteres invalidos no prefixo da base de dados (database prefix)',
125
-	'install:error:oldmysql2' => 'MySQL deve ser da versao 5.5.3 ou superior. Seu servidor está usando %s.',
126
-	'install:error:nodatabase' => 'Não foi possivel usar o banco de dados %s. Ele pode não existir.',
127
-	'install:error:cannotloadtables' => 'Não foi possivel carregar as tabelas da base de dados',
128
-	'install:error:tables_exist' => 'Já existem tabelas do Elgg no banco de dados. Voce precisa apagar estas tabelas ou reiniciar o instalador e nos tentaremos utiliza-las. Para reiniciar o instalar, remova o <b>\'?step=database\' </b> do URL no seu endereco na barra do navegador e pressione ENTER.',
129
-	'install:error:readsettingsphp' => 'Unable to read /elgg-config/settings.example.php',
130
-	'install:error:writesettingphp' => 'Unable to write /elgg-config/settings.php',
131
-	'install:error:requiredfield' => '%s é necessario',
132
-	'install:error:relative_path' => 'Nao acreditamos que "%s" seja um caminho absoluto para seu diretorio de dados (data directory)',
133
-	'install:error:datadirectoryexists' => 'Seu diretório de dados <i>(data directory)</i> %s não existe.',
134
-	'install:error:writedatadirectory' => 'Seu diretório de dados <i>(data directory)</i> %s não possui permissão de escrita pelo servidor web.',
135
-	'install:error:locationdatadirectory' => 'Seu diretório de dados <i>(data directory)</i> %s deve estar fora do seu caminho de instalação por razões de seguranca.',
136
-	'install:error:emailaddress' => '%s não é um endereço de email válido',
137
-	'install:error:createsite' => 'Não foi possivel criar o site.',
138
-	'install:error:savesitesettings' => 'Não foi possível salvar as configurações do site',
139
-	'install:error:loadadmin' => 'Não foi possível carregar o usuário administrador.',
140
-	'install:error:adminaccess' => 'Não foi possível atribuir para nova conta de usuário os privilégios de administrador.',
141
-	'install:error:adminlogin' => 'Não foi possével fazer login com o novo usuário administrador automaticamente.',
142
-	'install:error:rewrite:apache' => 'Nos achamos que seu servidor está funcionando em um servidor Apache <i>(Apache web server)</i>.',
143
-	'install:error:rewrite:nginx' => 'Nos achamos que seu servidor está funcionando em um servidor Nginx <i>(Nginx web server)</i>.',
144
-	'install:error:rewrite:lighttpd' => 'Nos achamos que seu servidor está funcionando em um servidor Lighttpd <i>(Lighttpd web server)</i>.',
145
-	'install:error:rewrite:iis' => 'Nos achamos que seu servidor está funcionando em um servidor IIS <i>(IIS web server)</i>.',
146
-	'install:error:rewrite:allowoverride' => "O teste de escrita falhou e a causa mais provavel foi que <b>AllowOverride</b> nao esta definida para todos diretorios do Elgg. Isto previne o Apache de processar o arquivo <b>.htaccess</b> que contem as regras de redirecionamento (rewrite rules).
48
+    'install:check:readsettings' => 'Um arquivo de configuração existe no diretorio <b>engine</b>, mas o servidor web nao pode executar a leitura. Voce pode apagar o arquivo ou alterar as permissoes de leitura dele.',
49
+
50
+    'install:check:php:success' => "Seu servidor de PHP satisfaz todas as necessidades do Elgg.",
51
+    'install:check:rewrite:success' => 'O teste de regras de escrita foi um sucesso <i>(rewrite rules)</i>.',
52
+    'install:check:database' => 'As necessidades do banco de dados sao verificadas quando o Elgg carrega esta base.',
53
+
54
+    'install:database:instructions' => "Se voce ainda nao criou a base de dados para o Elgg, faca isso agora.  Entao preencha os valores abaixo para iniciar o banco de dados do Elgg.",
55
+    'install:database:error' => 'Aconteceu um erro ao criar a base de dados do Elgg e a instalacao nao pode continuar. Revise a mensagem abaixo e corriga os problemas. se voce precisar de mais ajuda, visite o link de solucao de problemas de instalacao <i>(Install troubleshooting link)</i> ou envie mensagem no forum da comundade Elgg.',
56
+
57
+    'install:database:label:dbuser' =>  'Usuário no banco de dados <i>(Database Username)</i>',
58
+    'install:database:label:dbpassword' => 'Senha no banco de dados <i>(Database Password)</i>',
59
+    'install:database:label:dbname' => 'Nome da base de dados <i>(Database Name)</i>',
60
+    'install:database:label:dbhost' => 'Hospedagem da base de dados <i>(Database Host)</i>',
61
+    'install:database:label:dbprefix' => 'Prefixo das tabelas no banco de dados <i>(Database Table Prefix)</i>',
62
+    'install:database:label:timezone' => "Timezone",
63
+
64
+    'install:database:help:dbuser' => 'Usuario que possui acesso pleno ao banco de dados MySQL que voce criou para o Elgg',
65
+    'install:database:help:dbpassword' => 'Senha para a conta do usuário da base de dados definida acima',
66
+    'install:database:help:dbname' => 'Nome da base de dados do Elgg',
67
+    'install:database:help:dbhost' => 'Hospedagem do servidor MySQL (geralmente <b>localhost</b>)',
68
+    'install:database:help:dbprefix' => "O prefixo a ser atribuido para todas as tabelas do Elgg (geralmente <b>elgg_</b>)",
69
+    'install:database:help:timezone' => "The default timezone in which the site will operate",
70
+
71
+    'install:settings:instructions' => 'Precisamos de algumas informacoes sobre o site assim que configuramos o Elgg. Se voce ainda nao criou um diretorio de dados <i>(data directory)</i> para o Elgg, por favor faca isso antes de completar esta etapa.',
72
+
73
+    'install:settings:label:sitename' => 'Nome do Site <i>(Site Name)</i>',
74
+    'install:settings:label:siteemail' => 'Endereco de email do site <i>(Site Email Address)</i>',
75
+    'install:database:label:wwwroot' => 'URL do site <i>(Site URL)</i>',
76
+    'install:settings:label:path' => 'Diretorio de instalacão do Elgg <i>(Install Directory)</i>',
77
+    'install:database:label:dataroot' => 'Diretorio de dados <i>(Data Directory)</i>',
78
+    'install:settings:label:language' => 'Linguagem do site <i>(Site Language)</i>',
79
+    'install:settings:label:siteaccess' => 'Acesso padrão de segurança do site <i>(Default Site Access)</i>',
80
+    'install:label:combo:dataroot' => 'Elgg cria um diretório de dados',
81
+
82
+    'install:settings:help:sitename' => 'O nome do seu novo site Elgg',
83
+    'install:settings:help:siteemail' => 'Endereço de email usado pelo Elgg para comunicação com os usuários',
84
+    'install:database:help:wwwroot' => 'O endereço do site (Elgg geralmente atribui isto corretamente)',
85
+    'install:settings:help:path' => 'O diretório onde voce pretende colocar o código do Elgg (Elgg geralmente atribui isto corretamente)',
86
+    'install:database:help:dataroot' => 'O diretorio que voce criou para o Elgg salvar os arquivos (as permissões deste diretório serão verificadas quando voce clicar em PROXIMO)',
87
+    'install:settings:help:dataroot:apache' => 'Você possui a opção do Elgg criar o diretório de dados ou entrar com o diretório que você já havia criada para guardar os arquivos (as permissões deste diretório serão checadas quando você clicar em PROXIMO)',
88
+    'install:settings:help:language' => 'A linguagem padrao do site',
89
+    'install:settings:help:siteaccess' => 'O nivel de acesso padrao para os novos conteúdos criados pelos usuários',
90
+
91
+    'install:admin:instructions' => "Agora é o momento de criar a conta do administrador.",
92
+
93
+    'install:admin:label:displayname' => 'Nome de exibição',
94
+    'install:admin:label:email' => 'Endereço de email',
95
+    'install:admin:label:username' => 'Usuário',
96
+    'install:admin:label:password1' => 'Senha',
97
+    'install:admin:label:password2' => 'Repetir a senha',
98
+
99
+    'install:admin:help:displayname' => 'O nome que sera apresentado no site para esta conta',
100
+    'install:admin:help:email' => '',
101
+    'install:admin:help:username' => 'O login que sera usado pelo usuario para entrar na rede',
102
+    'install:admin:help:password1' => "Senhas devem ter pelo menos %u caracteres.  <b>Não devem conter caracteres especiais ou espacos em branco</b>",
103
+    'install:admin:help:password2' => 'Redigite a senha para confirmar',
104
+
105
+    'install:admin:password:mismatch' => 'Senhas devem ser iguais.',
106
+    'install:admin:password:empty' => 'A senha nao pode estar vazia.',
107
+    'install:admin:password:tooshort' => 'Sua senha é muito pequena',
108
+    'install:admin:cannot_create' => 'Não foi possível criar a conta do administrador.',
109
+
110
+    'install:complete:instructions' => 'Seu site Elgg esta agora pronto para ser usado. Clique no botao abaixo para entrar no seu site.',
111
+    'install:complete:gotosite' => 'Ir para o  site',
112
+
113
+    'InstallationException:UnknownStep' => '%s é uma etapa desconhecida na instalação.',
114
+    'InstallationException:MissingLibrary' => 'Nao foi possivel acessar %s',
115
+    'InstallationException:CannotLoadSettings' => 'Elgg nao pode carregar os arquivos de configuracao. Ele nao existe ou existe uma questao de permissao de acesso ao arquivo.',
116
+
117
+    'install:success:database' => 'Base de dados foi instalada.',
118
+    'install:success:settings' => 'Configurações do site foram salvas.',
119
+    'install:success:admin' => 'Conta do administrador foi criada.',
120
+
121
+    'install:error:htaccess' => 'Não foi possivel criar o arquivo <b>.htaccess</b>',
122
+    'install:error:settings' => 'Não foi possivel criar o arquivo de configurações <i>(settings file)</i>',
123
+    'install:error:databasesettings' => 'Não foi possivel conectar ao banco de dados com estas configurações.',
124
+    'install:error:database_prefix' => 'Caracteres invalidos no prefixo da base de dados (database prefix)',
125
+    'install:error:oldmysql2' => 'MySQL deve ser da versao 5.5.3 ou superior. Seu servidor está usando %s.',
126
+    'install:error:nodatabase' => 'Não foi possivel usar o banco de dados %s. Ele pode não existir.',
127
+    'install:error:cannotloadtables' => 'Não foi possivel carregar as tabelas da base de dados',
128
+    'install:error:tables_exist' => 'Já existem tabelas do Elgg no banco de dados. Voce precisa apagar estas tabelas ou reiniciar o instalador e nos tentaremos utiliza-las. Para reiniciar o instalar, remova o <b>\'?step=database\' </b> do URL no seu endereco na barra do navegador e pressione ENTER.',
129
+    'install:error:readsettingsphp' => 'Unable to read /elgg-config/settings.example.php',
130
+    'install:error:writesettingphp' => 'Unable to write /elgg-config/settings.php',
131
+    'install:error:requiredfield' => '%s é necessario',
132
+    'install:error:relative_path' => 'Nao acreditamos que "%s" seja um caminho absoluto para seu diretorio de dados (data directory)',
133
+    'install:error:datadirectoryexists' => 'Seu diretório de dados <i>(data directory)</i> %s não existe.',
134
+    'install:error:writedatadirectory' => 'Seu diretório de dados <i>(data directory)</i> %s não possui permissão de escrita pelo servidor web.',
135
+    'install:error:locationdatadirectory' => 'Seu diretório de dados <i>(data directory)</i> %s deve estar fora do seu caminho de instalação por razões de seguranca.',
136
+    'install:error:emailaddress' => '%s não é um endereço de email válido',
137
+    'install:error:createsite' => 'Não foi possivel criar o site.',
138
+    'install:error:savesitesettings' => 'Não foi possível salvar as configurações do site',
139
+    'install:error:loadadmin' => 'Não foi possível carregar o usuário administrador.',
140
+    'install:error:adminaccess' => 'Não foi possível atribuir para nova conta de usuário os privilégios de administrador.',
141
+    'install:error:adminlogin' => 'Não foi possével fazer login com o novo usuário administrador automaticamente.',
142
+    'install:error:rewrite:apache' => 'Nos achamos que seu servidor está funcionando em um servidor Apache <i>(Apache web server)</i>.',
143
+    'install:error:rewrite:nginx' => 'Nos achamos que seu servidor está funcionando em um servidor Nginx <i>(Nginx web server)</i>.',
144
+    'install:error:rewrite:lighttpd' => 'Nos achamos que seu servidor está funcionando em um servidor Lighttpd <i>(Lighttpd web server)</i>.',
145
+    'install:error:rewrite:iis' => 'Nos achamos que seu servidor está funcionando em um servidor IIS <i>(IIS web server)</i>.',
146
+    'install:error:rewrite:allowoverride' => "O teste de escrita falhou e a causa mais provavel foi que <b>AllowOverride</b> nao esta definida para todos diretorios do Elgg. Isto previne o Apache de processar o arquivo <b>.htaccess</b> que contem as regras de redirecionamento (rewrite rules).
147 147
 				\n\nUm causa menos provavel seria se o Apache foi configurado com um <b>alias</b> para seu diretorio Elgg e voce precisa definir o <b>RewriteBase</b> no seu <b>.htaccess</b>. Existem instrucoes complementares no arquivo <b>.htaccess</b> no seu diretorio do Elgg.",
148
-	'install:error:rewrite:htaccess:write_permission' => 'Seu servidor web nao possui permissao para criar o arquivo <b>.htaccess</b> no diretorio do Elgg. Voce precisa copiar manualmente o arquivo <b>htaccess_dist</b> para <b>.htaccess</b> ou alterar as permissoes no diretorio.',
149
-	'install:error:rewrite:htaccess:read_permission' => 'Existe um arquivo <b>.htaccess</b> no diretorio do Elgg, mas seu servidor web nao possui permissao para ler este arquivo.',
150
-	'install:error:rewrite:htaccess:non_elgg_htaccess' => 'Existe um arquivo <b>.htaccess</b> no diretorio do Elgg que nao foi criado pelo Elgg.  Por favor, remova o arquivo.',
151
-	'install:error:rewrite:htaccess:old_elgg_htaccess' => 'Parece que existe um arquivo antigo do <b>.htaccess</b> no diretorio do Elgg. Ele não contem as regras de redirecionamento (rewrite rules) para realizar os testes no servidor web.',
152
-	'install:error:rewrite:htaccess:cannot_copy' => 'Um erro desconhecido ocorreu enquanto era criado o arquivo <b>.htaccess</b>. Voce precisa copiar manualmente o arquivo <b>htaccess_dist</b> para <b>.htaccess</b>.',
153
-	'install:error:rewrite:altserver' => 'O teste com as regras de redirecionamento (rewrite rules) falhou. Voce precisa configurar seu servidor web com as regras de escrita do Elgg e tentar novamente.',
154
-	'install:error:rewrite:unknown' => 'Não foi possivel identificar qual o tipo de servidor web esta funcionando no seu servidor e ocorreu uma falha com as regras de redirecionamento (rewrite rules).  Não nos é possivel fornecer qualquer tipo de conselho. Por favor verifique o link de solução de problemas <i>(troubleshooting link)</i>.',
155
-	'install:warning:rewrite:unknown' => 'Seu servidor nao suporta testes automaticos das regras de redirecionamento (rewrite rules). Você pode continuar a instalação.  Contudo voce pode ter problemas com seu site. Voce pode realizar os testes manualmente com as regras de escrita clicando neste link: <a href="%s" target="_blank">teste</a>. Voce visualizará a palavra SUCESSO se as regras estiverem funcionando.',
148
+    'install:error:rewrite:htaccess:write_permission' => 'Seu servidor web nao possui permissao para criar o arquivo <b>.htaccess</b> no diretorio do Elgg. Voce precisa copiar manualmente o arquivo <b>htaccess_dist</b> para <b>.htaccess</b> ou alterar as permissoes no diretorio.',
149
+    'install:error:rewrite:htaccess:read_permission' => 'Existe um arquivo <b>.htaccess</b> no diretorio do Elgg, mas seu servidor web nao possui permissao para ler este arquivo.',
150
+    'install:error:rewrite:htaccess:non_elgg_htaccess' => 'Existe um arquivo <b>.htaccess</b> no diretorio do Elgg que nao foi criado pelo Elgg.  Por favor, remova o arquivo.',
151
+    'install:error:rewrite:htaccess:old_elgg_htaccess' => 'Parece que existe um arquivo antigo do <b>.htaccess</b> no diretorio do Elgg. Ele não contem as regras de redirecionamento (rewrite rules) para realizar os testes no servidor web.',
152
+    'install:error:rewrite:htaccess:cannot_copy' => 'Um erro desconhecido ocorreu enquanto era criado o arquivo <b>.htaccess</b>. Voce precisa copiar manualmente o arquivo <b>htaccess_dist</b> para <b>.htaccess</b>.',
153
+    'install:error:rewrite:altserver' => 'O teste com as regras de redirecionamento (rewrite rules) falhou. Voce precisa configurar seu servidor web com as regras de escrita do Elgg e tentar novamente.',
154
+    'install:error:rewrite:unknown' => 'Não foi possivel identificar qual o tipo de servidor web esta funcionando no seu servidor e ocorreu uma falha com as regras de redirecionamento (rewrite rules).  Não nos é possivel fornecer qualquer tipo de conselho. Por favor verifique o link de solução de problemas <i>(troubleshooting link)</i>.',
155
+    'install:warning:rewrite:unknown' => 'Seu servidor nao suporta testes automaticos das regras de redirecionamento (rewrite rules). Você pode continuar a instalação.  Contudo voce pode ter problemas com seu site. Voce pode realizar os testes manualmente com as regras de escrita clicando neste link: <a href="%s" target="_blank">teste</a>. Voce visualizará a palavra SUCESSO se as regras estiverem funcionando.',
156 156
 	
157
-	// Bring over some error messages you might see in setup
158
-	'exception:contact_admin' => 'Um erro irrecuperavel ocorreu e foi registrado. se voce for o administrador do site verifique seus arquivos de configuracoes, ou entre em contato com o administrador do site com as seguintes informacoes:',
159
-	'DatabaseException:WrongCredentials' => "Elgg nao pode se conectar ao banco de dados usando as credenciais informadas.  Verifique seu arquivo de configuracoes.",
157
+    // Bring over some error messages you might see in setup
158
+    'exception:contact_admin' => 'Um erro irrecuperavel ocorreu e foi registrado. se voce for o administrador do site verifique seus arquivos de configuracoes, ou entre em contato com o administrador do site com as seguintes informacoes:',
159
+    'DatabaseException:WrongCredentials' => "Elgg nao pode se conectar ao banco de dados usando as credenciais informadas.  Verifique seu arquivo de configuracoes.",
160 160
 ];
Please login to merge, or discard this patch.
install/languages/de.php 1 patch
Indentation   +137 added lines, -137 removed lines patch added patch discarded remove patch
@@ -1,160 +1,160 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3
-	'install:title' => 'Elgg-Installation',
4
-	'install:welcome' => 'Wilkommen',
5
-	'install:requirements' => 'Überprüfung der Systemvoraussetzungen',
6
-	'install:database' => 'Installation der Datenbank',
7
-	'install:settings' => 'Konfiguration der Seite',
8
-	'install:admin' => 'Erstellung des Administrator-Accounts',
9
-	'install:complete' => 'Fertig',
3
+    'install:title' => 'Elgg-Installation',
4
+    'install:welcome' => 'Wilkommen',
5
+    'install:requirements' => 'Überprüfung der Systemvoraussetzungen',
6
+    'install:database' => 'Installation der Datenbank',
7
+    'install:settings' => 'Konfiguration der Seite',
8
+    'install:admin' => 'Erstellung des Administrator-Accounts',
9
+    'install:complete' => 'Fertig',
10 10
 
11
-	'install:next' => 'Weiter',
12
-	'install:refresh' => 'Refresh',
11
+    'install:next' => 'Weiter',
12
+    'install:refresh' => 'Refresh',
13 13
 
14
-	'install:welcome:instructions' => "Die Installation von Elgg besteht aus 6 einfachen Schritten und der erste Schritt davon ist das Lesen dieser Begrüßung!
14
+    'install:welcome:instructions' => "Die Installation von Elgg besteht aus 6 einfachen Schritten und der erste Schritt davon ist das Lesen dieser Begrüßung!
15 15
 
16 16
 Wenn Du es nicht bereits getan hast, lies bitte die mitgelieferten Installations-Hinweise (oder rufe die Hinweise auf indem Du dem Link am Ende dieser Seite folgst).
17 17
 
18 18
 Wenn Du bereits bist, um fortzufahren, klicke auf den 'Weiter'-Knopf.",
19
-	'install:requirements:instructions:success' => "Dein Server hat die Überprüfung der Systemvoraussetzungen bestanden.",
20
-	'install:requirements:instructions:failure' => "Dein Server erfüllt nicht alle notwendigen Systemvoraussetzungen. Nachdem Du die im folgenden aufgelisteten Probleme beseitigt hast, lade diese Seite erneut. Folge den Links am Ende der Seite, um weitere Informationen zu möglichen Problemlösungen zu erhalten.",
21
-	'install:requirements:instructions:warning' => "Dein Server hat die Überprüfung der Systemvoraussetzungen bestanden, aber es gab mindestens eine Warnmeldung. Wir empfehlen, dass Du die Hinweise zu Installationsproblemen liest, um mehr darüber zu erfahren.",
19
+    'install:requirements:instructions:success' => "Dein Server hat die Überprüfung der Systemvoraussetzungen bestanden.",
20
+    'install:requirements:instructions:failure' => "Dein Server erfüllt nicht alle notwendigen Systemvoraussetzungen. Nachdem Du die im folgenden aufgelisteten Probleme beseitigt hast, lade diese Seite erneut. Folge den Links am Ende der Seite, um weitere Informationen zu möglichen Problemlösungen zu erhalten.",
21
+    'install:requirements:instructions:warning' => "Dein Server hat die Überprüfung der Systemvoraussetzungen bestanden, aber es gab mindestens eine Warnmeldung. Wir empfehlen, dass Du die Hinweise zu Installationsproblemen liest, um mehr darüber zu erfahren.",
22 22
 
23
-	'install:require:php' => 'PHP',
24
-	'install:require:rewrite' => 'Webserver',
25
-	'install:require:settings' => 'Konfigurationsdatei',
26
-	'install:require:database' => 'Datenbank',
23
+    'install:require:php' => 'PHP',
24
+    'install:require:rewrite' => 'Webserver',
25
+    'install:require:settings' => 'Konfigurationsdatei',
26
+    'install:require:database' => 'Datenbank',
27 27
 
28
-	'install:check:root' => 'Aufgrund fehlender Schreibberechtigung ist es leider nicht möglich, auf Deinem Server im Hauptverzeichnis der Elgg-Installation die Datei .htaccess automatisch zu erzeugen. Du hast zwei Möglichkeiten:
28
+    'install:check:root' => 'Aufgrund fehlender Schreibberechtigung ist es leider nicht möglich, auf Deinem Server im Hauptverzeichnis der Elgg-Installation die Datei .htaccess automatisch zu erzeugen. Du hast zwei Möglichkeiten:
29 29
 
30 30
 		1. Ändere (nur während der Installation!) die Schreibberechtigung für das Elgg-Hauptverzeichnis,
31 31
 
32 32
 		2. Lege die Datei .htaccess im Elgg-Hauptverzeichnis selbst an, indem Du sie aus der Datei install/config/htaccess.dist durch Kopieren und Umbenennen erzeugst.',
33 33
 
34
-	'install:check:php:version' => 'Elgg benötigt PHP in Version %s oder neuer. Dieser Server verwendet Version %s.',
35
-	'install:check:php:extension' => 'Elgg benötigt die PHP-Erweiterung %s.',
36
-	'install:check:php:extension:recommend' => 'Es wird empfohlen, dass die PHP-Erweiterung %s auf dem Server installiert ist.',
37
-	'install:check:php:open_basedir' => 'Die auf dem Server gesetzte PHP-Einstellung für open_basedir verhindert möglicherweise, dass Elgg Daten in seinem Datenverzeichnis speichern kann.',
38
-	'install:check:php:safe_mode' => 'Es wird nicht empfohlen, PHP im Safe Mode zu verwenden, da dies zu Problemen mit Elgg führen kann.',
39
-	'install:check:php:arg_separator' => 'Das von PHP verwendete Trennzeichen arg_separator.output muss \'&\' sein, damit Elgg einwandfrei funktioniert. Das eingestellte Trennzeichen auf Deinem Server ist aber \'%s\'',
40
-	'install:check:php:register_globals' => 'Register globals muss auf dem Server ausgeschaltet sein, d.h. der Wert der PHP-Variable register_globals muss \'0\' sein.',
41
-	'install:check:php:session.auto_start' => "Auf dem Server muss session.auto_start ausgeschaltet sein, damit Elgg einwandfrei funktioniert. Ändere diese Einstellung entweder in der PHP-Konfiguration php.ini oder setze den Wert dieser PHP-Variable in der .htaccess-Datei von Elgg.",
34
+    'install:check:php:version' => 'Elgg benötigt PHP in Version %s oder neuer. Dieser Server verwendet Version %s.',
35
+    'install:check:php:extension' => 'Elgg benötigt die PHP-Erweiterung %s.',
36
+    'install:check:php:extension:recommend' => 'Es wird empfohlen, dass die PHP-Erweiterung %s auf dem Server installiert ist.',
37
+    'install:check:php:open_basedir' => 'Die auf dem Server gesetzte PHP-Einstellung für open_basedir verhindert möglicherweise, dass Elgg Daten in seinem Datenverzeichnis speichern kann.',
38
+    'install:check:php:safe_mode' => 'Es wird nicht empfohlen, PHP im Safe Mode zu verwenden, da dies zu Problemen mit Elgg führen kann.',
39
+    'install:check:php:arg_separator' => 'Das von PHP verwendete Trennzeichen arg_separator.output muss \'&\' sein, damit Elgg einwandfrei funktioniert. Das eingestellte Trennzeichen auf Deinem Server ist aber \'%s\'',
40
+    'install:check:php:register_globals' => 'Register globals muss auf dem Server ausgeschaltet sein, d.h. der Wert der PHP-Variable register_globals muss \'0\' sein.',
41
+    'install:check:php:session.auto_start' => "Auf dem Server muss session.auto_start ausgeschaltet sein, damit Elgg einwandfrei funktioniert. Ändere diese Einstellung entweder in der PHP-Konfiguration php.ini oder setze den Wert dieser PHP-Variable in der .htaccess-Datei von Elgg.",
42 42
 
43
-	'install:check:installdir' => 'Aufgrund fehlender Schreibberechtigung ist es leider nicht möglich, auf Deinem Server im Installationsverzeichnis von Elgg die Datei settings.php zu erzeugen. Du hast zwei Möglichkeiten:
43
+    'install:check:installdir' => 'Aufgrund fehlender Schreibberechtigung ist es leider nicht möglich, auf Deinem Server im Installationsverzeichnis von Elgg die Datei settings.php zu erzeugen. Du hast zwei Möglichkeiten:
44 44
 
45 45
 		1. Ändere (nur während der Installation!) die Schreibberechtigung für das Verzeichnis elgg-config Deiner Elgg-Installation,
46 46
 
47 47
 		2. Lege die Datei settings.php selbst an, indem Du die Datei %s/settings.example.php in das Verzeichnis elgg-config kopierst und zu settings.php umbenennst. Folge dann den Anweisungen in dieser Datei, um die Verbindungsparameter für Deine Datenbank einzutragen.',
48
-	'install:check:readsettings' => 'Im Installationsverzeichnis von Elgg ist eine Konfigurationsdatei namens settings.php vorhanden, aber es fehlt die notwendige Leseberechtigung. Du kannst entweder die Datei löschen, damit sie neu angelegt werden kann oder Du kannst die Leseberechtigungen der Datei anpassen.',
49
-
50
-	'install:check:php:success' => "Die PHP-Konfiguration auf Deinem Server erfüllt alle notwendigen Voraussetzungen für Elgg.",
51
-	'install:check:rewrite:success' => 'Die Überprüfung der konfigurierten rewrite-Regeln war erfolgreich.',
52
-	'install:check:database' => 'Die Voraussetzungen für den Datenbank-Server werden überprüft, sobald Elgg seine Datenbank lädt.',
53
-
54
-	'install:database:instructions' => "Wenn Du nicht bereits eine Datenbank für Elgg angelegt hast, mache dies bitte jetzt. Trage dann die Verbindungsparameter unten ein, damit Elgg die Datenbank initialisieren kann.",
55
-	'install:database:error' => 'Bei der Initialisierung der Datenbank ist ein Problem aufgetreten und die Installation kann nicht fortgesetzt werden. Lies bitte die oben angezeigte Meldung und korrigiere die fehlerhaften Einstellungen. Wenn Du weitere Hilfe dafür benötigst, folge dem Link am Ende der Seite, um weitere Informationen zu möglichen Problemlösungen zu erhalten oder bitte in den Elgg-Community-Foren um Hilfe.',
56
-
57
-	'install:database:label:dbuser' =>  'Datenbank-Benutzername',
58
-	'install:database:label:dbpassword' => 'Datenbank-Passwort',
59
-	'install:database:label:dbname' => 'Datenbank-Name',
60
-	'install:database:label:dbhost' => 'Datenbank-Host',
61
-	'install:database:label:dbprefix' => 'Tabellen-Prefix',
62
-	'install:database:label:timezone' => "Zeitzone",
63
-
64
-	'install:database:help:dbuser' => 'Der Benutzername des MySQL-Accounts, der alle notwendigen Zugriffsprivilegien für die von Elgg zu verwendende Datenbank hat',
65
-	'install:database:help:dbpassword' => 'Das Passwort für den zu verwendeten Benutzeraccount',
66
-	'install:database:help:dbname' => 'Der Name der von zu verwendenden Datenbank',
67
-	'install:database:help:dbhost' => 'Der Hostname des MySQL-Servers (normalerweise \'localhost\')',
68
-	'install:database:help:dbprefix' => "Das Tabellen-Prefix das bei allen Elgg-Tabellen in der Datenbank gesetzt wird (normalerweise \'elgg_\')",
69
-	'install:database:help:timezone' => "Die Zeitzone, die von der Elggseite standardmäßig verwendet werden soll",
70
-
71
-	'install:settings:instructions' => 'Für die weitere Konfiguration der Elgg-Seite benötigen wir einige Eingaben. Wenn Du noch kein\'t <a href=""http://learn.elgg.org/en/1.x/intro/install.html#create-a-data-folder" target="_blank">Elgg-Datenverzeichnis</a> angelegt hast, mußt Du dies jetzt tun.',
72
-
73
-	'install:settings:label:sitename' => 'Seiten-Name',
74
-	'install:settings:label:siteemail' => 'Email-Adresse',
75
-	'install:database:label:wwwroot' => 'URL der Seite',
76
-	'install:settings:label:path' => 'Elgg-Installationsverzeichnis',
77
-	'install:database:label:dataroot' => 'Datenverzeichnis',
78
-	'install:settings:label:language' => 'Sprache der Seite',
79
-	'install:settings:label:siteaccess' => 'Standard-Zugangslevel',
80
-	'install:label:combo:dataroot' => 'Datenverzeichnis von Elgg anlegen lassen',
81
-
82
-	'install:settings:help:sitename' => 'Der Name Deiner neuen Elgg Community-Seite',
83
-	'install:settings:help:siteemail' => 'Die Email-Adresse die von Elgg für die Kommunikation mit Benutzern verwendet wird',
84
-	'install:database:help:wwwroot' => 'Die Adresse der Community-Seite (Elgg kann sie in den meisten Fällen korrekt erkennen)',
85
-	'install:settings:help:path' => 'Das Verzeichnis auf dem Server, in das Du den Elgg-Code kopiert hast (Elgg kann es in den meisten Fällen korrekt erkennen)',
86
-	'install:database:help:dataroot' => 'Das Verzeichnis, das Du auf dem Server angelegt hast, in dem Elgg Dateien speichern kann (die Zugriffrechte werden beim Klicken auf den "Weiter"-Knopf überprüft). Es muss ein vollständiger (absoluter) Pfad eingegeben werden.',
87
-	'install:settings:help:dataroot:apache' => 'Du hast die Wahl, Elgg das Datenverzeichnis für die Speicherung von Benutzer-Dateien anlegen zu lassen oder den Pfad zum bereits angelegten Datenverzeichnis einzugeben (die Zugriffrechte dieses Verzeichnisses werden beim Klicken auf den "Weiter"-Knopf überprüft)',
88
-	'install:settings:help:language' => 'Die Standardsprache für Deine Community-Seite',
89
-	'install:settings:help:siteaccess' => 'Der Standard-Zugangslevel für neu von Benutzern erzeugte Inhalte',
90
-
91
-	'install:admin:instructions' => "Nun ist es Zeit, einen Administrator-Account anzulegen.",
92
-
93
-	'install:admin:label:displayname' => 'Name',
94
-	'install:admin:label:email' => 'Email-Adresse',
95
-	'install:admin:label:username' => 'Benutzername',
96
-	'install:admin:label:password1' => 'Passwort',
97
-	'install:admin:label:password2' => 'Passwort',
98
-
99
-	'install:admin:help:displayname' => 'Der Name, der auf der Community-Seite für diesen Benutzeraccount angezeigt wird',
100
-	'install:admin:help:email' => '',
101
-	'install:admin:help:username' => 'Benutzername des Account, der für die Anmeldung verwendet wird',
102
-	'install:admin:help:password1' => "Das Passwort muss mindestens %u Zeichen lang sein",
103
-	'install:admin:help:password2' => 'Gebe das Password zur Bestätigung erneut ein',
104
-
105
-	'install:admin:password:mismatch' => 'Passwort muss bei beiden Eingaben übereinstimmen.',
106
-	'install:admin:password:empty' => 'Das Passwort-Feld muss ausgefüllt werden.',
107
-	'install:admin:password:tooshort' => 'Dein Passwort war zu kurz.',
108
-	'install:admin:cannot_create' => 'Die Erzeugung des Administrator-Accounts ist fehlgeschlagen.',
109
-
110
-	'install:complete:instructions' => 'Die Installation Deiner Elgg Community-Seite ist nun abgeschlossen. Klicke auf den Knopf unten, um zur Startseite weitergeleitet zu werden.',
111
-	'install:complete:gotosite' => 'Zur Seite gehen',
112
-
113
-	'InstallationException:UnknownStep' => '%s ist ein unbekannter Installationsschritt.',
114
-	'InstallationException:MissingLibrary' => 'Das Laden von %s ist fehlgeschlagen',
115
-	'InstallationException:CannotLoadSettings' => 'Elgg konnte die settings-Datei nicht laden. Entweder existiert die Datei nicht oder es gibt ein Problem aufgrund der Zugriffsrechte, die für die Datei gesetzt sind.',
116
-
117
-	'install:success:database' => 'Die Datenbank wurde initialisiert.',
118
-	'install:success:settings' => 'Die Seiten-Einstellungen wurden gespeichert.',
119
-	'install:success:admin' => 'Der Administrator-Account wurde angelegt.',
120
-
121
-	'install:error:htaccess' => 'Das Erzeugen der .htaccess-Datei ist fehlgeschlagen.',
122
-	'install:error:settings' => 'Die settings-Datei konnte nicht erzeugt werden.',
123
-	'install:error:databasesettings' => 'Elgg konnte mit den eingegebenen Verbindungsparametern keine Verbindung mit der Datenbank herstellen.',
124
-	'install:error:database_prefix' => 'Das eingegebene Tabellen-Prefix enthält unzulässige Zeichen.',
125
-	'install:error:oldmysql2' => 'Voraussetzung für Elgg ist MySQL in Version 5.5.3 oder neuer. Dein Server verwendet Version %s.',
126
-	'install:error:nodatabase' => 'Der Zugriff auf die Datenbank %s ist nicht möglich. Möglicherweise ist die Datenbank nicht vorhanden.',
127
-	'install:error:cannotloadtables' => 'Der Zugriff auf die Tabellen der Datenbank ist nicht möglich.',
128
-	'install:error:tables_exist' => 'In der Datenbank ist bereits eine Elgg-Tabellenstruktur vorhanden. Du mußt entweder diese Tabellen aus der Datenbank löschen oder die Installation neu starten. Bei einem Neustart kann versucht werden, die bestehende Tabellenstruktur zu verwenden. Um die Installation neu zu starten, entferne \'?step=database\' aus der URL in der Adressleiste Deines Browsers und drücke \'Enter\'.',
129
-	'install:error:readsettingsphp' => 'Die Datei /elgg-config/settings.example.php ist nicht lesbar.',
130
-	'install:error:writesettingphp' => 'Es ist nicht möglich, in die Datei /elgg-config/settings.php zu schreiben bzw. diese Datei anzulegen.',
131
-	'install:error:requiredfield' => '%s ist eine notwendige Eingabe.',
132
-	'install:error:relative_path' => 'Der eingegebene Pfad "%s" scheint keine absolute Pfadangabe für Dein Datenverzeichnis zu sein.',
133
-	'install:error:datadirectoryexists' => 'Dein Datenverzeichnis %s ist nicht vorhanden.',
134
-	'install:error:writedatadirectory' => 'Dein Webserver hat keine Schreibberechtigung für das Datenverzeichnis %s.',
135
-	'install:error:locationdatadirectory' => 'Dein Datenverzeichnis %s muss aus Sicherheitsgründen außerhalb des Installationspfades von Elgg sein.',
136
-	'install:error:emailaddress' => '%s ist keine zulässige Email-Adresse.',
137
-	'install:error:createsite' => 'Das Erstellen der Community-Seite ist fehlgeschlagen.',
138
-	'install:error:savesitesettings' => 'Das Speichern der Seiteneinstellungen ist fehlgeschlagen.',
139
-	'install:error:loadadmin' => 'Der Administrator-Account kann nicht geladen werden.',
140
-	'install:error:adminaccess' => 'Das Zuweisen von Administrator-Privilegien an den neuen Benutzeraccount ist fehlgeschlagen.',
141
-	'install:error:adminlogin' => 'Das automatische Anmelden des neuen Administrator-Benutzers ist fehlgeschlagen.',
142
-	'install:error:rewrite:apache' => 'Die Überprüfung Deines Servers hat ergeben, dass der Apache-Webserver verwendet wird.',
143
-	'install:error:rewrite:nginx' => 'Die Überprüfung Deines Servers hat ergeben, dass der Nginx-Webserver verwendet wird.',
144
-	'install:error:rewrite:lighttpd' => 'Die Überprüfung Deines Servers hat ergeben, dass der Lighttpd-Webserver verwendet wird.',
145
-	'install:error:rewrite:iis' => 'Die Überprüfung Deines Servers hat ergeben, dass der IIS-Webserver verwendet wird.',
146
-	'install:error:rewrite:allowoverride' => "Der Rewrite-Test ist fehlgeschlagen. Die wahrscheinlichste Ursache ist, dass für das Elgg-Installationsverzeichnis 'AllowOverride All' nicht gesetzt ist. Die verhindert, dass der Apache-Webserver die Einstellungen in der Datei .htaccess verarbeiten kann, in welcher die Rewrite-Regeln gesetzt werden.
48
+    'install:check:readsettings' => 'Im Installationsverzeichnis von Elgg ist eine Konfigurationsdatei namens settings.php vorhanden, aber es fehlt die notwendige Leseberechtigung. Du kannst entweder die Datei löschen, damit sie neu angelegt werden kann oder Du kannst die Leseberechtigungen der Datei anpassen.',
49
+
50
+    'install:check:php:success' => "Die PHP-Konfiguration auf Deinem Server erfüllt alle notwendigen Voraussetzungen für Elgg.",
51
+    'install:check:rewrite:success' => 'Die Überprüfung der konfigurierten rewrite-Regeln war erfolgreich.',
52
+    'install:check:database' => 'Die Voraussetzungen für den Datenbank-Server werden überprüft, sobald Elgg seine Datenbank lädt.',
53
+
54
+    'install:database:instructions' => "Wenn Du nicht bereits eine Datenbank für Elgg angelegt hast, mache dies bitte jetzt. Trage dann die Verbindungsparameter unten ein, damit Elgg die Datenbank initialisieren kann.",
55
+    'install:database:error' => 'Bei der Initialisierung der Datenbank ist ein Problem aufgetreten und die Installation kann nicht fortgesetzt werden. Lies bitte die oben angezeigte Meldung und korrigiere die fehlerhaften Einstellungen. Wenn Du weitere Hilfe dafür benötigst, folge dem Link am Ende der Seite, um weitere Informationen zu möglichen Problemlösungen zu erhalten oder bitte in den Elgg-Community-Foren um Hilfe.',
56
+
57
+    'install:database:label:dbuser' =>  'Datenbank-Benutzername',
58
+    'install:database:label:dbpassword' => 'Datenbank-Passwort',
59
+    'install:database:label:dbname' => 'Datenbank-Name',
60
+    'install:database:label:dbhost' => 'Datenbank-Host',
61
+    'install:database:label:dbprefix' => 'Tabellen-Prefix',
62
+    'install:database:label:timezone' => "Zeitzone",
63
+
64
+    'install:database:help:dbuser' => 'Der Benutzername des MySQL-Accounts, der alle notwendigen Zugriffsprivilegien für die von Elgg zu verwendende Datenbank hat',
65
+    'install:database:help:dbpassword' => 'Das Passwort für den zu verwendeten Benutzeraccount',
66
+    'install:database:help:dbname' => 'Der Name der von zu verwendenden Datenbank',
67
+    'install:database:help:dbhost' => 'Der Hostname des MySQL-Servers (normalerweise \'localhost\')',
68
+    'install:database:help:dbprefix' => "Das Tabellen-Prefix das bei allen Elgg-Tabellen in der Datenbank gesetzt wird (normalerweise \'elgg_\')",
69
+    'install:database:help:timezone' => "Die Zeitzone, die von der Elggseite standardmäßig verwendet werden soll",
70
+
71
+    'install:settings:instructions' => 'Für die weitere Konfiguration der Elgg-Seite benötigen wir einige Eingaben. Wenn Du noch kein\'t <a href=""http://learn.elgg.org/en/1.x/intro/install.html#create-a-data-folder" target="_blank">Elgg-Datenverzeichnis</a> angelegt hast, mußt Du dies jetzt tun.',
72
+
73
+    'install:settings:label:sitename' => 'Seiten-Name',
74
+    'install:settings:label:siteemail' => 'Email-Adresse',
75
+    'install:database:label:wwwroot' => 'URL der Seite',
76
+    'install:settings:label:path' => 'Elgg-Installationsverzeichnis',
77
+    'install:database:label:dataroot' => 'Datenverzeichnis',
78
+    'install:settings:label:language' => 'Sprache der Seite',
79
+    'install:settings:label:siteaccess' => 'Standard-Zugangslevel',
80
+    'install:label:combo:dataroot' => 'Datenverzeichnis von Elgg anlegen lassen',
81
+
82
+    'install:settings:help:sitename' => 'Der Name Deiner neuen Elgg Community-Seite',
83
+    'install:settings:help:siteemail' => 'Die Email-Adresse die von Elgg für die Kommunikation mit Benutzern verwendet wird',
84
+    'install:database:help:wwwroot' => 'Die Adresse der Community-Seite (Elgg kann sie in den meisten Fällen korrekt erkennen)',
85
+    'install:settings:help:path' => 'Das Verzeichnis auf dem Server, in das Du den Elgg-Code kopiert hast (Elgg kann es in den meisten Fällen korrekt erkennen)',
86
+    'install:database:help:dataroot' => 'Das Verzeichnis, das Du auf dem Server angelegt hast, in dem Elgg Dateien speichern kann (die Zugriffrechte werden beim Klicken auf den "Weiter"-Knopf überprüft). Es muss ein vollständiger (absoluter) Pfad eingegeben werden.',
87
+    'install:settings:help:dataroot:apache' => 'Du hast die Wahl, Elgg das Datenverzeichnis für die Speicherung von Benutzer-Dateien anlegen zu lassen oder den Pfad zum bereits angelegten Datenverzeichnis einzugeben (die Zugriffrechte dieses Verzeichnisses werden beim Klicken auf den "Weiter"-Knopf überprüft)',
88
+    'install:settings:help:language' => 'Die Standardsprache für Deine Community-Seite',
89
+    'install:settings:help:siteaccess' => 'Der Standard-Zugangslevel für neu von Benutzern erzeugte Inhalte',
90
+
91
+    'install:admin:instructions' => "Nun ist es Zeit, einen Administrator-Account anzulegen.",
92
+
93
+    'install:admin:label:displayname' => 'Name',
94
+    'install:admin:label:email' => 'Email-Adresse',
95
+    'install:admin:label:username' => 'Benutzername',
96
+    'install:admin:label:password1' => 'Passwort',
97
+    'install:admin:label:password2' => 'Passwort',
98
+
99
+    'install:admin:help:displayname' => 'Der Name, der auf der Community-Seite für diesen Benutzeraccount angezeigt wird',
100
+    'install:admin:help:email' => '',
101
+    'install:admin:help:username' => 'Benutzername des Account, der für die Anmeldung verwendet wird',
102
+    'install:admin:help:password1' => "Das Passwort muss mindestens %u Zeichen lang sein",
103
+    'install:admin:help:password2' => 'Gebe das Password zur Bestätigung erneut ein',
104
+
105
+    'install:admin:password:mismatch' => 'Passwort muss bei beiden Eingaben übereinstimmen.',
106
+    'install:admin:password:empty' => 'Das Passwort-Feld muss ausgefüllt werden.',
107
+    'install:admin:password:tooshort' => 'Dein Passwort war zu kurz.',
108
+    'install:admin:cannot_create' => 'Die Erzeugung des Administrator-Accounts ist fehlgeschlagen.',
109
+
110
+    'install:complete:instructions' => 'Die Installation Deiner Elgg Community-Seite ist nun abgeschlossen. Klicke auf den Knopf unten, um zur Startseite weitergeleitet zu werden.',
111
+    'install:complete:gotosite' => 'Zur Seite gehen',
112
+
113
+    'InstallationException:UnknownStep' => '%s ist ein unbekannter Installationsschritt.',
114
+    'InstallationException:MissingLibrary' => 'Das Laden von %s ist fehlgeschlagen',
115
+    'InstallationException:CannotLoadSettings' => 'Elgg konnte die settings-Datei nicht laden. Entweder existiert die Datei nicht oder es gibt ein Problem aufgrund der Zugriffsrechte, die für die Datei gesetzt sind.',
116
+
117
+    'install:success:database' => 'Die Datenbank wurde initialisiert.',
118
+    'install:success:settings' => 'Die Seiten-Einstellungen wurden gespeichert.',
119
+    'install:success:admin' => 'Der Administrator-Account wurde angelegt.',
120
+
121
+    'install:error:htaccess' => 'Das Erzeugen der .htaccess-Datei ist fehlgeschlagen.',
122
+    'install:error:settings' => 'Die settings-Datei konnte nicht erzeugt werden.',
123
+    'install:error:databasesettings' => 'Elgg konnte mit den eingegebenen Verbindungsparametern keine Verbindung mit der Datenbank herstellen.',
124
+    'install:error:database_prefix' => 'Das eingegebene Tabellen-Prefix enthält unzulässige Zeichen.',
125
+    'install:error:oldmysql2' => 'Voraussetzung für Elgg ist MySQL in Version 5.5.3 oder neuer. Dein Server verwendet Version %s.',
126
+    'install:error:nodatabase' => 'Der Zugriff auf die Datenbank %s ist nicht möglich. Möglicherweise ist die Datenbank nicht vorhanden.',
127
+    'install:error:cannotloadtables' => 'Der Zugriff auf die Tabellen der Datenbank ist nicht möglich.',
128
+    'install:error:tables_exist' => 'In der Datenbank ist bereits eine Elgg-Tabellenstruktur vorhanden. Du mußt entweder diese Tabellen aus der Datenbank löschen oder die Installation neu starten. Bei einem Neustart kann versucht werden, die bestehende Tabellenstruktur zu verwenden. Um die Installation neu zu starten, entferne \'?step=database\' aus der URL in der Adressleiste Deines Browsers und drücke \'Enter\'.',
129
+    'install:error:readsettingsphp' => 'Die Datei /elgg-config/settings.example.php ist nicht lesbar.',
130
+    'install:error:writesettingphp' => 'Es ist nicht möglich, in die Datei /elgg-config/settings.php zu schreiben bzw. diese Datei anzulegen.',
131
+    'install:error:requiredfield' => '%s ist eine notwendige Eingabe.',
132
+    'install:error:relative_path' => 'Der eingegebene Pfad "%s" scheint keine absolute Pfadangabe für Dein Datenverzeichnis zu sein.',
133
+    'install:error:datadirectoryexists' => 'Dein Datenverzeichnis %s ist nicht vorhanden.',
134
+    'install:error:writedatadirectory' => 'Dein Webserver hat keine Schreibberechtigung für das Datenverzeichnis %s.',
135
+    'install:error:locationdatadirectory' => 'Dein Datenverzeichnis %s muss aus Sicherheitsgründen außerhalb des Installationspfades von Elgg sein.',
136
+    'install:error:emailaddress' => '%s ist keine zulässige Email-Adresse.',
137
+    'install:error:createsite' => 'Das Erstellen der Community-Seite ist fehlgeschlagen.',
138
+    'install:error:savesitesettings' => 'Das Speichern der Seiteneinstellungen ist fehlgeschlagen.',
139
+    'install:error:loadadmin' => 'Der Administrator-Account kann nicht geladen werden.',
140
+    'install:error:adminaccess' => 'Das Zuweisen von Administrator-Privilegien an den neuen Benutzeraccount ist fehlgeschlagen.',
141
+    'install:error:adminlogin' => 'Das automatische Anmelden des neuen Administrator-Benutzers ist fehlgeschlagen.',
142
+    'install:error:rewrite:apache' => 'Die Überprüfung Deines Servers hat ergeben, dass der Apache-Webserver verwendet wird.',
143
+    'install:error:rewrite:nginx' => 'Die Überprüfung Deines Servers hat ergeben, dass der Nginx-Webserver verwendet wird.',
144
+    'install:error:rewrite:lighttpd' => 'Die Überprüfung Deines Servers hat ergeben, dass der Lighttpd-Webserver verwendet wird.',
145
+    'install:error:rewrite:iis' => 'Die Überprüfung Deines Servers hat ergeben, dass der IIS-Webserver verwendet wird.',
146
+    'install:error:rewrite:allowoverride' => "Der Rewrite-Test ist fehlgeschlagen. Die wahrscheinlichste Ursache ist, dass für das Elgg-Installationsverzeichnis 'AllowOverride All' nicht gesetzt ist. Die verhindert, dass der Apache-Webserver die Einstellungen in der Datei .htaccess verarbeiten kann, in welcher die Rewrite-Regeln gesetzt werden.
147 147
 		\n\nEine andere mögliche Ursache ist, dass in der Konfiguration des Apache-Webservers ein Alias für Dein Elgg-Installationsverzeichnis definiert ist. Dann mußt Du in der Datei .htaccess die richtige Einstellung für RewriteBase setzen. In der Datei .htaccess in Deinem Elgg-Installationsverzeichnis sind weitere Hinweise, was zu tun ist.",
148
-	'install:error:rewrite:htaccess:write_permission' => 'Dein Webserver hat nicht die notwendige Schreibberechtigung, um im Elgg-Installationsverzeichnis die Datei .htaccess automatisch zu erzeugen. Du mußt entweder (nur während der Installation!) die Zugriffsberechtigungen für das Elgg-Installationsverzeichnis ändern oder selbst die Datei .htaccess im Elgg-Installationsverzeichnis anlegen, indem Du sie aus der Datei install/config/htaccess.dist durch Kopieren und Umbenennen erzeugst.',
149
-	'install:error:rewrite:htaccess:read_permission' => 'Im Elgg-Installationsverzeichnis ist die Datei .htaccess vorhanden, aber Dein Webserver hat keine Leseberechtigung für diese Datei.',
150
-	'install:error:rewrite:htaccess:non_elgg_htaccess' => 'Im Elgg-Installationsverzeichnis ist eine Datei namens .htaccess, die nicht von Elgg angelegt wurde. Bitte entferne diese Datei.',
151
-	'install:error:rewrite:htaccess:old_elgg_htaccess' => 'Im Elgg-Installationsverzeichnis scheint eine veraltete .htaccess-Datei vorhanden zu sein. Sie enthält nicht die Rewrite-Regeln für das Überprüfen des Webservers.',
152
-	'install:error:rewrite:htaccess:cannot_copy' => 'Beim Erzeugen der Datei .htaccess im Elgg-Installationsverzeichnis ist ein unbekannter Fehler aufgetreten. Du mußt die Datei .htaccess selbst im Elgg-Installationsverzeichnis anlegen, indem Du sie aus der Datei install/config/htaccess.dist durch Kopieren und Umbenennen erzeugst.',
153
-	'install:error:rewrite:altserver' => 'Der Test der Rewrite-Regeln ist fehlgeschlagen. Du mußt die Rewrite-Regeln von Elgg selbst zur Konfiguration Deines Webservers hinzufügen und es dann wieder versuchen.',
154
-	'install:error:rewrite:unknown' => 'Uups. Es war nicht möglich festzustellen, welches Webserver-Programm auf Deinem Server verwendet wird. Darüber hinaus ist der Test der Rewrite-Regeln von Elgg fehlgeschlagen. Es ist leider nicht möglich, spezifischere Hinweise zu den Ursachen des Problems zu geben. Bitte folge dem Link zu Hinweisen bei Installationsproblemen.',
155
-	'install:warning:rewrite:unknown' => 'Dein Server unterstützt die automatische Prüfung von Rewrite-Regeln nicht und Dein Browser unterstützt es nicht, mit Hilfe von Javascript die Rewrite-Regeln auf Funktionsfähigkeit zu überprüfen. Du kannst die Installation fortsetzen, aber es kann sein, das Deine Community-Seite nicht einwandfrei funktionieren wird. Du kannst die Überprüfung der Rewrite-Regeln selbst durchführen, indem Du diesem Link folgst: <a href="%s" target="_blank">Test</a>. Du wirst die Meldung \'success\' bekommen, wenn die Rewrite-Regeln funktionieren.',
148
+    'install:error:rewrite:htaccess:write_permission' => 'Dein Webserver hat nicht die notwendige Schreibberechtigung, um im Elgg-Installationsverzeichnis die Datei .htaccess automatisch zu erzeugen. Du mußt entweder (nur während der Installation!) die Zugriffsberechtigungen für das Elgg-Installationsverzeichnis ändern oder selbst die Datei .htaccess im Elgg-Installationsverzeichnis anlegen, indem Du sie aus der Datei install/config/htaccess.dist durch Kopieren und Umbenennen erzeugst.',
149
+    'install:error:rewrite:htaccess:read_permission' => 'Im Elgg-Installationsverzeichnis ist die Datei .htaccess vorhanden, aber Dein Webserver hat keine Leseberechtigung für diese Datei.',
150
+    'install:error:rewrite:htaccess:non_elgg_htaccess' => 'Im Elgg-Installationsverzeichnis ist eine Datei namens .htaccess, die nicht von Elgg angelegt wurde. Bitte entferne diese Datei.',
151
+    'install:error:rewrite:htaccess:old_elgg_htaccess' => 'Im Elgg-Installationsverzeichnis scheint eine veraltete .htaccess-Datei vorhanden zu sein. Sie enthält nicht die Rewrite-Regeln für das Überprüfen des Webservers.',
152
+    'install:error:rewrite:htaccess:cannot_copy' => 'Beim Erzeugen der Datei .htaccess im Elgg-Installationsverzeichnis ist ein unbekannter Fehler aufgetreten. Du mußt die Datei .htaccess selbst im Elgg-Installationsverzeichnis anlegen, indem Du sie aus der Datei install/config/htaccess.dist durch Kopieren und Umbenennen erzeugst.',
153
+    'install:error:rewrite:altserver' => 'Der Test der Rewrite-Regeln ist fehlgeschlagen. Du mußt die Rewrite-Regeln von Elgg selbst zur Konfiguration Deines Webservers hinzufügen und es dann wieder versuchen.',
154
+    'install:error:rewrite:unknown' => 'Uups. Es war nicht möglich festzustellen, welches Webserver-Programm auf Deinem Server verwendet wird. Darüber hinaus ist der Test der Rewrite-Regeln von Elgg fehlgeschlagen. Es ist leider nicht möglich, spezifischere Hinweise zu den Ursachen des Problems zu geben. Bitte folge dem Link zu Hinweisen bei Installationsproblemen.',
155
+    'install:warning:rewrite:unknown' => 'Dein Server unterstützt die automatische Prüfung von Rewrite-Regeln nicht und Dein Browser unterstützt es nicht, mit Hilfe von Javascript die Rewrite-Regeln auf Funktionsfähigkeit zu überprüfen. Du kannst die Installation fortsetzen, aber es kann sein, das Deine Community-Seite nicht einwandfrei funktionieren wird. Du kannst die Überprüfung der Rewrite-Regeln selbst durchführen, indem Du diesem Link folgst: <a href="%s" target="_blank">Test</a>. Du wirst die Meldung \'success\' bekommen, wenn die Rewrite-Regeln funktionieren.',
156 156
 	
157
-	// Bring over some error messages you might see in setup
158
-	'exception:contact_admin' => 'Es ist ein nicht behebbarer Fehler aufgetreten. Der Fehler wurde protokolliert. Wenn Du der Seitenadministrator bist, prüfe bitte die Konfiguration in settings.php. Andernfalls leite bitte leite folgende Informationen an den Seitenadministrator weiter:',
159
-	'DatabaseException:WrongCredentials' => "Elgg konnte mit den gegebenen Verbindungsparametern keine Verbindung zur Datenbank herstellen. Bitte prüfe die Konfiguration in settings.php.",
157
+    // Bring over some error messages you might see in setup
158
+    'exception:contact_admin' => 'Es ist ein nicht behebbarer Fehler aufgetreten. Der Fehler wurde protokolliert. Wenn Du der Seitenadministrator bist, prüfe bitte die Konfiguration in settings.php. Andernfalls leite bitte leite folgende Informationen an den Seitenadministrator weiter:',
159
+    'DatabaseException:WrongCredentials' => "Elgg konnte mit den gegebenen Verbindungsparametern keine Verbindung zur Datenbank herstellen. Bitte prüfe die Konfiguration in settings.php.",
160 160
 ];
Please login to merge, or discard this patch.
install/languages/gl.php 1 patch
Indentation   +137 added lines, -137 removed lines patch added patch discarded remove patch
@@ -1,162 +1,162 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3
-	'install:title' => 'Instalación de Elgg',
4
-	'install:welcome' => 'Benvida',
5
-	'install:requirements' => 'Comprobación de requisitos',
6
-	'install:database' => 'Instalación da base de datos',
7
-	'install:settings' => 'Configurar o siti',
8
-	'install:admin' => 'Crear unha conta de administrador',
9
-	'install:complete' => 'List',
3
+    'install:title' => 'Instalación de Elgg',
4
+    'install:welcome' => 'Benvida',
5
+    'install:requirements' => 'Comprobación de requisitos',
6
+    'install:database' => 'Instalación da base de datos',
7
+    'install:settings' => 'Configurar o siti',
8
+    'install:admin' => 'Crear unha conta de administrador',
9
+    'install:complete' => 'List',
10 10
 
11
-	'install:next' => 'Seguinte',
12
-	'install:refresh' => 'Actualizar',
11
+    'install:next' => 'Seguinte',
12
+    'install:refresh' => 'Actualizar',
13 13
 
14
-	'install:welcome:instructions' => "Instalar Elgg é cuestión de completar 6 pasos, e esta benvida é o primeiro!
14
+    'install:welcome:instructions' => "Instalar Elgg é cuestión de completar 6 pasos, e esta benvida é o primeiro!
15 15
 
16 16
 Antes de nada, procura ler as instrucións de instalación que van incluídas con Elgg, ou segue a ligazón de instrucións na parte inferior desta páxina.
17 17
 
18 18
 Se estás listo para continuar, preme o botón de «Seguinte».",
19
-	'install:requirements:instructions:success' => "O servidor cumpre cos requisitos.",
20
-	'install:requirements:instructions:failure' => "O servidor non cumpre cos requisitos. Solucione os problemas listados e actualice esta páxina. Se necesita máis axuda, bótelle un ollo ás ligazóns de solución de problemas ao final desta páxina.",
21
-	'install:requirements:instructions:warning' => "O servidor cumpre cos requisitos, pero durante a comprobación apareceron avisos. Recomendámoslle que lle bote unha ollada á páxina de solución de problemas para máis información.",
19
+    'install:requirements:instructions:success' => "O servidor cumpre cos requisitos.",
20
+    'install:requirements:instructions:failure' => "O servidor non cumpre cos requisitos. Solucione os problemas listados e actualice esta páxina. Se necesita máis axuda, bótelle un ollo ás ligazóns de solución de problemas ao final desta páxina.",
21
+    'install:requirements:instructions:warning' => "O servidor cumpre cos requisitos, pero durante a comprobación apareceron avisos. Recomendámoslle que lle bote unha ollada á páxina de solución de problemas para máis información.",
22 22
 
23
-	'install:require:php' => 'PHP',
24
-	'install:require:rewrite' => 'Servidor we',
25
-	'install:require:settings' => 'Ficheiro de configuración',
26
-	'install:require:database' => 'Base de datos',
23
+    'install:require:php' => 'PHP',
24
+    'install:require:rewrite' => 'Servidor we',
25
+    'install:require:settings' => 'Ficheiro de configuración',
26
+    'install:require:database' => 'Base de datos',
27 27
 
28
-	'install:check:root' => 'O seu servidor web carece de permisos para crear un ficheiro «.htaccess» no cartafol raíz de Elgg. Quédanlle dúas alternativas:
28
+    'install:check:root' => 'O seu servidor web carece de permisos para crear un ficheiro «.htaccess» no cartafol raíz de Elgg. Quédanlle dúas alternativas:
29 29
 
30 30
 		• Cambiar os permisos do cartafol raíz de Elgg.
31 31
 
32 32
 		• Copiar o ficheiro de «install/config/htaccess.dist» a «.htaccess».',
33 33
 
34
-	'install:check:php:version' => 'Elgg necesita PHP %s ou unha versión superior. O servidor usa PHP %s.',
35
-	'install:check:php:extension' => 'Elgg necesita a extensión de PHP «%s».',
36
-	'install:check:php:extension:recommend' => 'Recoméndase instalar a extensión de PHP «%s».',
37
-	'install:check:php:open_basedir' => 'É posíbel que a directiva «open_basedir» de PHP lle impida a Elgg gardar ficheiros no seu cartafol de datos.',
38
-	'install:check:php:safe_mode' => 'Non se recomenda executar PHP en modo seguro, dado que pode ocasionar problemas con Elgg.',
39
-	'install:check:php:arg_separator' => 'O valor de «arg_separator.output» debe ser «&» para que Elgg funcione. O valor actual do servidor é «%s».',
40
-	'install:check:php:register_globals' => 'O rexistro de variábeis globais (opción «register_globals») debe estar desactivado.
34
+    'install:check:php:version' => 'Elgg necesita PHP %s ou unha versión superior. O servidor usa PHP %s.',
35
+    'install:check:php:extension' => 'Elgg necesita a extensión de PHP «%s».',
36
+    'install:check:php:extension:recommend' => 'Recoméndase instalar a extensión de PHP «%s».',
37
+    'install:check:php:open_basedir' => 'É posíbel que a directiva «open_basedir» de PHP lle impida a Elgg gardar ficheiros no seu cartafol de datos.',
38
+    'install:check:php:safe_mode' => 'Non se recomenda executar PHP en modo seguro, dado que pode ocasionar problemas con Elgg.',
39
+    'install:check:php:arg_separator' => 'O valor de «arg_separator.output» debe ser «&» para que Elgg funcione. O valor actual do servidor é «%s».',
40
+    'install:check:php:register_globals' => 'O rexistro de variábeis globais (opción «register_globals») debe estar desactivado.
41 41
 ',
42
-	'install:check:php:session.auto_start' => "A opción «session.auto_start» debe estar desactivada para que Elgg funcione. Cambie a configuración do servidor ou engada a directiva ao ficheiro «.htaccess» de Elgg.",
42
+    'install:check:php:session.auto_start' => "A opción «session.auto_start» debe estar desactivada para que Elgg funcione. Cambie a configuración do servidor ou engada a directiva ao ficheiro «.htaccess» de Elgg.",
43 43
 
44
-	'install:check:installdir' => 'Your web server does not have permission to create the settings.php file in your installation directory. You have two choices:
44
+    'install:check:installdir' => 'Your web server does not have permission to create the settings.php file in your installation directory. You have two choices:
45 45
 
46 46
 		1. Change the permissions on the elgg-config directory of your Elgg installation
47 47
 
48 48
 		2. Copy the file %s/settings.example.php to elgg-config/settings.php and follow the instructions in it for setting your database parameters.',
49
-	'install:check:readsettings' => 'Existe un ficheiro de configuración no cartafol do motor, pero o servidor web non ten permisos de lectura nel. Pode eliminar o ficheiro ou darlle ao servidor permisos de lectura sobre el.',
50
-
51
-	'install:check:php:success' => "O PHP do servidor cumpre cos requisitos de Elgg.",
52
-	'install:check:rewrite:success' => 'O servidor pasou a proba das regras de reescritura.',
53
-	'install:check:database' => 'Elgg non pode comprobar que a base de datos cumpre cos requisitos ata que non a carga.',
54
-
55
-	'install:database:instructions' => "Se aínda non creou unha base de datos para Elgg, fágao agora. A continuación complete os seguintes campos para preparar a base de datos para Elgg.",
56
-	'install:database:error' => 'Non foi posíbel crear a base de datos de Elgg por mor dun erro, e a instalación non pode continuar. Revise a mensaxe da parte superior e corrixa calquera problema. Se necesita máis axuda, siga a ligazón de solución de problemas de instalación na parte inferior desta páxina, ou publique unha mensaxe nos foros da comunidade de Elgg.',
57
-
58
-	'install:database:label:dbuser' =>  'Usuario',
59
-	'install:database:label:dbpassword' => 'Contrasinal',
60
-	'install:database:label:dbname' => 'Base de datos',
61
-	'install:database:label:dbhost' => 'Servidor',
62
-	'install:database:label:dbprefix' => 'Prefixo das táboas',
63
-	'install:database:label:timezone' => "Timezone",
64
-
65
-	'install:database:help:dbuser' => 'Usuario que ten todos os permisos posíbeis sobre a base de datos MySQL que creou para Elgg.',
66
-	'install:database:help:dbpassword' => 'Contrasinal da conta de usuario da base de datos introducida no campo anterior.',
67
-	'install:database:help:dbname' => 'Nome da base de datos para Elgg.',
68
-	'install:database:help:dbhost' => 'Enderezo do servidor de MySQL (normalmente é «localhost»).',
69
-	'install:database:help:dbprefix' => "O prefixo que se lles engade a todas as táboas de Elgg (normalmente é «elgg_»).",
70
-	'install:database:help:timezone' => "The default timezone in which the site will operate",
71
-
72
-	'install:settings:instructions' => 'Necesítase algunha información sobre o sitio durante a configuración de Elgg. Se aínda non <a href="http://learn.elgg.org/en/1.x/intro/install.html#create-a-data-folder" target="_blank">creou un cartafol de datos</a> para Elgg, fágao agora.',
73
-
74
-	'install:settings:label:sitename' => 'Nome',
75
-	'install:settings:label:siteemail' => 'Enderezo de correo',
76
-	'install:database:label:wwwroot' => 'URL',
77
-	'install:settings:label:path' => 'Cartafol de instalación',
78
-	'install:database:label:dataroot' => 'Cartafol de datos',
79
-	'install:settings:label:language' => 'Idioma',
80
-	'install:settings:label:siteaccess' => 'Acceso predeterminado',
81
-	'install:label:combo:dataroot' => 'Elgg crea o cartafol de datos',
82
-
83
-	'install:settings:help:sitename' => 'Nome do novo sitio Elgg.',
84
-	'install:settings:help:siteemail' => 'Enderezo de correo electrónico que Elgg empregará para contactar con usuarios.',
85
-	'install:database:help:wwwroot' => 'O enderezo do sitio (Elgg adoita determinar o valor correcto automaticamente)',
86
-	'install:settings:help:path' => 'O cartafol onde estará o código de Elgg (Elgg adoita atopar o cartafol automaticamente).',
87
-	'install:database:help:dataroot' => 'O cartafol que creou para que Elgg garde os ficheiros (cando prema «Seguinte» comprobaranse os permisos do cartafol). Debe ser unha ruta absoluta.',
88
-	'install:settings:help:dataroot:apache' => 'Pode permitir que Elgg cree o cartafol de datos ou pode indicar o cartafol que vostede xa creou para gardar os ficheiros dos usuarios (ao premer «Seguinte» comprobaranse os permisos do cartafol).',
89
-	'install:settings:help:language' => 'O idioma predeterminado do sitio.',
90
-	'install:settings:help:siteaccess' => 'O nivel de acceso predeterminado para o novo contido que creen os usuarios.',
91
-
92
-	'install:admin:instructions' => "É hora de crear unha conta de administrador",
93
-
94
-	'install:admin:label:displayname' => 'Nome para mostrar',
95
-	'install:admin:label:email' => 'Enderezo de correo',
96
-	'install:admin:label:username' => 'Nome de usuario',
97
-	'install:admin:label:password1' => 'Contrasinal',
98
-	'install:admin:label:password2' => 'Contrasinal (repítaa)',
99
-
100
-	'install:admin:help:displayname' => 'Nome que se mostra no sitio para esta conta.',
101
-	'install:admin:help:email' => '',
102
-	'install:admin:help:username' => 'Nome de usuario da conta que pode empregar para acceder ao sitio identificándose coa conta.',
103
-	'install:admin:help:password1' => "Contrasinal da conta. Debe ter polo menos %u caracteres.",
104
-	'install:admin:help:password2' => 'Volva escribir o contrasinal para confirmalo.',
105
-
106
-	'install:admin:password:mismatch' => 'Os contrasinais deben coincidir.',
107
-	'install:admin:password:empty' => 'O campo do contrasinal non pode quedar baleiro.',
108
-	'install:admin:password:tooshort' => 'O contrasinal era curto de máis',
109
-	'install:admin:cannot_create' => 'Non foi posíbel crear unha conta de adminsitrador',
110
-
111
-	'install:complete:instructions' => 'O novo sitio Elgg está listo. Prema o seguinte botón para acceder a el.',
112
-	'install:complete:gotosite' => 'Ir ao siti',
113
-
114
-	'InstallationException:UnknownStep' => 'Descoñécese o paso de instalación «%s».',
115
-	'InstallationException:MissingLibrary' => 'Non foi posíbel cargar «%s»',
116
-	'InstallationException:CannotLoadSettings' => 'Elgg non puido cargar o ficheiro de configuración. Ou ben o ficheiro non existe, ou ben hai un problema de permisos.',
117
-
118
-	'install:success:database' => 'Instalouse a base de datos',
119
-	'install:success:settings' => 'Gardouse a configuración do sitio.',
120
-	'install:success:admin' => 'Creouse a conta de administrador.',
121
-
122
-	'install:error:htaccess' => 'Non foi posíbel crear «.htaccess».',
123
-	'install:error:settings' => 'Non foi posíbel crear o ficheiro de configuración.',
124
-	'install:error:databasesettings' => 'Non foi posíbel conectarse á base de datos coa información de conexión indicada.',
125
-	'install:error:database_prefix' => 'O prefixo da base de datos contén caracteres que non son válidos.',
126
-	'install:error:oldmysql2' => 'O servidor de bases de datos debe ser un MySQL 5.5.3 ou unha versión superior. O servidor actual usa MySQL %s.',
127
-	'install:error:nodatabase' => 'Non foi posíbel usar a base de datos «%s». Pode que non exista.',
128
-	'install:error:cannotloadtables' => 'Non foi posíbel cargar as táboas da base de datos.',
129
-	'install:error:tables_exist' => 'A base de datos xa contén táboas de Elgg. Ten que eliminar esas táboas ou reiniciar o instalador e intentar facer uso delas. Para reiniciar o instalador, elimine a parte de «?step=database» do URL na barra do URL do navegador, e prema Intro.',
130
-	'install:error:readsettingsphp' => 'Unable to read /elgg-config/settings.example.php',
131
-	'install:error:writesettingphp' => 'Unable to write /elgg-config/settings.php',
132
-	'install:error:requiredfield' => 'Necesítase «%s».',
133
-	'install:error:relative_path' => 'A ruta «%s» para o cartafol de datos non parece unha ruta absoluta.',
134
-	'install:error:datadirectoryexists' => 'O cartafol de datos, «%s», non existe.',
135
-	'install:error:writedatadirectory' => 'O servidor web non ten permisos de escritura no cartafol de datos, «%s».',
136
-	'install:error:locationdatadirectory' => 'Por motivos de seguranza, o cartafol de datos («%s») non pode estar dentro do cartafol de instalación.',
137
-	'install:error:emailaddress' => '%s non é un enderezo de correo válido.',
138
-	'install:error:createsite' => 'Non foi posíbel crear o sitio.',
139
-	'install:error:savesitesettings' => 'Non foi posíbel gardar a configuración do sitio.',
140
-	'install:error:loadadmin' => 'Non foi posíbel cargar o administrador.',
141
-	'install:error:adminaccess' => 'Non foi posíbel darlle privilexios de administrador á nova conta de usuario.',
142
-	'install:error:adminlogin' => 'Non foi posíbel acceder automaticamente ao sitio coa nova conta de administrador',
143
-	'install:error:rewrite:apache' => 'Parece que o servidor web que está a usar é Apache.',
144
-	'install:error:rewrite:nginx' => 'Parece que o servidor web que está a usar é Nginx.',
145
-	'install:error:rewrite:lighttpd' => 'Parece que o servidor web que está a usar é Lighttpd.',
146
-	'install:error:rewrite:iis' => 'Parece que o servidor web que está a usar é IIS.',
147
-	'install:error:rewrite:allowoverride' => "Non se pasou a proba de reescritura. O máis probábel é que fose porque a opción «AllowOverride» non ten o valor «All» para o cartafol de Elgg. Isto impídelle a Apache procesar o ficheiro «.htaccess» que contén as regras de reescritura.\n\n
49
+    'install:check:readsettings' => 'Existe un ficheiro de configuración no cartafol do motor, pero o servidor web non ten permisos de lectura nel. Pode eliminar o ficheiro ou darlle ao servidor permisos de lectura sobre el.',
50
+
51
+    'install:check:php:success' => "O PHP do servidor cumpre cos requisitos de Elgg.",
52
+    'install:check:rewrite:success' => 'O servidor pasou a proba das regras de reescritura.',
53
+    'install:check:database' => 'Elgg non pode comprobar que a base de datos cumpre cos requisitos ata que non a carga.',
54
+
55
+    'install:database:instructions' => "Se aínda non creou unha base de datos para Elgg, fágao agora. A continuación complete os seguintes campos para preparar a base de datos para Elgg.",
56
+    'install:database:error' => 'Non foi posíbel crear a base de datos de Elgg por mor dun erro, e a instalación non pode continuar. Revise a mensaxe da parte superior e corrixa calquera problema. Se necesita máis axuda, siga a ligazón de solución de problemas de instalación na parte inferior desta páxina, ou publique unha mensaxe nos foros da comunidade de Elgg.',
57
+
58
+    'install:database:label:dbuser' =>  'Usuario',
59
+    'install:database:label:dbpassword' => 'Contrasinal',
60
+    'install:database:label:dbname' => 'Base de datos',
61
+    'install:database:label:dbhost' => 'Servidor',
62
+    'install:database:label:dbprefix' => 'Prefixo das táboas',
63
+    'install:database:label:timezone' => "Timezone",
64
+
65
+    'install:database:help:dbuser' => 'Usuario que ten todos os permisos posíbeis sobre a base de datos MySQL que creou para Elgg.',
66
+    'install:database:help:dbpassword' => 'Contrasinal da conta de usuario da base de datos introducida no campo anterior.',
67
+    'install:database:help:dbname' => 'Nome da base de datos para Elgg.',
68
+    'install:database:help:dbhost' => 'Enderezo do servidor de MySQL (normalmente é «localhost»).',
69
+    'install:database:help:dbprefix' => "O prefixo que se lles engade a todas as táboas de Elgg (normalmente é «elgg_»).",
70
+    'install:database:help:timezone' => "The default timezone in which the site will operate",
71
+
72
+    'install:settings:instructions' => 'Necesítase algunha información sobre o sitio durante a configuración de Elgg. Se aínda non <a href="http://learn.elgg.org/en/1.x/intro/install.html#create-a-data-folder" target="_blank">creou un cartafol de datos</a> para Elgg, fágao agora.',
73
+
74
+    'install:settings:label:sitename' => 'Nome',
75
+    'install:settings:label:siteemail' => 'Enderezo de correo',
76
+    'install:database:label:wwwroot' => 'URL',
77
+    'install:settings:label:path' => 'Cartafol de instalación',
78
+    'install:database:label:dataroot' => 'Cartafol de datos',
79
+    'install:settings:label:language' => 'Idioma',
80
+    'install:settings:label:siteaccess' => 'Acceso predeterminado',
81
+    'install:label:combo:dataroot' => 'Elgg crea o cartafol de datos',
82
+
83
+    'install:settings:help:sitename' => 'Nome do novo sitio Elgg.',
84
+    'install:settings:help:siteemail' => 'Enderezo de correo electrónico que Elgg empregará para contactar con usuarios.',
85
+    'install:database:help:wwwroot' => 'O enderezo do sitio (Elgg adoita determinar o valor correcto automaticamente)',
86
+    'install:settings:help:path' => 'O cartafol onde estará o código de Elgg (Elgg adoita atopar o cartafol automaticamente).',
87
+    'install:database:help:dataroot' => 'O cartafol que creou para que Elgg garde os ficheiros (cando prema «Seguinte» comprobaranse os permisos do cartafol). Debe ser unha ruta absoluta.',
88
+    'install:settings:help:dataroot:apache' => 'Pode permitir que Elgg cree o cartafol de datos ou pode indicar o cartafol que vostede xa creou para gardar os ficheiros dos usuarios (ao premer «Seguinte» comprobaranse os permisos do cartafol).',
89
+    'install:settings:help:language' => 'O idioma predeterminado do sitio.',
90
+    'install:settings:help:siteaccess' => 'O nivel de acceso predeterminado para o novo contido que creen os usuarios.',
91
+
92
+    'install:admin:instructions' => "É hora de crear unha conta de administrador",
93
+
94
+    'install:admin:label:displayname' => 'Nome para mostrar',
95
+    'install:admin:label:email' => 'Enderezo de correo',
96
+    'install:admin:label:username' => 'Nome de usuario',
97
+    'install:admin:label:password1' => 'Contrasinal',
98
+    'install:admin:label:password2' => 'Contrasinal (repítaa)',
99
+
100
+    'install:admin:help:displayname' => 'Nome que se mostra no sitio para esta conta.',
101
+    'install:admin:help:email' => '',
102
+    'install:admin:help:username' => 'Nome de usuario da conta que pode empregar para acceder ao sitio identificándose coa conta.',
103
+    'install:admin:help:password1' => "Contrasinal da conta. Debe ter polo menos %u caracteres.",
104
+    'install:admin:help:password2' => 'Volva escribir o contrasinal para confirmalo.',
105
+
106
+    'install:admin:password:mismatch' => 'Os contrasinais deben coincidir.',
107
+    'install:admin:password:empty' => 'O campo do contrasinal non pode quedar baleiro.',
108
+    'install:admin:password:tooshort' => 'O contrasinal era curto de máis',
109
+    'install:admin:cannot_create' => 'Non foi posíbel crear unha conta de adminsitrador',
110
+
111
+    'install:complete:instructions' => 'O novo sitio Elgg está listo. Prema o seguinte botón para acceder a el.',
112
+    'install:complete:gotosite' => 'Ir ao siti',
113
+
114
+    'InstallationException:UnknownStep' => 'Descoñécese o paso de instalación «%s».',
115
+    'InstallationException:MissingLibrary' => 'Non foi posíbel cargar «%s»',
116
+    'InstallationException:CannotLoadSettings' => 'Elgg non puido cargar o ficheiro de configuración. Ou ben o ficheiro non existe, ou ben hai un problema de permisos.',
117
+
118
+    'install:success:database' => 'Instalouse a base de datos',
119
+    'install:success:settings' => 'Gardouse a configuración do sitio.',
120
+    'install:success:admin' => 'Creouse a conta de administrador.',
121
+
122
+    'install:error:htaccess' => 'Non foi posíbel crear «.htaccess».',
123
+    'install:error:settings' => 'Non foi posíbel crear o ficheiro de configuración.',
124
+    'install:error:databasesettings' => 'Non foi posíbel conectarse á base de datos coa información de conexión indicada.',
125
+    'install:error:database_prefix' => 'O prefixo da base de datos contén caracteres que non son válidos.',
126
+    'install:error:oldmysql2' => 'O servidor de bases de datos debe ser un MySQL 5.5.3 ou unha versión superior. O servidor actual usa MySQL %s.',
127
+    'install:error:nodatabase' => 'Non foi posíbel usar a base de datos «%s». Pode que non exista.',
128
+    'install:error:cannotloadtables' => 'Non foi posíbel cargar as táboas da base de datos.',
129
+    'install:error:tables_exist' => 'A base de datos xa contén táboas de Elgg. Ten que eliminar esas táboas ou reiniciar o instalador e intentar facer uso delas. Para reiniciar o instalador, elimine a parte de «?step=database» do URL na barra do URL do navegador, e prema Intro.',
130
+    'install:error:readsettingsphp' => 'Unable to read /elgg-config/settings.example.php',
131
+    'install:error:writesettingphp' => 'Unable to write /elgg-config/settings.php',
132
+    'install:error:requiredfield' => 'Necesítase «%s».',
133
+    'install:error:relative_path' => 'A ruta «%s» para o cartafol de datos non parece unha ruta absoluta.',
134
+    'install:error:datadirectoryexists' => 'O cartafol de datos, «%s», non existe.',
135
+    'install:error:writedatadirectory' => 'O servidor web non ten permisos de escritura no cartafol de datos, «%s».',
136
+    'install:error:locationdatadirectory' => 'Por motivos de seguranza, o cartafol de datos («%s») non pode estar dentro do cartafol de instalación.',
137
+    'install:error:emailaddress' => '%s non é un enderezo de correo válido.',
138
+    'install:error:createsite' => 'Non foi posíbel crear o sitio.',
139
+    'install:error:savesitesettings' => 'Non foi posíbel gardar a configuración do sitio.',
140
+    'install:error:loadadmin' => 'Non foi posíbel cargar o administrador.',
141
+    'install:error:adminaccess' => 'Non foi posíbel darlle privilexios de administrador á nova conta de usuario.',
142
+    'install:error:adminlogin' => 'Non foi posíbel acceder automaticamente ao sitio coa nova conta de administrador',
143
+    'install:error:rewrite:apache' => 'Parece que o servidor web que está a usar é Apache.',
144
+    'install:error:rewrite:nginx' => 'Parece que o servidor web que está a usar é Nginx.',
145
+    'install:error:rewrite:lighttpd' => 'Parece que o servidor web que está a usar é Lighttpd.',
146
+    'install:error:rewrite:iis' => 'Parece que o servidor web que está a usar é IIS.',
147
+    'install:error:rewrite:allowoverride' => "Non se pasou a proba de reescritura. O máis probábel é que fose porque a opción «AllowOverride» non ten o valor «All» para o cartafol de Elgg. Isto impídelle a Apache procesar o ficheiro «.htaccess» que contén as regras de reescritura.\n\n
148 148
 
149 149
 Outra causa, menos probábel, é que Apache estea configurado con un alias para o cartafol de Elgg, e entón terá que definir a opción «RewriteBase» no seu ficheiro «.htaccess». Atopará instrucións máis detalladas no ficheiro «.htaccess» do cartafol de Elgg.",
150
-	'install:error:rewrite:htaccess:write_permission' => 'O seu servidor web carece de permisos para crear un ficheiro «.htaccess» no cartafol de Elgg. Ten que copialo manualmente de «install/config/htaccess.dist» a «.htaccess» ou cambiar os permisos do cartafol.',
151
-	'install:error:rewrite:htaccess:read_permission' => 'Hai un ficheiro «.htaccess» no cartafol de Elgg, pero o servidor web non ten permisos para lelo.',
152
-	'install:error:rewrite:htaccess:non_elgg_htaccess' => 'Hai un ficheiro «.htaccess» no cartafol de Elgg que non creou Elgg. Elimíneo.',
153
-	'install:error:rewrite:htaccess:old_elgg_htaccess' => 'Atopouse o que parece un vello ficheiro «.htaccess» de Elgg no cartafol de Elgg. Fáltalle a regra de reescritura para probar o servidor web.',
154
-	'install:error:rewrite:htaccess:cannot_copy' => 'Produciuse un erro descoñecido durante a creación do ficheiro «.htaccess». Ten que copiar manualmente «install/config/htaccess.dist» a «.htaccess» no cartafol de Elgg.',
155
-	'install:error:rewrite:altserver' => 'Non se pasou a proba das regras de reescritura. Ten que configurar o servidor web coas regras de reescritura de Elgg e intentalo de novo',
156
-	'install:error:rewrite:unknown' => 'Uf. Non foi posíbel determinar o tipo de servidor web que está a usar, e non pasou a proba das regras de reescritura. Non podemos aconsellalo sobre como solucionar o seu problema específico. Bótelle unha ollada á ligazón sobre solución de problemas.',
157
-	'install:warning:rewrite:unknown' => 'O servidor non permite probar automaticamente as regras de reescritura, e o navegador non permite probalas mediante JavaScript. Pode continuar a instalación, pero pode que ao rematar o sitio lle dea problemas. Para probar manualmente as regras de reescritura, siga esta ligazón: <a href="%s" target="_blank">probar</a>. Se as regras funcionan, aparecerá a palabra «success».',
150
+    'install:error:rewrite:htaccess:write_permission' => 'O seu servidor web carece de permisos para crear un ficheiro «.htaccess» no cartafol de Elgg. Ten que copialo manualmente de «install/config/htaccess.dist» a «.htaccess» ou cambiar os permisos do cartafol.',
151
+    'install:error:rewrite:htaccess:read_permission' => 'Hai un ficheiro «.htaccess» no cartafol de Elgg, pero o servidor web non ten permisos para lelo.',
152
+    'install:error:rewrite:htaccess:non_elgg_htaccess' => 'Hai un ficheiro «.htaccess» no cartafol de Elgg que non creou Elgg. Elimíneo.',
153
+    'install:error:rewrite:htaccess:old_elgg_htaccess' => 'Atopouse o que parece un vello ficheiro «.htaccess» de Elgg no cartafol de Elgg. Fáltalle a regra de reescritura para probar o servidor web.',
154
+    'install:error:rewrite:htaccess:cannot_copy' => 'Produciuse un erro descoñecido durante a creación do ficheiro «.htaccess». Ten que copiar manualmente «install/config/htaccess.dist» a «.htaccess» no cartafol de Elgg.',
155
+    'install:error:rewrite:altserver' => 'Non se pasou a proba das regras de reescritura. Ten que configurar o servidor web coas regras de reescritura de Elgg e intentalo de novo',
156
+    'install:error:rewrite:unknown' => 'Uf. Non foi posíbel determinar o tipo de servidor web que está a usar, e non pasou a proba das regras de reescritura. Non podemos aconsellalo sobre como solucionar o seu problema específico. Bótelle unha ollada á ligazón sobre solución de problemas.',
157
+    'install:warning:rewrite:unknown' => 'O servidor non permite probar automaticamente as regras de reescritura, e o navegador non permite probalas mediante JavaScript. Pode continuar a instalación, pero pode que ao rematar o sitio lle dea problemas. Para probar manualmente as regras de reescritura, siga esta ligazón: <a href="%s" target="_blank">probar</a>. Se as regras funcionan, aparecerá a palabra «success».',
158 158
 	
159
-	// Bring over some error messages you might see in setup
160
-	'exception:contact_admin' => 'Produciuse un erro do que non é posíbel recuperarse, e quedou rexistrado. Se vostede é o administrador do sistema, comprobe que a información do ficheiro de configuración é correcta. En caso contrario, póñase en contacto co administrador e facilítelle a seguinte información:',
161
-	'DatabaseException:WrongCredentials' => "Elgg non puido conectar coa base de datos mediante o nome de usuario e contrasinal facilitados. Revise o ficheiro de configuración.",
159
+    // Bring over some error messages you might see in setup
160
+    'exception:contact_admin' => 'Produciuse un erro do que non é posíbel recuperarse, e quedou rexistrado. Se vostede é o administrador do sistema, comprobe que a información do ficheiro de configuración é correcta. En caso contrario, póñase en contacto co administrador e facilítelle a seguinte información:',
161
+    'DatabaseException:WrongCredentials' => "Elgg non puido conectar coa base de datos mediante o nome de usuario e contrasinal facilitados. Revise o ficheiro de configuración.",
162 162
 ];
Please login to merge, or discard this patch.
install/languages/cmn.php 1 patch
Indentation   +137 added lines, -137 removed lines patch added patch discarded remove patch
@@ -1,160 +1,160 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3
-	'install:title' => 'Elgg 安裝',
4
-	'install:welcome' => '歡迎',
5
-	'install:requirements' => '需求檢查',
6
-	'install:database' => '資料庫安裝',
7
-	'install:settings' => '組配站臺',
8
-	'install:admin' => '建立管理帳號',
9
-	'install:complete' => '完成',
3
+    'install:title' => 'Elgg 安裝',
4
+    'install:welcome' => '歡迎',
5
+    'install:requirements' => '需求檢查',
6
+    'install:database' => '資料庫安裝',
7
+    'install:settings' => '組配站臺',
8
+    'install:admin' => '建立管理帳號',
9
+    'install:complete' => '完成',
10 10
 
11
-	'install:next' => '下一步',
12
-	'install:refresh' => '重新整理',
11
+    'install:next' => '下一步',
12
+    'install:refresh' => '重新整理',
13 13
 
14
-	'install:welcome:instructions' => "安裝 Elgg 有 6 個簡單的步驟,而讀取這個歡迎畫面是第一個!
14
+    'install:welcome:instructions' => "安裝 Elgg 有 6 個簡單的步驟,而讀取這個歡迎畫面是第一個!
15 15
 
16 16
 如果您還沒有看過 Elgg 包含的安裝指示,請按一下位於頁面底部的指示鏈結)。
17 17
 
18 18
 如果您已準備好繼續下去,請按「下一步」按鈕。",
19
-	'install:requirements:instructions:success' => "伺服器通過了需求檢查。",
20
-	'install:requirements:instructions:failure' => "伺服器需求檢查失敗。在您修正了以下問題之後,請重新整理這個頁面。如果您需要進一步的協助,請看看位於這個頁面底部的疑難排解鏈結。",
21
-	'install:requirements:instructions:warning' => "伺服器通過了需求檢查,但是至少出現一個警告。我們建議您看看安裝疑難排解頁面以獲得更多細節。",
19
+    'install:requirements:instructions:success' => "伺服器通過了需求檢查。",
20
+    'install:requirements:instructions:failure' => "伺服器需求檢查失敗。在您修正了以下問題之後,請重新整理這個頁面。如果您需要進一步的協助,請看看位於這個頁面底部的疑難排解鏈結。",
21
+    'install:requirements:instructions:warning' => "伺服器通過了需求檢查,但是至少出現一個警告。我們建議您看看安裝疑難排解頁面以獲得更多細節。",
22 22
 
23
-	'install:require:php' => 'PHP',
24
-	'install:require:rewrite' => '網頁伺服器',
25
-	'install:require:settings' => '設定值檔案',
26
-	'install:require:database' => '資料庫',
23
+    'install:require:php' => 'PHP',
24
+    'install:require:rewrite' => '網頁伺服器',
25
+    'install:require:settings' => '設定值檔案',
26
+    'install:require:database' => '資料庫',
27 27
 
28
-	'install:check:root' => '網頁伺服器沒有在 Elgg 根目錄中建立 .htaccess 檔案的權限。您有兩個選擇:
28
+    'install:check:root' => '網頁伺服器沒有在 Elgg 根目錄中建立 .htaccess 檔案的權限。您有兩個選擇:
29 29
 
30 30
 		1.變更根目錄上的權限
31 31
 
32 32
 		2.將檔案 htaccess_dist 拷貝為 .htaccess',
33 33
 
34
-	'install:check:php:version' => 'Elgg 要求 PHP %s 或以上。這個伺服器正在使用版本 %s。',
35
-	'install:check:php:extension' => 'Elgg 要求 PHP 延伸功能 %s。',
36
-	'install:check:php:extension:recommend' => '建議先安裝 PHP 延伸功能 %s。',
37
-	'install:check:php:open_basedir' => 'PHP 指令 open_basedir 可能會防止 Elgg 儲存檔案到資料目錄。',
38
-	'install:check:php:safe_mode' => '不建議在安全模式中執行 PHP,因為也許會與 Elgg 導致問題。',
39
-	'install:check:php:arg_separator' => 'Elgg 的 arg_separator.output 必須是 & 才能作用,而伺服器上的值是 %s',
40
-	'install:check:php:register_globals' => '全域的註冊必須關閉。',
41
-	'install:check:php:session.auto_start' => "Elgg 的 session.auto_start 必須關閉才能作用。請變更伺服器的組態,或者將這個指令加入 Elgg 的 .htaccess 檔案。",
34
+    'install:check:php:version' => 'Elgg 要求 PHP %s 或以上。這個伺服器正在使用版本 %s。',
35
+    'install:check:php:extension' => 'Elgg 要求 PHP 延伸功能 %s。',
36
+    'install:check:php:extension:recommend' => '建議先安裝 PHP 延伸功能 %s。',
37
+    'install:check:php:open_basedir' => 'PHP 指令 open_basedir 可能會防止 Elgg 儲存檔案到資料目錄。',
38
+    'install:check:php:safe_mode' => '不建議在安全模式中執行 PHP,因為也許會與 Elgg 導致問題。',
39
+    'install:check:php:arg_separator' => 'Elgg 的 arg_separator.output 必須是 & 才能作用,而伺服器上的值是 %s',
40
+    'install:check:php:register_globals' => '全域的註冊必須關閉。',
41
+    'install:check:php:session.auto_start' => "Elgg 的 session.auto_start 必須關閉才能作用。請變更伺服器的組態,或者將這個指令加入 Elgg 的 .htaccess 檔案。",
42 42
 
43
-	'install:check:installdir' => 'Your web server does not have permission to create the settings.php file in your installation directory. You have two choices:
43
+    'install:check:installdir' => 'Your web server does not have permission to create the settings.php file in your installation directory. You have two choices:
44 44
 
45 45
 		1. Change the permissions on the elgg-config directory of your Elgg installation
46 46
 
47 47
 		2. Copy the file %s/settings.example.php to elgg-config/settings.php and follow the instructions in it for setting your database parameters.',
48
-	'install:check:readsettings' => '設定值檔案存在於引擎目錄中,但是網頁伺服器無法讀取它。您可以刪除檔案或變更它的讀取權限。',
49
-
50
-	'install:check:php:success' => "伺服器上的 PHP 滿足 Elggs 的所有需求。",
51
-	'install:check:rewrite:success' => '已成功測試改寫規則。',
52
-	'install:check:database' => '已檢查過 Elgg 載入其資料庫時的需求。',
53
-
54
-	'install:database:instructions' => "如果您尚未建立用於 Elgg 的資料庫,請現在就做,接著填入下列值以初始化 Elgg 資料庫。",
55
-	'install:database:error' => '建立 Elgg 資料庫時出現了錯誤而無法繼續安裝。請檢閱以上的訊息並修正任何問題。如果您需要更多說明,請造訪以下的安裝疑難排解鏈結,或是貼文到 Elgg 社群論壇。',
56
-
57
-	'install:database:label:dbuser' =>  '資料庫使用者名稱',
58
-	'install:database:label:dbpassword' => '資料庫密碼',
59
-	'install:database:label:dbname' => '資料庫名稱',
60
-	'install:database:label:dbhost' => '資料庫主機',
61
-	'install:database:label:dbprefix' => '資料表前綴',
62
-	'install:database:label:timezone' => "Timezone",
63
-
64
-	'install:database:help:dbuser' => '擁有您為 Elgg 所建立的 MySQL 資料庫完整權限的使用者',
65
-	'install:database:help:dbpassword' => '用於以上資料庫的使用者密碼',
66
-	'install:database:help:dbname' => 'Elgg 資料庫的名稱',
67
-	'install:database:help:dbhost' => 'MySQL 伺服器的主機名稱 (通常是 localhost)',
68
-	'install:database:help:dbprefix' => "賦予所有 Elgg 資料表的前綴 (通常是 elgg_)",
69
-	'install:database:help:timezone' => "The default timezone in which the site will operate",
70
-
71
-	'install:settings:instructions' => '當我們組配 Elgg 時,需要一些站臺的相關資訊。如果還沒建立用於 Elgg 的<a href=http://docs.elgg.org/wiki/Data_directory target=_blank>資料目錄</a>,您現在就需要這樣做。',
72
-
73
-	'install:settings:label:sitename' => '站臺名稱',
74
-	'install:settings:label:siteemail' => '站臺電子郵件地址',
75
-	'install:database:label:wwwroot' => '站臺網址',
76
-	'install:settings:label:path' => 'Elgg 安裝目錄',
77
-	'install:database:label:dataroot' => '資料目錄',
78
-	'install:settings:label:language' => '站臺語言',
79
-	'install:settings:label:siteaccess' => '預設站臺存取',
80
-	'install:label:combo:dataroot' => 'Elgg 建立資料目錄',
81
-
82
-	'install:settings:help:sitename' => '新建 Elgg 站臺的名稱',
83
-	'install:settings:help:siteemail' => 'Elgg 用於聯絡使用者的電子郵件地址',
84
-	'install:database:help:wwwroot' => '站臺的網址 (Elgg 通常能夠正確猜測)',
85
-	'install:settings:help:path' => '您置放 Elgg 程式碼的目錄位置 (Elgg 通常能夠正確猜測)',
86
-	'install:database:help:dataroot' => '您所建立用於 Elgg 儲存檔案的目錄 (當您按「下一步」時,將會檢查這個目錄的權限)。它必須是絕對路徑。',
87
-	'install:settings:help:dataroot:apache' => '您可以選擇讓 Elgg 建立資料目錄,或是輸入您已建立用於儲存使用者檔案的目錄 (當您按「下一步」時,將會檢查這個目錄的權限)',
88
-	'install:settings:help:language' => '站臺使用的預設語言',
89
-	'install:settings:help:siteaccess' => '新使用者建立內容時的預設存取等級',
90
-
91
-	'install:admin:instructions' => "現在是建立管理者帳號的時候了。",
92
-
93
-	'install:admin:label:displayname' => '代號',
94
-	'install:admin:label:email' => '電子郵件',
95
-	'install:admin:label:username' => '使用者名稱',
96
-	'install:admin:label:password1' => '密碼',
97
-	'install:admin:label:password2' => '再次輸入密碼',
98
-
99
-	'install:admin:help:displayname' => '這個帳號在站臺上所顯示的名稱',
100
-	'install:admin:help:email' => '',
101
-	'install:admin:help:username' => '帳號使用者的登入名稱',
102
-	'install:admin:help:password1' => "帳號密碼必須至少有 %u 個字元長",
103
-	'install:admin:help:password2' => '再次輸入密碼以確認',
104
-
105
-	'install:admin:password:mismatch' => '密碼必須匹配。',
106
-	'install:admin:password:empty' => '密碼不可為空。',
107
-	'install:admin:password:tooshort' => '您的密碼太短',
108
-	'install:admin:cannot_create' => '無法建立管理帳號。',
109
-
110
-	'install:complete:instructions' => 'Elgg 站臺現在已準備好要使用。按以下按鈕以進入站臺。',
111
-	'install:complete:gotosite' => '前往站臺',
112
-
113
-	'InstallationException:UnknownStep' => '%s 是不明的安裝步驟。',
114
-	'InstallationException:MissingLibrary' => 'Could not load %s',
115
-	'InstallationException:CannotLoadSettings' => 'Elgg could not load the settings file. It does not exist or there is a file permissions issue.',
116
-
117
-	'install:success:database' => '資料庫已安裝。',
118
-	'install:success:settings' => '站臺設定值已儲存。',
119
-	'install:success:admin' => '管理帳號已建立。',
120
-
121
-	'install:error:htaccess' => '無法建立 .htaccess',
122
-	'install:error:settings' => '無法建立設定值檔案',
123
-	'install:error:databasesettings' => '無法以這些設定值連線到資料庫。',
124
-	'install:error:database_prefix' => '在資料庫前綴中有無效字元',
125
-	'install:error:oldmysql2' => 'MySQL 必須是版本 5.5.3 或以上。伺服器正在使用 %s。',
126
-	'install:error:nodatabase' => '無法使用資料庫 %s。它可能不存在。',
127
-	'install:error:cannotloadtables' => '無法載入資料表格',
128
-	'install:error:tables_exist' => '在資料庫中已有 Elgg 表格。您需要選擇丟棄那些表格,或是重新啟動安裝程式而我們將試圖去使用它們。如果要重新啟動安裝程式,請自瀏覽器網址列中移除 \'?step=database\' 並按下輸入鍵。',
129
-	'install:error:readsettingsphp' => 'Unable to read /elgg-config/settings.example.php',
130
-	'install:error:writesettingphp' => 'Unable to write /elgg-config/settings.php',
131
-	'install:error:requiredfield' => '%s 為必要項目',
132
-	'install:error:relative_path' => '我們不認為 %s 是資料目錄的絕對路徑',
133
-	'install:error:datadirectoryexists' => '資料目錄 %s 不存在。',
134
-	'install:error:writedatadirectory' => '資料目錄 %s 無法由網頁伺服器寫入。',
135
-	'install:error:locationdatadirectory' => '資料目錄 %s 基於安全必須位於安裝路徑之外。',
136
-	'install:error:emailaddress' => '%s 並非有效的電子郵件地址',
137
-	'install:error:createsite' => '無法建立站臺。',
138
-	'install:error:savesitesettings' => '無法儲存站臺設定值',
139
-	'install:error:loadadmin' => '無法載入管理者。',
140
-	'install:error:adminaccess' => '無法賦予新使用者帳號管理權限。',
141
-	'install:error:adminlogin' => '無法自動登入新的管理者。',
142
-	'install:error:rewrite:apache' => '我們認為您的主機正在運行 Apache 網頁伺服器。',
143
-	'install:error:rewrite:nginx' => '我們認為您的主機正在運行 Nginx 網頁伺服器。',
144
-	'install:error:rewrite:lighttpd' => '我們認為您的主機正在運行 Lighttpd 網頁伺服器。',
145
-	'install:error:rewrite:iis' => '我們認為您的主機正在運行 IIS 網頁伺服器。',
146
-	'install:error:rewrite:allowoverride' => "改寫測試失敗的原因,很有可能是 AllowOverride 對於 Elgg 的目錄並非設定為 All。這會防止 Apache 去處理含有改寫規則的 .htaccess 檔案。
48
+    'install:check:readsettings' => '設定值檔案存在於引擎目錄中,但是網頁伺服器無法讀取它。您可以刪除檔案或變更它的讀取權限。',
49
+
50
+    'install:check:php:success' => "伺服器上的 PHP 滿足 Elggs 的所有需求。",
51
+    'install:check:rewrite:success' => '已成功測試改寫規則。',
52
+    'install:check:database' => '已檢查過 Elgg 載入其資料庫時的需求。',
53
+
54
+    'install:database:instructions' => "如果您尚未建立用於 Elgg 的資料庫,請現在就做,接著填入下列值以初始化 Elgg 資料庫。",
55
+    'install:database:error' => '建立 Elgg 資料庫時出現了錯誤而無法繼續安裝。請檢閱以上的訊息並修正任何問題。如果您需要更多說明,請造訪以下的安裝疑難排解鏈結,或是貼文到 Elgg 社群論壇。',
56
+
57
+    'install:database:label:dbuser' =>  '資料庫使用者名稱',
58
+    'install:database:label:dbpassword' => '資料庫密碼',
59
+    'install:database:label:dbname' => '資料庫名稱',
60
+    'install:database:label:dbhost' => '資料庫主機',
61
+    'install:database:label:dbprefix' => '資料表前綴',
62
+    'install:database:label:timezone' => "Timezone",
63
+
64
+    'install:database:help:dbuser' => '擁有您為 Elgg 所建立的 MySQL 資料庫完整權限的使用者',
65
+    'install:database:help:dbpassword' => '用於以上資料庫的使用者密碼',
66
+    'install:database:help:dbname' => 'Elgg 資料庫的名稱',
67
+    'install:database:help:dbhost' => 'MySQL 伺服器的主機名稱 (通常是 localhost)',
68
+    'install:database:help:dbprefix' => "賦予所有 Elgg 資料表的前綴 (通常是 elgg_)",
69
+    'install:database:help:timezone' => "The default timezone in which the site will operate",
70
+
71
+    'install:settings:instructions' => '當我們組配 Elgg 時,需要一些站臺的相關資訊。如果還沒建立用於 Elgg 的<a href=http://docs.elgg.org/wiki/Data_directory target=_blank>資料目錄</a>,您現在就需要這樣做。',
72
+
73
+    'install:settings:label:sitename' => '站臺名稱',
74
+    'install:settings:label:siteemail' => '站臺電子郵件地址',
75
+    'install:database:label:wwwroot' => '站臺網址',
76
+    'install:settings:label:path' => 'Elgg 安裝目錄',
77
+    'install:database:label:dataroot' => '資料目錄',
78
+    'install:settings:label:language' => '站臺語言',
79
+    'install:settings:label:siteaccess' => '預設站臺存取',
80
+    'install:label:combo:dataroot' => 'Elgg 建立資料目錄',
81
+
82
+    'install:settings:help:sitename' => '新建 Elgg 站臺的名稱',
83
+    'install:settings:help:siteemail' => 'Elgg 用於聯絡使用者的電子郵件地址',
84
+    'install:database:help:wwwroot' => '站臺的網址 (Elgg 通常能夠正確猜測)',
85
+    'install:settings:help:path' => '您置放 Elgg 程式碼的目錄位置 (Elgg 通常能夠正確猜測)',
86
+    'install:database:help:dataroot' => '您所建立用於 Elgg 儲存檔案的目錄 (當您按「下一步」時,將會檢查這個目錄的權限)。它必須是絕對路徑。',
87
+    'install:settings:help:dataroot:apache' => '您可以選擇讓 Elgg 建立資料目錄,或是輸入您已建立用於儲存使用者檔案的目錄 (當您按「下一步」時,將會檢查這個目錄的權限)',
88
+    'install:settings:help:language' => '站臺使用的預設語言',
89
+    'install:settings:help:siteaccess' => '新使用者建立內容時的預設存取等級',
90
+
91
+    'install:admin:instructions' => "現在是建立管理者帳號的時候了。",
92
+
93
+    'install:admin:label:displayname' => '代號',
94
+    'install:admin:label:email' => '電子郵件',
95
+    'install:admin:label:username' => '使用者名稱',
96
+    'install:admin:label:password1' => '密碼',
97
+    'install:admin:label:password2' => '再次輸入密碼',
98
+
99
+    'install:admin:help:displayname' => '這個帳號在站臺上所顯示的名稱',
100
+    'install:admin:help:email' => '',
101
+    'install:admin:help:username' => '帳號使用者的登入名稱',
102
+    'install:admin:help:password1' => "帳號密碼必須至少有 %u 個字元長",
103
+    'install:admin:help:password2' => '再次輸入密碼以確認',
104
+
105
+    'install:admin:password:mismatch' => '密碼必須匹配。',
106
+    'install:admin:password:empty' => '密碼不可為空。',
107
+    'install:admin:password:tooshort' => '您的密碼太短',
108
+    'install:admin:cannot_create' => '無法建立管理帳號。',
109
+
110
+    'install:complete:instructions' => 'Elgg 站臺現在已準備好要使用。按以下按鈕以進入站臺。',
111
+    'install:complete:gotosite' => '前往站臺',
112
+
113
+    'InstallationException:UnknownStep' => '%s 是不明的安裝步驟。',
114
+    'InstallationException:MissingLibrary' => 'Could not load %s',
115
+    'InstallationException:CannotLoadSettings' => 'Elgg could not load the settings file. It does not exist or there is a file permissions issue.',
116
+
117
+    'install:success:database' => '資料庫已安裝。',
118
+    'install:success:settings' => '站臺設定值已儲存。',
119
+    'install:success:admin' => '管理帳號已建立。',
120
+
121
+    'install:error:htaccess' => '無法建立 .htaccess',
122
+    'install:error:settings' => '無法建立設定值檔案',
123
+    'install:error:databasesettings' => '無法以這些設定值連線到資料庫。',
124
+    'install:error:database_prefix' => '在資料庫前綴中有無效字元',
125
+    'install:error:oldmysql2' => 'MySQL 必須是版本 5.5.3 或以上。伺服器正在使用 %s。',
126
+    'install:error:nodatabase' => '無法使用資料庫 %s。它可能不存在。',
127
+    'install:error:cannotloadtables' => '無法載入資料表格',
128
+    'install:error:tables_exist' => '在資料庫中已有 Elgg 表格。您需要選擇丟棄那些表格,或是重新啟動安裝程式而我們將試圖去使用它們。如果要重新啟動安裝程式,請自瀏覽器網址列中移除 \'?step=database\' 並按下輸入鍵。',
129
+    'install:error:readsettingsphp' => 'Unable to read /elgg-config/settings.example.php',
130
+    'install:error:writesettingphp' => 'Unable to write /elgg-config/settings.php',
131
+    'install:error:requiredfield' => '%s 為必要項目',
132
+    'install:error:relative_path' => '我們不認為 %s 是資料目錄的絕對路徑',
133
+    'install:error:datadirectoryexists' => '資料目錄 %s 不存在。',
134
+    'install:error:writedatadirectory' => '資料目錄 %s 無法由網頁伺服器寫入。',
135
+    'install:error:locationdatadirectory' => '資料目錄 %s 基於安全必須位於安裝路徑之外。',
136
+    'install:error:emailaddress' => '%s 並非有效的電子郵件地址',
137
+    'install:error:createsite' => '無法建立站臺。',
138
+    'install:error:savesitesettings' => '無法儲存站臺設定值',
139
+    'install:error:loadadmin' => '無法載入管理者。',
140
+    'install:error:adminaccess' => '無法賦予新使用者帳號管理權限。',
141
+    'install:error:adminlogin' => '無法自動登入新的管理者。',
142
+    'install:error:rewrite:apache' => '我們認為您的主機正在運行 Apache 網頁伺服器。',
143
+    'install:error:rewrite:nginx' => '我們認為您的主機正在運行 Nginx 網頁伺服器。',
144
+    'install:error:rewrite:lighttpd' => '我們認為您的主機正在運行 Lighttpd 網頁伺服器。',
145
+    'install:error:rewrite:iis' => '我們認為您的主機正在運行 IIS 網頁伺服器。',
146
+    'install:error:rewrite:allowoverride' => "改寫測試失敗的原因,很有可能是 AllowOverride 對於 Elgg 的目錄並非設定為 All。這會防止 Apache 去處理含有改寫規則的 .htaccess 檔案。
147 147
 				\n\n較不可能的原因是 Apache 被組配了別名給 Elgg 目錄,而您需要在 .htaccess 中設定 RewriteBase。在 Elgg 目錄的 .htaccess 檔案中有些進一步的指示。",
148
-	'install:error:rewrite:htaccess:write_permission' => '網頁伺服器沒有在 Elgg 的目錄中建立.htaccess 檔案的權限。您需要手動將 htaccess_dist 拷貝為 .htaccess,或是變更目錄上的權限。',
149
-	'install:error:rewrite:htaccess:read_permission' => '在 Elgg 的目錄中有 .htaccess 檔案,但是網頁伺服器沒有讀取它的權限。',
150
-	'install:error:rewrite:htaccess:non_elgg_htaccess' => '在 Elgg 的目錄中有 .htaccess 檔案,但那不是由 Elgg 所建立的。請移除它。',
151
-	'install:error:rewrite:htaccess:old_elgg_htaccess' => '在 Elgg 的目錄中似乎是舊的 Elgg .htaccess 檔案。它不包含改寫規則用於測試網頁伺服器。',
152
-	'install:error:rewrite:htaccess:cannot_copy' => '不明發生錯誤當建立.htaccess 檔案。您需要手動在 Elgg 的目錄中將 htaccess_dist 拷貝為 .htaccess。',
153
-	'install:error:rewrite:altserver' => '改寫規則測試失敗。您需要組配網頁伺服器與 Elgg 的改寫規則並再次嘗試。',
154
-	'install:error:rewrite:unknown' => '哎呀,我們無法認出在主機中運行什麼樣的網頁伺服器,而它的改寫規則失敗。我們無法提供任何特定的建言。請看看疑難排解鏈結。',
155
-	'install:warning:rewrite:unknown' => '您的伺服器不支援自動的改寫規則測試,而您的瀏覽器不支援經由 JavaScript 的檢查。您可以繼續進行安裝,但是也許會遇到一些站臺問題。您可以藉由按下這個鏈結,來手動<a href="%s" target="_blank ">測試</a>改寫規則。如果規則發生作用,您將會看到成功的字樣。',
148
+    'install:error:rewrite:htaccess:write_permission' => '網頁伺服器沒有在 Elgg 的目錄中建立.htaccess 檔案的權限。您需要手動將 htaccess_dist 拷貝為 .htaccess,或是變更目錄上的權限。',
149
+    'install:error:rewrite:htaccess:read_permission' => '在 Elgg 的目錄中有 .htaccess 檔案,但是網頁伺服器沒有讀取它的權限。',
150
+    'install:error:rewrite:htaccess:non_elgg_htaccess' => '在 Elgg 的目錄中有 .htaccess 檔案,但那不是由 Elgg 所建立的。請移除它。',
151
+    'install:error:rewrite:htaccess:old_elgg_htaccess' => '在 Elgg 的目錄中似乎是舊的 Elgg .htaccess 檔案。它不包含改寫規則用於測試網頁伺服器。',
152
+    'install:error:rewrite:htaccess:cannot_copy' => '不明發生錯誤當建立.htaccess 檔案。您需要手動在 Elgg 的目錄中將 htaccess_dist 拷貝為 .htaccess。',
153
+    'install:error:rewrite:altserver' => '改寫規則測試失敗。您需要組配網頁伺服器與 Elgg 的改寫規則並再次嘗試。',
154
+    'install:error:rewrite:unknown' => '哎呀,我們無法認出在主機中運行什麼樣的網頁伺服器,而它的改寫規則失敗。我們無法提供任何特定的建言。請看看疑難排解鏈結。',
155
+    'install:warning:rewrite:unknown' => '您的伺服器不支援自動的改寫規則測試,而您的瀏覽器不支援經由 JavaScript 的檢查。您可以繼續進行安裝,但是也許會遇到一些站臺問題。您可以藉由按下這個鏈結,來手動<a href="%s" target="_blank ">測試</a>改寫規則。如果規則發生作用,您將會看到成功的字樣。',
156 156
 	
157
-	// Bring over some error messages you might see in setup
158
-	'exception:contact_admin' => '發生了無法回復的錯誤,並且已經記錄下來。如果您是站臺管理者,請檢查您的設定檔案;否則請聯絡站臺管理者,並附上以下資訊:',
159
-	'DatabaseException:WrongCredentials' => "Elgg 無法利用給定的憑據與資料庫連線。請檢查設定檔案。",
157
+    // Bring over some error messages you might see in setup
158
+    'exception:contact_admin' => '發生了無法回復的錯誤,並且已經記錄下來。如果您是站臺管理者,請檢查您的設定檔案;否則請聯絡站臺管理者,並附上以下資訊:',
159
+    'DatabaseException:WrongCredentials' => "Elgg 無法利用給定的憑據與資料庫連線。請檢查設定檔案。",
160 160
 ];
Please login to merge, or discard this patch.
install/languages/es.php 1 patch
Indentation   +137 added lines, -137 removed lines patch added patch discarded remove patch
@@ -1,160 +1,160 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3
-	'install:title' => 'Instalación de Elgg',
4
-	'install:welcome' => 'Bienvenido!',
5
-	'install:requirements' => 'Verificación de requerimientos',
6
-	'install:database' => 'Instalación de base de datos',
7
-	'install:settings' => 'Configuración del sitio',
8
-	'install:admin' => 'Crear cuenta admin',
9
-	'install:complete' => 'Finalizado',
3
+    'install:title' => 'Instalación de Elgg',
4
+    'install:welcome' => 'Bienvenido!',
5
+    'install:requirements' => 'Verificación de requerimientos',
6
+    'install:database' => 'Instalación de base de datos',
7
+    'install:settings' => 'Configuración del sitio',
8
+    'install:admin' => 'Crear cuenta admin',
9
+    'install:complete' => 'Finalizado',
10 10
 
11
-	'install:next' => 'Siguiente',
12
-	'install:refresh' => 'Actualizar',
11
+    'install:next' => 'Siguiente',
12
+    'install:refresh' => 'Actualizar',
13 13
 
14
-	'install:welcome:instructions' => "La instalación de Elgg consta de 6 pasos simples y leer esta bienvenida es el primero!
14
+    'install:welcome:instructions' => "La instalación de Elgg consta de 6 pasos simples y leer esta bienvenida es el primero!
15 15
 
16 16
 Si no lo hizo, lea las instrucciones de instalación incluidas con Elgg (haga click en el enlace de instrucciones al final de la página).
17 17
 
18 18
 Cuando se encuentre listo para continuar, presione el botón siguiente.",
19
-	'install:requirements:instructions:success' => "Su servidor pasó la verificación de requerimientos.",
20
-	'install:requirements:instructions:failure' => "Su servidor falló la verificación de requerimientos. Luego de solucionar los items enumerados debajo refresque esta página. Si necesita mas ayuda verifique los enlaces de solución de problemas al final de esta página.",
21
-	'install:requirements:instructions:warning' => "Su servidor pasó la verificación de requerimientos, pero hay al menos una advertencia. Le recomendamos que verifique la página de solución de problemas para mas información.",
19
+    'install:requirements:instructions:success' => "Su servidor pasó la verificación de requerimientos.",
20
+    'install:requirements:instructions:failure' => "Su servidor falló la verificación de requerimientos. Luego de solucionar los items enumerados debajo refresque esta página. Si necesita mas ayuda verifique los enlaces de solución de problemas al final de esta página.",
21
+    'install:requirements:instructions:warning' => "Su servidor pasó la verificación de requerimientos, pero hay al menos una advertencia. Le recomendamos que verifique la página de solución de problemas para mas información.",
22 22
 
23
-	'install:require:php' => 'PHP',
24
-	'install:require:rewrite' => 'Servidor web',
25
-	'install:require:settings' => 'Archivo de configuración',
26
-	'install:require:database' => 'Base de datos',
23
+    'install:require:php' => 'PHP',
24
+    'install:require:rewrite' => 'Servidor web',
25
+    'install:require:settings' => 'Archivo de configuración',
26
+    'install:require:database' => 'Base de datos',
27 27
 
28
-	'install:check:root' => 'Su servidor web no posee los permisos necesarios para crear el archivo .htaccess en la raíz del directorio de Elgg. Tiene dos opciones:
28
+    'install:check:root' => 'Su servidor web no posee los permisos necesarios para crear el archivo .htaccess en la raíz del directorio de Elgg. Tiene dos opciones:
29 29
 
30 30
 		1. Modificar los permisos en el directorio raíz
31 31
 
32 32
 		2. Copiar el archivo htaccess_dist a .htaccess',
33 33
 
34
-	'install:check:php:version' => 'Elgg requiere la versión %s de PHP o superior. Este servidor se encuentra ejecutando la versión %s.',
35
-	'install:check:php:extension' => 'Elgg requiere la extensión %s de PHP.',
36
-	'install:check:php:extension:recommend' => 'Se recomienda que la estensión %s de PHP se encuentre instalada.',
37
-	'install:check:php:open_basedir' => 'La directiva de PHP open_basedir puede evitar que Elgg guarde archivos en su directorio de datos.',
38
-	'install:check:php:safe_mode' => 'Ejecutar PHP en modo seguro no es recomendado y puede ocasionar inconvenientes con Elgg.',
39
-	'install:check:php:arg_separator' => 'arg_separator.output debe ser & para que Elgg funcione, el valor actual del servidor es %s',
40
-	'install:check:php:register_globals' => 'Debe desactivarse el registro de globales.',
41
-	'install:check:php:session.auto_start' => "session.auto_start debe desactivarse para que Elgg funcione. Modifique la configuración de su servidor o agregue la directiva al archivo .htaccess de Elgg.",
34
+    'install:check:php:version' => 'Elgg requiere la versión %s de PHP o superior. Este servidor se encuentra ejecutando la versión %s.',
35
+    'install:check:php:extension' => 'Elgg requiere la extensión %s de PHP.',
36
+    'install:check:php:extension:recommend' => 'Se recomienda que la estensión %s de PHP se encuentre instalada.',
37
+    'install:check:php:open_basedir' => 'La directiva de PHP open_basedir puede evitar que Elgg guarde archivos en su directorio de datos.',
38
+    'install:check:php:safe_mode' => 'Ejecutar PHP en modo seguro no es recomendado y puede ocasionar inconvenientes con Elgg.',
39
+    'install:check:php:arg_separator' => 'arg_separator.output debe ser & para que Elgg funcione, el valor actual del servidor es %s',
40
+    'install:check:php:register_globals' => 'Debe desactivarse el registro de globales.',
41
+    'install:check:php:session.auto_start' => "session.auto_start debe desactivarse para que Elgg funcione. Modifique la configuración de su servidor o agregue la directiva al archivo .htaccess de Elgg.",
42 42
 
43
-	'install:check:installdir' => 'Your web server does not have permission to create the settings.php file in your installation directory. You have two choices:
43
+    'install:check:installdir' => 'Your web server does not have permission to create the settings.php file in your installation directory. You have two choices:
44 44
 
45 45
 		1. Change the permissions on the elgg-config directory of your Elgg installation
46 46
 
47 47
 		2. Copy the file %s/settings.example.php to elgg-config/settings.php and follow the instructions in it for setting your database parameters.',
48
-	'install:check:readsettings' => 'Existe un archivo settings en el directorio engine pero el servidor no puede leerlo. Puede eliminar el archivo o modificar los permisos sobre el mismo.',
49
-
50
-	'install:check:php:success' => "El PHP de su servidor satisface todos los requerimientos de Elgg.",
51
-	'install:check:rewrite:success' => 'El test de reescritura de reglas ha sido exitoso.',
52
-	'install:check:database' => 'Los requerimientos de bases de datos se verificarán cuando Elgg cargue la base de datos.',
53
-
54
-	'install:database:instructions' => "Si aún no creó una base de datos para Elgg debe hacerlo ahora. Luego complete los datos debajo para inicializar la base de datos.",
55
-	'install:database:error' => 'Ocurrió un error al crear la base de datos de Elgg y la instalación no puede continuar. Revise los mensajes de error y corrija los problemas. Si necesita mas ayuda, visite el enlace para la solución de problemas de instalación debajo o utilice los foros de la comunidad Elgg.',
56
-
57
-	'install:database:label:dbuser' =>  'Usuario de Base de Datos',
58
-	'install:database:label:dbpassword' => 'Contraseña',
59
-	'install:database:label:dbname' => 'Nombre de la Base de Datos',
60
-	'install:database:label:dbhost' => 'Host de Base de Datos',
61
-	'install:database:label:dbprefix' => 'Prefijo de Tablas de la Base de Datos',
62
-	'install:database:label:timezone' => "Timezone",
63
-
64
-	'install:database:help:dbuser' => 'Usuario que posee todos los privilegios sobre la base de datos MySql que creó para Elgg',
65
-	'install:database:help:dbpassword' => 'Contraseña para la cuenta del usuario anterior',
66
-	'install:database:help:dbname' => 'Nombre de la base de datos Elgg',
67
-	'install:database:help:dbhost' => 'Nombre del Host para el servidor MySQL (normalmente localhost)',
68
-	'install:database:help:dbprefix' => "Prefijo para todas las tablas de Elgg (normalmente elgg_)",
69
-	'install:database:help:timezone' => "The default timezone in which the site will operate",
70
-
71
-	'install:settings:instructions' => 'Durante la configuración de Elgg será necesaria cierta información sobre el sitio. Si no ha <a href="http://learn.elgg.org/en/1.x/intro/install.html#create-a-data-folder" target="_blank">creado una carpeta de datos</a> para Elgg, hágalo ahora.',
72
-
73
-	'install:settings:label:sitename' => 'Nombre del Sitio',
74
-	'install:settings:label:siteemail' => 'Dirección de Email del Sitio',
75
-	'install:database:label:wwwroot' => 'URL del Sitio',
76
-	'install:settings:label:path' => 'Directorio de Instalación de Elgg',
77
-	'install:database:label:dataroot' => 'Directorio Data',
78
-	'install:settings:label:language' => 'Idioma del Sitio',
79
-	'install:settings:label:siteaccess' => 'Acceso por Defecto',
80
-	'install:label:combo:dataroot' => 'Elgg crea el directorio data',
81
-
82
-	'install:settings:help:sitename' => 'El nombre de su nuevo sitio Elgg',
83
-	'install:settings:help:siteemail' => 'Dirección de Email utilizada por Elgg para comunicaciones a los usuarios',
84
-	'install:database:help:wwwroot' => 'La dirección de esde sitio (normalmente Elgg la selecciona correctamnete)',
85
-	'install:settings:help:path' => 'El directorio en donde se almacena el código de Elgg (normalmente Elgg lo selecciona correctamente)',
86
-	'install:database:help:dataroot' => 'El directorio que ha creado para que Elgg guarde archivos (se validarán los permisos sobre este directorio cuando presione el botón de siguiente)',
87
-	'install:settings:help:dataroot:apache' => 'Tiene la opción de que Elgg cree el directorio o de seleccionar uno que ya haya creado (se validarán los permisos sobre este directorio cuando presione el botón de siguiente)',
88
-	'install:settings:help:language' => 'El idioma por defecto para el sitio',
89
-	'install:settings:help:siteaccess' => 'El nivel de acceso por defecto al crear nuevo contenido los usuarios',
90
-
91
-	'install:admin:instructions' => "Es tiempo de crear la cuenta del Administrador.",
92
-
93
-	'install:admin:label:displayname' => 'Nombre para Mostrar',
94
-	'install:admin:label:email' => 'Dirección de Email',
95
-	'install:admin:label:username' => 'Nombre de Usuario',
96
-	'install:admin:label:password1' => 'Contraseña',
97
-	'install:admin:label:password2' => 'Contraseña Nuevamente',
98
-
99
-	'install:admin:help:displayname' => 'El nombre que se muestra en el sitio para esta cuenta',
100
-	'install:admin:help:email' => '',
101
-	'install:admin:help:username' => 'Nombre de usuario utilizado para acceder al sitio',
102
-	'install:admin:help:password1' => "La contraseña de la cuenta debe tener al menos %u caracteres",
103
-	'install:admin:help:password2' => 'Escriba nuevamente la contraseña para confirmar',
104
-
105
-	'install:admin:password:mismatch' => 'Las contraseñas deben coincidir.',
106
-	'install:admin:password:empty' => 'La contraseña no puede estar vacía.',
107
-	'install:admin:password:tooshort' => 'La contraseña es demasiado corta',
108
-	'install:admin:cannot_create' => 'No se pudo crear la cuenta del administrador.',
109
-
110
-	'install:complete:instructions' => 'Su sitio Elgg ahora está listo para su uso. Haga click en el botón de abajo para ir a visitar el sitio.',
111
-	'install:complete:gotosite' => 'Ir al sitio',
112
-
113
-	'InstallationException:UnknownStep' => '%s es un paso de instalación desconocido.',
114
-	'InstallationException:MissingLibrary' => 'No se pudo cargar %s',
115
-	'InstallationException:CannotLoadSettings' => 'Elgg could not load the settings file. It does not exist or there is a file permissions issue.',
116
-
117
-	'install:success:database' => 'Se ha instalado la base de datos.',
118
-	'install:success:settings' => 'Se ha guardado la configuración del sitio.',
119
-	'install:success:admin' => 'Se ha creado la cuenta Admin.',
120
-
121
-	'install:error:htaccess' => 'No se pudo crear el archivo .htaccess',
122
-	'install:error:settings' => 'No se pudo crear el archivo de configuración',
123
-	'install:error:databasesettings' => 'No se pudo conectar a la base de datos con la información provista',
124
-	'install:error:database_prefix' => 'Invalid characters in database prefix',
125
-	'install:error:oldmysql2' => 'MySQL debe ser una versión 5.5.3 o superior. Su servidor se encuentra utilizando la versión %s.',
126
-	'install:error:nodatabase' => 'No se pudo acceder a la base de datos %s. Puede que no exista.',
127
-	'install:error:cannotloadtables' => 'No se pueden cargar las tablas de la base de datos',
128
-	'install:error:tables_exist' => 'Se encontraron tablas de Elgg preexistentes en la base de datos. Debe eliminarlas o reiniciar el instalador para intentar utilizarlas. Para reiniciar el instalador, quite \'?step=database\' de la URL en la barra de direcciones de su explorador y presione ENTER.',
129
-	'install:error:readsettingsphp' => 'Unable to read /elgg-config/settings.example.php',
130
-	'install:error:writesettingphp' => 'Unable to write /elgg-config/settings.php',
131
-	'install:error:requiredfield' => '%s es requerido',
132
-	'install:error:relative_path' => 'We don\'t think "%s" is an absolute path for your data directory',
133
-	'install:error:datadirectoryexists' => 'El directorio de datos (data) %s no existe.',
134
-	'install:error:writedatadirectory' => 'El servidor no puede escribir en el directorio de datos (data) %s.',
135
-	'install:error:locationdatadirectory' => 'El directorio de datos (data) %s debe encontrarse fuera de la carpeta de instalación por motivos de seguridad.',
136
-	'install:error:emailaddress' => '%s no es una dirección de Email válida',
137
-	'install:error:createsite' => 'No se pudo crear el sitio.',
138
-	'install:error:savesitesettings' => 'No se pudo guardar la configuración del sitio',
139
-	'install:error:loadadmin' => 'No se pudo cargar el usuario administrador.',
140
-	'install:error:adminaccess' => 'No se le pueden otorgar privilegios de administrador al usuario.',
141
-	'install:error:adminlogin' => 'No se puede autenticar automáticamente al usuario administrador.',
142
-	'install:error:rewrite:apache' => 'Creemos que su servidor se encuentra ejecutando el web server Apache.',
143
-	'install:error:rewrite:nginx' => 'Creemos que su servidor se encuentra ejecutando el web server Nginx.',
144
-	'install:error:rewrite:lighttpd' => 'Creemos que su servidor se encuentra ejecutando el web server Lighttpd.',
145
-	'install:error:rewrite:iis' => 'Creemos que su servidor se encuentra ejecutando el web server Microsoft IIS.',
146
-	'install:error:rewrite:allowoverride' => "La prueba de reescritura falló, la causa mas común es que AllowOverride no se encuentra establecido en All en el directorio de Elgg. Esto le impide al apache procesar el archivo .htaccess el cual contiene las reglas de reescritura.
48
+    'install:check:readsettings' => 'Existe un archivo settings en el directorio engine pero el servidor no puede leerlo. Puede eliminar el archivo o modificar los permisos sobre el mismo.',
49
+
50
+    'install:check:php:success' => "El PHP de su servidor satisface todos los requerimientos de Elgg.",
51
+    'install:check:rewrite:success' => 'El test de reescritura de reglas ha sido exitoso.',
52
+    'install:check:database' => 'Los requerimientos de bases de datos se verificarán cuando Elgg cargue la base de datos.',
53
+
54
+    'install:database:instructions' => "Si aún no creó una base de datos para Elgg debe hacerlo ahora. Luego complete los datos debajo para inicializar la base de datos.",
55
+    'install:database:error' => 'Ocurrió un error al crear la base de datos de Elgg y la instalación no puede continuar. Revise los mensajes de error y corrija los problemas. Si necesita mas ayuda, visite el enlace para la solución de problemas de instalación debajo o utilice los foros de la comunidad Elgg.',
56
+
57
+    'install:database:label:dbuser' =>  'Usuario de Base de Datos',
58
+    'install:database:label:dbpassword' => 'Contraseña',
59
+    'install:database:label:dbname' => 'Nombre de la Base de Datos',
60
+    'install:database:label:dbhost' => 'Host de Base de Datos',
61
+    'install:database:label:dbprefix' => 'Prefijo de Tablas de la Base de Datos',
62
+    'install:database:label:timezone' => "Timezone",
63
+
64
+    'install:database:help:dbuser' => 'Usuario que posee todos los privilegios sobre la base de datos MySql que creó para Elgg',
65
+    'install:database:help:dbpassword' => 'Contraseña para la cuenta del usuario anterior',
66
+    'install:database:help:dbname' => 'Nombre de la base de datos Elgg',
67
+    'install:database:help:dbhost' => 'Nombre del Host para el servidor MySQL (normalmente localhost)',
68
+    'install:database:help:dbprefix' => "Prefijo para todas las tablas de Elgg (normalmente elgg_)",
69
+    'install:database:help:timezone' => "The default timezone in which the site will operate",
70
+
71
+    'install:settings:instructions' => 'Durante la configuración de Elgg será necesaria cierta información sobre el sitio. Si no ha <a href="http://learn.elgg.org/en/1.x/intro/install.html#create-a-data-folder" target="_blank">creado una carpeta de datos</a> para Elgg, hágalo ahora.',
72
+
73
+    'install:settings:label:sitename' => 'Nombre del Sitio',
74
+    'install:settings:label:siteemail' => 'Dirección de Email del Sitio',
75
+    'install:database:label:wwwroot' => 'URL del Sitio',
76
+    'install:settings:label:path' => 'Directorio de Instalación de Elgg',
77
+    'install:database:label:dataroot' => 'Directorio Data',
78
+    'install:settings:label:language' => 'Idioma del Sitio',
79
+    'install:settings:label:siteaccess' => 'Acceso por Defecto',
80
+    'install:label:combo:dataroot' => 'Elgg crea el directorio data',
81
+
82
+    'install:settings:help:sitename' => 'El nombre de su nuevo sitio Elgg',
83
+    'install:settings:help:siteemail' => 'Dirección de Email utilizada por Elgg para comunicaciones a los usuarios',
84
+    'install:database:help:wwwroot' => 'La dirección de esde sitio (normalmente Elgg la selecciona correctamnete)',
85
+    'install:settings:help:path' => 'El directorio en donde se almacena el código de Elgg (normalmente Elgg lo selecciona correctamente)',
86
+    'install:database:help:dataroot' => 'El directorio que ha creado para que Elgg guarde archivos (se validarán los permisos sobre este directorio cuando presione el botón de siguiente)',
87
+    'install:settings:help:dataroot:apache' => 'Tiene la opción de que Elgg cree el directorio o de seleccionar uno que ya haya creado (se validarán los permisos sobre este directorio cuando presione el botón de siguiente)',
88
+    'install:settings:help:language' => 'El idioma por defecto para el sitio',
89
+    'install:settings:help:siteaccess' => 'El nivel de acceso por defecto al crear nuevo contenido los usuarios',
90
+
91
+    'install:admin:instructions' => "Es tiempo de crear la cuenta del Administrador.",
92
+
93
+    'install:admin:label:displayname' => 'Nombre para Mostrar',
94
+    'install:admin:label:email' => 'Dirección de Email',
95
+    'install:admin:label:username' => 'Nombre de Usuario',
96
+    'install:admin:label:password1' => 'Contraseña',
97
+    'install:admin:label:password2' => 'Contraseña Nuevamente',
98
+
99
+    'install:admin:help:displayname' => 'El nombre que se muestra en el sitio para esta cuenta',
100
+    'install:admin:help:email' => '',
101
+    'install:admin:help:username' => 'Nombre de usuario utilizado para acceder al sitio',
102
+    'install:admin:help:password1' => "La contraseña de la cuenta debe tener al menos %u caracteres",
103
+    'install:admin:help:password2' => 'Escriba nuevamente la contraseña para confirmar',
104
+
105
+    'install:admin:password:mismatch' => 'Las contraseñas deben coincidir.',
106
+    'install:admin:password:empty' => 'La contraseña no puede estar vacía.',
107
+    'install:admin:password:tooshort' => 'La contraseña es demasiado corta',
108
+    'install:admin:cannot_create' => 'No se pudo crear la cuenta del administrador.',
109
+
110
+    'install:complete:instructions' => 'Su sitio Elgg ahora está listo para su uso. Haga click en el botón de abajo para ir a visitar el sitio.',
111
+    'install:complete:gotosite' => 'Ir al sitio',
112
+
113
+    'InstallationException:UnknownStep' => '%s es un paso de instalación desconocido.',
114
+    'InstallationException:MissingLibrary' => 'No se pudo cargar %s',
115
+    'InstallationException:CannotLoadSettings' => 'Elgg could not load the settings file. It does not exist or there is a file permissions issue.',
116
+
117
+    'install:success:database' => 'Se ha instalado la base de datos.',
118
+    'install:success:settings' => 'Se ha guardado la configuración del sitio.',
119
+    'install:success:admin' => 'Se ha creado la cuenta Admin.',
120
+
121
+    'install:error:htaccess' => 'No se pudo crear el archivo .htaccess',
122
+    'install:error:settings' => 'No se pudo crear el archivo de configuración',
123
+    'install:error:databasesettings' => 'No se pudo conectar a la base de datos con la información provista',
124
+    'install:error:database_prefix' => 'Invalid characters in database prefix',
125
+    'install:error:oldmysql2' => 'MySQL debe ser una versión 5.5.3 o superior. Su servidor se encuentra utilizando la versión %s.',
126
+    'install:error:nodatabase' => 'No se pudo acceder a la base de datos %s. Puede que no exista.',
127
+    'install:error:cannotloadtables' => 'No se pueden cargar las tablas de la base de datos',
128
+    'install:error:tables_exist' => 'Se encontraron tablas de Elgg preexistentes en la base de datos. Debe eliminarlas o reiniciar el instalador para intentar utilizarlas. Para reiniciar el instalador, quite \'?step=database\' de la URL en la barra de direcciones de su explorador y presione ENTER.',
129
+    'install:error:readsettingsphp' => 'Unable to read /elgg-config/settings.example.php',
130
+    'install:error:writesettingphp' => 'Unable to write /elgg-config/settings.php',
131
+    'install:error:requiredfield' => '%s es requerido',
132
+    'install:error:relative_path' => 'We don\'t think "%s" is an absolute path for your data directory',
133
+    'install:error:datadirectoryexists' => 'El directorio de datos (data) %s no existe.',
134
+    'install:error:writedatadirectory' => 'El servidor no puede escribir en el directorio de datos (data) %s.',
135
+    'install:error:locationdatadirectory' => 'El directorio de datos (data) %s debe encontrarse fuera de la carpeta de instalación por motivos de seguridad.',
136
+    'install:error:emailaddress' => '%s no es una dirección de Email válida',
137
+    'install:error:createsite' => 'No se pudo crear el sitio.',
138
+    'install:error:savesitesettings' => 'No se pudo guardar la configuración del sitio',
139
+    'install:error:loadadmin' => 'No se pudo cargar el usuario administrador.',
140
+    'install:error:adminaccess' => 'No se le pueden otorgar privilegios de administrador al usuario.',
141
+    'install:error:adminlogin' => 'No se puede autenticar automáticamente al usuario administrador.',
142
+    'install:error:rewrite:apache' => 'Creemos que su servidor se encuentra ejecutando el web server Apache.',
143
+    'install:error:rewrite:nginx' => 'Creemos que su servidor se encuentra ejecutando el web server Nginx.',
144
+    'install:error:rewrite:lighttpd' => 'Creemos que su servidor se encuentra ejecutando el web server Lighttpd.',
145
+    'install:error:rewrite:iis' => 'Creemos que su servidor se encuentra ejecutando el web server Microsoft IIS.',
146
+    'install:error:rewrite:allowoverride' => "La prueba de reescritura falló, la causa mas común es que AllowOverride no se encuentra establecido en All en el directorio de Elgg. Esto le impide al apache procesar el archivo .htaccess el cual contiene las reglas de reescritura.
147 147
 				\n\nOtra causa puede ser que el Apache tenga configurado un alias para el directorio de Elgg y deba establecer RewriteBase en su archivo .htaccess. Hay varias instrucciones en el archivo .htaccess de su directorio de Elgg.",
148
-	'install:error:rewrite:htaccess:write_permission' => 'Su servidor web no tiene permisos para escribir el archivo .htaccess en la carpeta de Elgg. Debe copiar manualmente htaccess_dist a .htaccess o modificar los permisos en el directorio.',
149
-	'install:error:rewrite:htaccess:read_permission' => 'Hay un archivo .htaccess en el directorio de Elgg, pero su servidor web no tiene los permisos necesarios para leerlo.',
150
-	'install:error:rewrite:htaccess:non_elgg_htaccess' => 'Hay un archivo .htaccess en el directorio de Elgg que no ha sido creado por Elgg. Por favor elimínelo.',
151
-	'install:error:rewrite:htaccess:old_elgg_htaccess' => 'Al parecer hay un archivo .htaccess de Elgg antiguo en el directorio de Elgg. El mismo no contiene la regla de reescritura para realizar la prueba del servidor web.',
152
-	'install:error:rewrite:htaccess:cannot_copy' => 'Ha ocurrido un error desconocido al crear el archivo .htaccess. Deberá copiar manualmente htaccess_dist a .htaccess en el directorio de Elgg.',
153
-	'install:error:rewrite:altserver' => 'La prueba de la reescritura de reglas ha fallado. Debe configurar su servidor web con reescritura de reglas e intentar nuevamente.',
154
-	'install:error:rewrite:unknown' => 'Oof. No podemos saber qué tipo de servidor web se encuentra ejecutando y falló la reescritura de reglas. No podemos ofrecer ninguna ayuda específica. Por favor verifique el enlace de solución de problemas.',
155
-	'install:warning:rewrite:unknown' => 'Su servidor no soporta la prueba automática de reescritura de reglas. Puede continuar con la instalación, pero puede experimentar problemas con el sitio. Puede probar manualmente las reescritura de reglas accediento a este enlace: <a href="%s" target="_blank">pruebas</a>. Observará la palabra success si la ejecución ha sido exitosa.',
148
+    'install:error:rewrite:htaccess:write_permission' => 'Su servidor web no tiene permisos para escribir el archivo .htaccess en la carpeta de Elgg. Debe copiar manualmente htaccess_dist a .htaccess o modificar los permisos en el directorio.',
149
+    'install:error:rewrite:htaccess:read_permission' => 'Hay un archivo .htaccess en el directorio de Elgg, pero su servidor web no tiene los permisos necesarios para leerlo.',
150
+    'install:error:rewrite:htaccess:non_elgg_htaccess' => 'Hay un archivo .htaccess en el directorio de Elgg que no ha sido creado por Elgg. Por favor elimínelo.',
151
+    'install:error:rewrite:htaccess:old_elgg_htaccess' => 'Al parecer hay un archivo .htaccess de Elgg antiguo en el directorio de Elgg. El mismo no contiene la regla de reescritura para realizar la prueba del servidor web.',
152
+    'install:error:rewrite:htaccess:cannot_copy' => 'Ha ocurrido un error desconocido al crear el archivo .htaccess. Deberá copiar manualmente htaccess_dist a .htaccess en el directorio de Elgg.',
153
+    'install:error:rewrite:altserver' => 'La prueba de la reescritura de reglas ha fallado. Debe configurar su servidor web con reescritura de reglas e intentar nuevamente.',
154
+    'install:error:rewrite:unknown' => 'Oof. No podemos saber qué tipo de servidor web se encuentra ejecutando y falló la reescritura de reglas. No podemos ofrecer ninguna ayuda específica. Por favor verifique el enlace de solución de problemas.',
155
+    'install:warning:rewrite:unknown' => 'Su servidor no soporta la prueba automática de reescritura de reglas. Puede continuar con la instalación, pero puede experimentar problemas con el sitio. Puede probar manualmente las reescritura de reglas accediento a este enlace: <a href="%s" target="_blank">pruebas</a>. Observará la palabra success si la ejecución ha sido exitosa.',
156 156
 	
157
-	// Bring over some error messages you might see in setup
158
-	'exception:contact_admin' => 'An unrecoverable error has occurred and has been logged. If you are the site administrator check your settings file, otherwise contact the site administrator with the following information:',
159
-	'DatabaseException:WrongCredentials' => "Elgg no puede conectar con la base de datos, usando los credenciales. Consulte en el archivo 'settings'.",
157
+    // Bring over some error messages you might see in setup
158
+    'exception:contact_admin' => 'An unrecoverable error has occurred and has been logged. If you are the site administrator check your settings file, otherwise contact the site administrator with the following information:',
159
+    'DatabaseException:WrongCredentials' => "Elgg no puede conectar con la base de datos, usando los credenciales. Consulte en el archivo 'settings'.",
160 160
 ];
Please login to merge, or discard this patch.