Commit: db18a15c3a4863a689d118bcd46357fd20f49abc Author: Hannes Magnusson <[email protected]> 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 -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
