Commit:    2801aac305f4a9667a828be9707c47ae173bcd44
Author:    Andreas Heigl <[email protected]>         Mon, 24 Mar 2014 07:15:27 
+0100
Parents:   af3c3153d45d95692b6a9bc38f5d9e41d183299b
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=2801aac305f4a9667a828be9707c47ae173bcd44

Log:
Removes unnecessary code

Changed paths:
  M  include/layout.inc
  M  ug.php


Diff:
diff --git a/include/layout.inc b/include/layout.inc
index 235e6fc..4441dd3 100644
--- a/include/layout.inc
+++ b/include/layout.inc
@@ -606,12 +606,6 @@ function get_near_usergroups()
 function get_usergroups_in($country, &$allcountries = array()) {
     $filename = $_SERVER["DOCUMENT_ROOT"] . "/backend/usergroups.json";
 
-    // get the complete list of usergroups once a day
-    if (! file_exists($filename) || (time()-24*60*60) > filemtime($filename)) {
-        $data = file_get_contents('http://php.ug/api/rest/listtype.json/1');
-        file_put_contents($filename, $data);
-    }
-
     $matches = array();
     $data = json_decode(file_get_contents($filename), true);
     foreach($data["groups"] as $group) {
diff --git a/ug.php b/ug.php
index b0a8b59..d485eaf 100644
--- a/ug.php
+++ b/ug.php
@@ -28,14 +28,7 @@ function ug_get_more_info($group) {
     $url = $group["icalendar_url"];
 
     $filename = "backend/events/" . md5($url);
-    if (! file_exists($filename) || (time()-24*60*60) > filemtime($filename)) {
-        if (strncmp("webcal://", $url, strlen("webcal://")) == 0) {
-            $url = str_replace("webcal://", "http://";, $url);
-        }
-        $data = file_get_contents($url);
-        file_put_contents("backend/events/" . md5($group["icalendar_url"]), 
$data);
-    }
-    // */
+
     /* Broken icalendar link */
     if (!file_exists($filename)) {
         return null;


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to