com web/master: Rename file to match the include: scripts/userg roups_udate_infos scripts/usergroups_update_infos

From: Date: Thu, 27 Mar 2014 07:37:27 +0000
Subject: com web/master: Rename file to match the include: scripts/userg roups_udate_infos scripts/usergroups_update_infos
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-18619@lists.php.net to get a copy of this message
Commit: db18a15c3a4863a689d118bcd46357fd20f49abc Author: Hannes Magnusson <bjori@mongodb.com> Thu, 27 Mar 2014 00:37:27 -0700 Parents: f82d11721e41493f1d7f3ae63dde9da6c755410f Branches: master Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=db18a15c3a4863a689d118bcd46357fd20f49abc Log: Rename file to match the include Changed paths: D scripts/usergroups_udate_infos A scripts/usergroups_update_infos Diff: diff --git a/scripts/usergroups_udate_infos b/scripts/usergroups_udate_infos deleted file mode 100644 index c7af49a..0000000 --- a/scripts/usergroups_udate_infos +++ /dev/null @@ -1,27 +0,0 @@ -<?php /* vim: set noet ts=4 sw=4 ft=php: : */ - -define('USERGROUP_JSON_URL', 'http://php.ug/api/rest/listtype.json/1'); - -function usergroups_update_infos($root) -{ - /* - * Fetch Usergroup-Informations - */ - $nameOfUgCacheFile = $root . "/backend/usergroups.json"; - // Get the complete list of usergroups. - fetch_into_file(USERGROUP_JSON_URL, $nameOfUgCacheFile) - - $usergroups = json_decode(file_get_contents($nameOfUgCacheFile), true); - foreach($usergroups['groups'] as $group) { - - if (! isset($group['icalendar_url']) { - continue; - } - $url = $group['icalendar_url']; - $usergroupIcalFileCache = $root . "/backend/events/" . md5($url); - if (strncmp("webcal://", $url, strlen("webcal://")) == 0) { - $url = str_replace("webcal://", "http://", $url); - } - fetch_into_file($url, $usergroupIcalFileCache); - } -} \ No newline at end of file diff --git a/scripts/usergroups_update_infos b/scripts/usergroups_update_infos new file mode 100644 index 0000000..c7af49a --- /dev/null +++ b/scripts/usergroups_update_infos @@ -0,0 +1,27 @@ +<?php /* vim: set noet ts=4 sw=4 ft=php: : */ + +define('USERGROUP_JSON_URL', 'http://php.ug/api/rest/listtype.json/1'); + +function usergroups_update_infos($root) +{ + /* + * Fetch Usergroup-Informations + */ + $nameOfUgCacheFile = $root . "/backend/usergroups.json"; + // Get the complete list of usergroups. + fetch_into_file(USERGROUP_JSON_URL, $nameOfUgCacheFile) + + $usergroups = json_decode(file_get_contents($nameOfUgCacheFile), true); + foreach($usergroups['groups'] as $group) { + + if (! isset($group['icalendar_url']) { + continue; + } + $url = $group['icalendar_url']; + $usergroupIcalFileCache = $root . "/backend/events/" . md5($url); + if (strncmp("webcal://", $url, strlen("webcal://")) == 0) { + $url = str_replace("webcal://", "http://", $url); + } + fetch_into_file($url, $usergroupIcalFileCache); + } +} \ No newline at end of file

« previous php.webmaster (#18619) next »