From f7c82895f560b91ae4ba4f09622065eb32b50893 Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Sat, 18 Mar 2006 08:06:10 +0000 Subject: [PATCH] display a nice error message when accessing this file with a browser --- rpc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpc.php b/rpc.php index 1d90ce5970..e7b6a64a3d 100644 --- a/rpc.php +++ b/rpc.php @@ -26,7 +26,7 @@ include('./header.inc.php'); // SyncML works currently only with PHP sessions if($GLOBALS['egw_info']['server']['sessions_type'] == 'db') { - error_log('SyncML support is currently not available with DB sessions. Please switch to PHP4 sessions in header.inc.php.'); + error_log('SyncML support is currently not available with DB sessions. Please switch to PHP sessions in header.inc.php.'); exit; } @@ -61,6 +61,10 @@ if (!empty($_SERVER['CONTENT_TYPE'])) { $serverType = 'soap'; } +if($serverType != 'syncml' && $serverType != 'syncml_wbxml') { + die('You can access this URL only with a SyncML enabled device.'); +} + if ($serverType == 'soap' && (!isset($_SERVER['REQUEST_METHOD']) || $_SERVER['REQUEST_METHOD'] != 'POST')) {