fixes #11
* the config file handling code has been moved to a separate file which is shared between normal and AJAX code * the config file existence is checked and a well formatted error message is sent if it doesn't exist
This commit is contained in:
parent
58fe5e13a3
commit
5cffb1dd17
3 changed files with 58 additions and 25 deletions
|
@ -27,18 +27,8 @@
|
|||
* 02110-1301 USA.
|
||||
*/
|
||||
|
||||
/** Include common internationalization code. */
|
||||
require_once("i18n.inc.php");
|
||||
|
||||
if (!isset($_SERVER['DavAdminConfDir'])) {
|
||||
header('HTTP/1.0 500 Internal Server Error');
|
||||
header('Status: 500 Internal Server Error');
|
||||
header('Content-Type: text/plain;charset=utf8');
|
||||
print(_("The Server is not configured correctly. Please tell your Administrator to set the DavAdminConfDir environment variable."));
|
||||
exit();
|
||||
}
|
||||
/** Include configuration information. */
|
||||
require_once($_SERVER['DavAdminConfDir'] . '/config.inc.php');
|
||||
/** Include the code shared between normal pages and AJAX. */
|
||||
require_once("shared.inc.php");
|
||||
|
||||
// output is plain text (JSON or an error message)
|
||||
header("Content-Type: text/plain; charset=UTF-8");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue