diff options
author | Richard Beales <[email protected]> | 2013-03-20 16:59:19 +0000 |
---|---|---|
committer | Richard Beales <[email protected]> | 2013-03-20 16:59:19 +0000 |
commit | 77accf45df3072bf0e3fe1e919bb75fc14313119 (patch) | |
tree | 84be283769a6849f4916880739044a163e6f4761 /include | |
parent | 04ed8b423abd9046ac4ee6813cf5e98b37aad2a3 (diff) | |
parent | 2d2d08fc41dec694ac0895368eff3eb80a173a5b (diff) |
fix merge conflict with stylesheet tags
Diffstat (limited to 'include')
-rw-r--r-- | include/functions.php | 28 | ||||
-rw-r--r-- | include/localized_schema.php | 2 |
2 files changed, 26 insertions, 4 deletions
diff --git a/include/functions.php b/include/functions.php index 62699e175..d9a3a5963 100644 --- a/include/functions.php +++ b/include/functions.php @@ -295,7 +295,7 @@ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout ? $timeout : 15); curl_setopt($ch, CURLOPT_TIMEOUT, $timeout ? $timeout : 45); - //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, !ini_get("safe_mode")); curl_setopt($ch, CURLOPT_MAXREDIRS, 20); curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); @@ -2609,7 +2609,8 @@ } if ($entry->nodeName == 'img') { - if (get_pref($link, "STRIP_IMAGES", $owner) || $force_remove_images) { + if (($owner && get_pref($link, "STRIP_IMAGES", $owner)) || + $force_remove_images) { $p = $doc->createElement('p'); @@ -3633,7 +3634,7 @@ array_push($entries, $entry); } - if (!get_pref($link, "STRIP_IMAGES")) { + if ($_SESSION['uid'] && !get_pref($link, "STRIP_IMAGES")) { if ($always_display_enclosures || !preg_match("/<img/i", $article_content)) { @@ -4069,4 +4070,25 @@ return $rv; } + function stylesheet_tag($filename) { + $timestamp = filemtime($filename); + + echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$filename?$timestamp\"/>\n"; + } + + function javascript_tag($filename) { + $query = ""; + + if (!(strpos($filename, "?") === FALSE)) { + $query = substr($filename, strpos($filename, "?")+1); + $filename = substr($filename, 0, strpos($filename, "?")); + } + + $timestamp = filemtime($filename); + + if ($query) $timestamp .= "&$query"; + + echo "<script type=\"text/javascript\" charset=\"utf-8\" src=\"$filename?$timestamp\"></script>\n"; + } + ?> diff --git a/include/localized_schema.php b/include/localized_schema.php index 71436d96a..2f5903dc7 100644 --- a/include/localized_schema.php +++ b/include/localized_schema.php @@ -1,4 +1,4 @@ -<?php # This file has been generated at: Wed Mar 20 10:24:45 MSK 2013 +<?php # This file has been generated at: Wed Mar 20 15:53:19 MSK 2013 __("Title"); __("Title or Content"); |