Skip to content

Commit

Permalink
Updated s9e\TextFormatter. Replaced PHP 5.3 with PHP 5.4 in Travis's …
Browse files Browse the repository at this point in the history
…matrix
  • Loading branch information
JoshyPHP committed Oct 24, 2015
1 parent 2a16d79 commit 03b6d96
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ matrix:
fast_finish: true
php:
- 5.6
- 5.3
- 5.4
env:
global:
- DB=mysqli
Expand Down
35 changes: 22 additions & 13 deletions bundle.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "phpbb-extension",
"description": "Embed third-party content in your phpBB forum",
"homepage": "https://github.com/s9e/phpbb-ext-mediaembed/",
"version": "20150930",
"version": "20151024",
"keywords": ["phpbb","embed","forum","media"],
"license": "MIT",
"require": {
Expand Down
21 changes: 9 additions & 12 deletions parsing.php
Original file line number Diff line number Diff line change
Expand Up @@ -1588,8 +1588,6 @@ protected static function addSiteTag(Tag $tag, TagStack $tagStack, $siteId)
}
protected static function addTagFromMediaId(Tag $tag, TagStack $tagStack, array $sites)
{
if (!$tag->hasAttribute('id') && $tag->hasAttribute('url') && \strpos($tag->getAttribute('url'), '://') === \false)
$tag->setAttribute('id', $tag->getAttribute('url'));
$siteId = \strtolower($tag->getAttribute('media'));
if (\in_array($siteId, $sites, \true))
self::addSiteTag($tag, $tagStack, $siteId);
Expand Down Expand Up @@ -1666,25 +1664,24 @@ protected static function tagIsMissingAnyAttribute(Tag $tag, array $attrNames)
}
protected static function wget($url, $cacheDir = \null)
{
$prefix = $suffix = $context = \null;
$contextOptions = array(
'http' => array('user_agent' => 'PHP (not Mozilla)'),
'ssl' => array('verify_peer' => \false)
);
$prefix = $suffix = '';
if (\extension_loaded('zlib'))
{
$prefix = 'compress.zlib://';
$suffix = '.gz';
$context = \stream_context_create(
array(
'http' => array('header' => 'Accept-Encoding: gzip'),
'ssl' => array('verify_peer' => \false)
)
);
$prefix = 'compress.zlib://';
$suffix = '.gz';
$contextOptions['http']['header'] = 'Accept-Encoding: gzip';
}
if (isset($cacheDir) && \file_exists($cacheDir))
{
$cacheFile = $cacheDir . '/http.' . \crc32($url) . $suffix;
if (\file_exists($cacheFile))
return \file_get_contents($prefix . $cacheFile);
}
$content = @\file_get_contents($prefix . $url, \false, $context);
$content = @\file_get_contents($prefix . $url, \false, \stream_context_create($contextOptions));
if (isset($cacheFile) && $content !== \false)
\file_put_contents($prefix . $cacheFile, $content);
return $content;
Expand Down
6 changes: 3 additions & 3 deletions rendering.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion versions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"stable":{"20150930":{"current":"20150930","announcement":"https:\/\/www.phpbb.com\/community\/viewtopic.php?f=456&t=2272431","download":"https:\/\/github.com\/s9e\/phpbb-ext-mediaembed\/releases\/download\/20150930\/s9e-mediaembed-20150930.zip","eol":null,"security":false}}}
{"stable":{"20151024":{"current":"20151024","announcement":"https:\/\/www.phpbb.com\/community\/viewtopic.php?f=456&t=2272431","download":"https:\/\/github.com\/s9e\/phpbb-ext-mediaembed\/releases\/download\/20151024\/s9e-mediaembed-20151024.zip","eol":null,"security":false}}}

0 comments on commit 03b6d96

Please sign in to comment.