rendered paste bodyIndex: /Users/nate/Sites/sonymulti_myplay/trunk/public_html/sites/all/modules/custom/myplay_share/myplay_share.module===================================================================--- /Users/nate/Sites/sonymulti_myplay/trunk/public_html/sites/all/modules/custom/myplay_share/myplay_share.module (revision 1779)+++ /Users/nate/Sites/sonymulti_myplay/trunk/public_html/sites/all/modules/custom/myplay_share/myplay_share.module (working copy)@@ -20,7 +20,7 @@ $items[] = array( // Note that this path is rewritten from 'files/musicbox_cache/xml' // in http.conf OR .htaccess.- 'path' => file_create_path('musicbox_cache/xml'),+ 'path' => file_directory_path() .'/musicbox_cache/xml', 'access' => TRUE, 'type' => MENU_CALLBACK, 'callback' => 'myplay_share_xml',@@ -31,12 +31,6 @@ 'type' => MENU_CALLBACK, 'callback' => 'myplay_share_widget_basic', );- $items[] = array(- 'path' => 'share/video/all',- 'access' => TRUE,- 'type' => MENU_CALLBACK,- 'callback' => 'musicbox_share_xml_site',- ); } return $items; }@@ -73,8 +67,8 @@ // Don't give this request a session. session_save_session(FALSE); - $valid_types = array('single','favorite_videos','favorite_artists','artist_videos', 'genre', 'site', 'viral');- if (!in_array($type,$valid_types) || !is_numeric($id)) {+ $valid_types = array('single', 'favorite_videos', 'favorite_artists', 'artist_videos', 'genre', 'site', 'viral', 'videos');+ if (!in_array($type, $valid_types) || empty($id)) { return drupal_not_found(); } @@ -83,10 +77,11 @@ $xml = $function($id); // Create the directories as necessary.- file_check_directory(file_create_path('musicbox_cache/xml/'. $type), FILE_CREATE_DIRECTORY);+ $path = file_directory_path() .'/musicbox_cache/xml/'. $type;+ file_check_directory($path, FILE_CREATE_DIRECTORY); // Create the XML cache file.- file_save_data($xml, file_create_path('musicbox_cache/xml/'. $type) .'/'. $id, FILE_EXISTS_REPLACE);+ file_save_data($xml, 'musicbox_cache/xml/'. $type .'/'. $id, FILE_EXISTS_REPLACE); // Print the XML and exit. drupal_set_header('Content-Type: text/xml');@@ -281,7 +276,7 @@ /** * Whole site video feed. */-function musicbox_share_xml_site($limit = 10) {+function myplay_share_xml_videos($limit = 10) { // Don't give this request a session. session_save_session(FALSE); @@ -361,10 +356,7 @@ $xml = '<?xml version="1.0" encoding="UTF-8"?> <videos>'. $videos .'</videos>'; - // Print the XML and exit.- drupal_set_header('Content-Type: text/xml');- print $xml;- exit;+ return $xml; } /**