[geeklog-cvs] Geeklog-1.x/system lib-webservices.php,1.8,1.9

Dirk Haun dhaun at qs1489.pair.com
Mon Sep 17 14:51:53 EDT 2007


Update of /cvsroot/geeklog/Geeklog-1.x/system
In directory qs1489.pair.com:/tmp/cvs-serv56933/system

Modified Files:
	lib-webservices.php 
Log Message:
Need to use $_CONF['site_url'] for the webservices to work with a site installed in a subdirectory


Index: lib-webservices.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/lib-webservices.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** lib-webservices.php	16 Sep 2007 16:48:15 -0000	1.8
--- lib-webservices.php	17 Sep 2007 18:51:51 -0000	1.9
***************
*** 148,152 ****
      if ($ret == PLG_RET_OK) {
          header($_SERVER['SERVER_PROTOCOL'] . ' 201 Created');
!         header('Location: ' . 'http://' . $_SERVER['HTTP_HOST'] . '/webservices/atom/?plugin=' . $WS_PLUGIN . '&id' . '=' . $svc_msg['id']);
          // Output the actual object here
          return;
--- 148,152 ----
      if ($ret == PLG_RET_OK) {
          header($_SERVER['SERVER_PROTOCOL'] . ' 201 Created');
!         header('Location: ' . $_CONF['site_url'] . '/webservices/atom/?plugin=' . $WS_PLUGIN . '&id' . '=' . $svc_msg['id']);
          // Output the actual object here
          return;
***************
*** 199,203 ****
          header('Content-type: application/atomsvc+xml; charset=UTF-8');
  
!         $atom_uri = 'http://' . $_SERVER['HTTP_HOST'] . '/webservices/atom/';
  
          /* 'story' is the default plugin */
--- 199,203 ----
          header('Content-type: application/atomsvc+xml; charset=UTF-8');
  
!         $atom_uri = $_CONF['site_url'] . '/webservices/atom/';
  
          /* 'story' is the default plugin */
***************
*** 303,307 ****
                  $feed_link->setAttribute('rel', 'self');
                  $feed_link->setAttribute('type', 'application/atom+xml');
!                 $feed_link->setAttribute('href', 'http://' . $_SERVER['HTTP_HOST'] . '/webservices/atom/?plugin=' . htmlentities($WS_PLUGIN));
                  $feed_elem->appendChild($feed_link);
  
--- 303,307 ----
                  $feed_link->setAttribute('rel', 'self');
                  $feed_link->setAttribute('type', 'application/atom+xml');
!                 $feed_link->setAttribute('href', $_CONF['site_url'] . '/webservices/atom/?plugin=' . htmlentities($WS_PLUGIN));
                  $feed_elem->appendChild($feed_link);
  
***************
*** 310,314 ****
                      $next_link->setAttribute('rel', 'next');
                      $next_link->setAttribute('type', 'application/atom+xml');
!                     $next_link->setAttribute('href', 'http://' . $_SERVER['HTTP_HOST'] . '/webservices/atom/?plugin=' . htmlentities($WS_PLUGIN) . '&offset=' . $svc_msg['offset']);
                      $feed_elem->appendChild($next_link);
                  }
--- 310,314 ----
                      $next_link->setAttribute('rel', 'next');
                      $next_link->setAttribute('type', 'application/atom+xml');
!                     $next_link->setAttribute('href', $_CONF['site_url'] . '/webservices/atom/?plugin=' . htmlentities($WS_PLUGIN) . '&offset=' . $svc_msg['offset']);
                      $feed_elem->appendChild($next_link);
                  }
***************
*** 534,538 ****
          $link_self->setAttribute('rel', 'edit');
          $link_self->setAttribute('type', 'application/atom+xml');
!         $link_self->setAttribute('href', 'http://' . $_SERVER['HTTP_HOST'] . '/webservices/atom/?plugin=' . htmlentities($WS_PLUGIN) . '&id=' . htmlentities($arr['id']));
          $entry_elem->appendChild($link_self);
      }
--- 534,538 ----
          $link_self->setAttribute('rel', 'edit');
          $link_self->setAttribute('type', 'application/atom+xml');
!         $link_self->setAttribute('href', $_CONF['site_url'] . '/webservices/atom/?plugin=' . htmlentities($WS_PLUGIN) . '&id=' . htmlentities($arr['id']));
          $entry_elem->appendChild($link_self);
      }




More information about the geeklog-cvs mailing list