Index: realworks_cron.inc
===================================================================
--- realworks_cron.inc	(revision 195)
+++ realworks_cron.inc	(working copy)
@@ -9,13 +9,13 @@
     $RW_location = REALWORKS_XML_FILE2;
 
   $realworks_lock = variable_get('realworks_lock', 0);
-  if (REALWORKS_XML_URL2 && ((is_null($RW_location)) || (filemtime(REALWORKS_XML_FILE2) < (time() - (24 * 60 * 60)))) && ($realworks_lock < (time() - (24 * 60 * 60)))) {
-  //if (REALWORKS_XML_URL2 && ($realworks_lock < (time() - (24 * 60 * 60)))) {
+  $realworks_uri = variable_get('realworks_uri', 'http://xml-publish.realworks.nl/servlets/ogexport?koppeling=WEBSITE&user=123456&password=1234&og=WONEN');
+  if ($realworks_uri && ((is_null($RW_location)) || (filemtime(REALWORKS_XML_FILE2) < (time() - (24 * 60 * 60)))) && ($realworks_lock < (time() - (24 * 60 * 60)))) {
     variable_set('realworks_lock', time());
     $success = false;
 
     $curl_handle=curl_init();
-    curl_setopt($curl_handle, CURLOPT_URL,REALWORKS_XML_URL2);
+    curl_setopt($curl_handle, CURLOPT_URL,$realworks_uri);
     curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 60);
     curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
     curl_setopt($curl_handle, CURLOPT_USERAGENT, 'Mennes/1.0');
@@ -295,7 +295,7 @@
   }
 
   if (count($old_fids) > 0) {
-    $old_fids = implode($old_fids);
+    $old_fids = implode(',', $old_fids);
     $query = "DELETE FROM {realworks} WHERE fid IN (%s)";
     db_query($query, $old_fids);
     $query = "DELETE FROM {files} WHERE fid IN (%s)";
Index: realworks.module
===================================================================
--- realworks.module	(revision 195)
+++ realworks.module	(working copy)
@@ -8,9 +8,8 @@
 /**
  * Settings
  */
-define('REALWORKS_XML_URL2', variable_get('realworks_uri', 'http://xml-publish.realworks.nl/servlets/ogexport?koppeling=WEBSITE&user=123456&password=1234&og=WONEN'));
-define('REALWORKS_XML_FILE2', dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/default/files/woningaanbod2.xml');
-define('REALWORKS_XSD_FILE2', dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/default/files/woningaanbod2.xsd');
+define('REALWORKS_XML_FILE2', file_create_path(file_directory_path() . '/woningaanbod2.xml'));
+define('REALWORKS_XSD_FILE2', file_create_path(file_directory_path() . '/woningaanbod2.xsd'));
 
 
 /**
