コード例 #1
0
ファイル: rss.php プロジェクト: a2call/commsy
 global $c_webserver;
 if (isset($c_webserver) and $c_webserver == 'lighttpd') {
     $path = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
 } else {
     $path = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];
 }
 $path = str_replace('rss.php', '', $path);
 // start of execution time
 include_once 'functions/misc_functions.php';
 $time_start = getmicrotime();
 include_once 'classes/cs_environment.php';
 include_once 'functions/curl_functions.php';
 // needed for setting fileArray
 $environment = new cs_environment();
 $environment->setCurrentContextID($_GET['cid']);
 $hash_manager = $environment->getHashManager();
 $context_item = $environment->getCurrentContextItem();
 $validated = false;
 if ($context_item->isOpenForGuests()) {
     $validated = true;
 }
 function setFileArray($item)
 {
     global $environment;
     $file_array = $item->getFileList()->to_Array();
     $file_name_array = array();
     foreach ($file_array as $file) {
         $file_name_array[htmlentities($file->getDisplayName(), ENT_NOQUOTES, 'UTF-8')] = $file;
     }
     $environment->getTextConverter()->setFileArray($file_name_array);
 }