Exemple #1
0
 /**
  * Get the XML <rss> node corresponding to a gallery
  *
  * @param $gallery object The gallery to include in RSS
  * @param $prev_gallery object The previous gallery to link in RSS (null if none)
  * @param $next_gallery object The next gallery to link in RSS (null if none)
  * @return string
  */
 function get_gallery_mrss($gallery, $prev_gallery = null, $next_gallery = null)
 {
     global $flag;
     $flag_options = get_option('flag_options');
     //Set sort order value, if not used (upgrade issue)
     $flag_options['galSort'] = $flag_options['galSort'] ? $flag_options['galSort'] : 'pid';
     $flag_options['galSortDir'] = $flag_options['galSortDir'] == 'DESC' ? 'DESC' : 'ASC';
     $title = stripslashes(flagGallery::i18n($gallery->title));
     $description = stripslashes(flagGallery::i18n($gallery->galdesc));
     $link = get_option('siteurl');
     $prev_link = $prev_gallery != null ? flagMediaRss::get_gallery_mrss_url($prev_gallery->gid, true) : '';
     $next_link = $next_gallery != null ? flagMediaRss::get_gallery_mrss_url($next_gallery->gid, true) : '';
     $images = flagdb::get_gallery($gallery->gid, $flag_options['galSort'], $flag_options['galSortDir']);
     return flagMediaRss::get_mrss_root_node($title, $description, $link, $prev_link, $next_link, $images);
 }