[geeklog-cvs] Geeklog-1.x/public_html/webservices/atom index.php, 1.1, 1.2

Ramnath Iyer riyer at qs1489.pair.com
Sun Sep 2 20:39:14 EDT 2007


Update of /cvsroot/geeklog/Geeklog-1.x/public_html/webservices/atom
In directory qs1489.pair.com:/tmp/cvs-serv33954/public_html/webservices/atom

Modified Files:
	index.php 
Log Message:
Added a PHP version check and a $WS_DISABLED flag to disable WS if required


Index: index.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/webservices/atom/index.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** index.php	11 Aug 2007 16:48:56 -0000	1.1
--- index.php	3 Sep 2007 00:39:12 -0000	1.2
***************
*** 34,37 ****
--- 34,47 ----
  require_once $_CONF['path_system'] . '/lib-webservices.php';
  
+ /* Check if WS component is enabled */
+ if ($WS_DISABLED) {
+     /* Pretend the WS doesn't exist */
+     header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
+     exit();
+ }
+ 
+ // Set the default content type
+ header('Content-type: ' . 'application/atom+xml' . '; charset=UTF-8');
+ 
  /* Authenticate the user IF credentials are present */
  WS_authenticate();




More information about the geeklog-cvs mailing list