]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
trac750 add timestamp to CSS file to keep Facebook's caching from ignoring our changes
authorZach Copley <zach@controlyourself.ca>
Mon, 8 Dec 2008 05:18:59 +0000 (00:18 -0500)
committerZach Copley <zach@controlyourself.ca>
Mon, 8 Dec 2008 05:18:59 +0000 (00:18 -0500)
darcs-hash:20081208051859-7b5ce-5d777044f81edd562a4fe825cfcc12233e2bc5dc.gz

lib/facebookaction.php

index d5f0adbb88d3e17fdc386e328758f257c9d95708..87a82ba01e59e9dba31db4dbcb6625a69bd5c548 100644 (file)
@@ -88,17 +88,21 @@ class FacebookAction extends Action {
 
        function show_header($selected ='Home') {
 
-        $header = '<link rel="stylesheet" type="text/css" href="'. theme_path('facebookapp.css') . '" />';
-        # $header .='<script src="" ></script>';
-         $header .= '<fb:dashboard/>';
-
-         $header .=
-               '<fb:tabs>'
-               .'<fb:tab-item title="Home" href="index.php" selected="' . ($selected == 'Home') .'" />'
-               .'<fb:tab-item title="Invite Friends"  href="invite.php" selected="' . ($selected == 'Invite') . '" />'
-               .'<fb:tab-item title="Settings"  href="settings.php" selected="' . ($selected == 'Settings') . '" />'
-               .'</fb:tabs>';
-         $header .= '<div id="main_body">';
+               # Add a timestamp to the CSS file so Facebook cache wont ignore our changes
+               $ts = filemtime(theme_file('facebookapp.css'));
+               $cssurl = theme_path('facebookapp.css') . "?ts=$ts";
+
+               $header = '<link rel="stylesheet" type="text/css" href="'. $cssurl . '" />';
+               # $header .='<script src="" ></script>';
+               $header .= '<fb:dashboard/>';
+
+               $header .=
+                       '<fb:tabs>'
+                       .'<fb:tab-item title="Home" href="index.php" selected="' . ($selected == 'Home') .'" />'
+                       .'<fb:tab-item title="Invite Friends"  href="invite.php" selected="' . ($selected == 'Invite') . '" />'
+                       .'<fb:tab-item title="Settings"  href="settings.php" selected="' . ($selected == 'Settings') . '" />'
+                       .'</fb:tabs>';
+               $header .= '<div id="main_body">';
 
          echo $header;