Skip to content

Commit

Permalink
Removed useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed Dec 4, 2013
1 parent dee9ae8 commit 477d2ad
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 22 deletions.
2 changes: 1 addition & 1 deletion build/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<addon addon_id="s9e" title="s9e Media Pack" url="https://github.com/s9e/XenForoMediaBBCodes" version_id="20131203b" version_string="201312031" install_callback_class="s9e_MediaBBCodes" install_callback_method="install">
<addon addon_id="s9e" title="s9e Media Pack" url="https://github.com/s9e/XenForoMediaBBCodes" version_id="20131204" version_string="201312040" install_callback_class="s9e_MediaBBCodes" install_callback_method="install">
<bb_code_media_sites>
<site media_site_id="bandcamp" site_title="Bandcamp" site_url="http://bandcamp.com/" match_is_regex="1" supported="1" embed_html_callback_class="s9e_MediaBBCodes" embed_html_callback_method="embed" match_callback_class="s9e_MediaBBCodes" match_callback_method="matchBandcamp">
<match_urls>!(?'id')bandcamp\.com/album/.!
Expand Down
11 changes: 1 addition & 10 deletions build/upload/library/s9e/MediaBBCodes.php
Expand Up @@ -110,16 +110,7 @@ function ($m) use ($scrapeVars)

public static function embed($mediaKey, $site)
{
if (preg_match('(^https?://)', $mediaKey))
{
$regexps = (isset($site['regexes']) && is_array($site['regexes']))
? $site['regexes']
: array();

// If the URL is stored in the media site, reparse it and store the captures
$vars = self::getNamedCaptures($mediaKey, $regexps);
}
elseif (preg_match('(^(\\w+=[^;]*)(?>;(?1))*$)', $mediaKey))
if (preg_match('(^(\\w+=[^;]*)(?>;(?1))*$)', $mediaKey))
{
// If the URL looks like a series of key=value pairs, add them to $vars
$vars = array();
Expand Down
11 changes: 1 addition & 10 deletions scripts/build.php
Expand Up @@ -128,16 +128,7 @@ function ($m) use ($scrapeVars)
public static function embed($mediaKey, $site)
{
if (preg_match('(^https?://)', $mediaKey))
{
$regexps = (isset($site['regexes']) && is_array($site['regexes']))
? $site['regexes']
: array();
// If the URL is stored in the media site, reparse it and store the captures
$vars = self::getNamedCaptures($mediaKey, $regexps);
}
elseif (preg_match('(^(\\w+=[^;]*)(?>;(?1))*$)', $mediaKey))
if (preg_match('(^(\\w+=[^;]*)(?>;(?1))*$)', $mediaKey))
{
// If the URL looks like a series of key=value pairs, add them to $vars
$vars = array();
Expand Down

0 comments on commit 477d2ad

Please sign in to comment.