Skip to content

Commit

Permalink
Sync: Drop netmirror from spartacus
Browse files Browse the repository at this point in the history
  • Loading branch information
onli committed Mar 28, 2018
1 parent 270c370 commit b0fb8d2
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions plugins/serendipity_event_spartacus/serendipity_event_spartacus.php
Expand Up @@ -27,7 +27,7 @@ function introspect(&$propbag)
$propbag->add('description', PLUGIN_EVENT_SPARTACUS_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Garvin Hicking');
$propbag->add('version', '2.37.3');
$propbag->add('version', '2.37.4');
$propbag->add('requirements', array(
'serendipity' => '1.6',
));
Expand Down Expand Up @@ -81,45 +81,32 @@ function &getMirrors($type = 'xml', $loc = false)
static $mirror = array(
'xml' => array(
'github.com',
'Netmirror.org',
's9y.org'
// 'openmirror.org'
's9y.org',
),

'files' => array(
'github.com',
'Netmirror.org',
'SourceForge.net',
's9y.org'
// 'BerliOS.de (inactive)',
// 'openmirror.org'
)
);

static $http = array(
'xml' => array(
'https://raw.github.com/s9y/additional_plugins/master/',
'http://netmirror.org/mirror/serendipity/',
'http://s9y.org/mirror/'
// 'http://openmirror.org/pub/s9y/',
'http://s9y.org/mirror/',
),

'files' => array(
'https://raw.github.com/s9y/',
'http://netmirror.org/mirror/serendipity/',
'http://php-blog.cvs.sourceforge.net/viewvc/php-blog/',
'http://s9y.org/mirror/'
// 'http://svn.berlios.de/viewcvs/serendipity/',
// 'http://openmirror.org/pub/s9y/',
'http://s9y.org/mirror/',
),

'files_health' => array(
'https://raw.github.com/' => 'https://raw.github.com/',
'http://netmirror.org/' => 'http://netmirror.org/mirror/serendipity/last.txt',
'http://php-blog.cvs.sourceforge.net/' => 'http://php-blog.cvs.sourceforge.net/viewvc/php-blog/serendipity/docs/LICENSE',
'http://s9y.org/' => 'http://s9y.org/'
// 'http://svn.berlios.de/' => 'http://svn.berlios.de/viewcvs/serendipity/',
// 'http://openmirror.org/' => 'http://openmirror.org/pub/s9y/last.txt',
'http://s9y.org/' => 'http://s9y.org/',
'https://raw.github.com/' => 'https://raw.github.com/',
)
);

Expand Down Expand Up @@ -611,6 +598,9 @@ function &fetchOnline($type, $no_cache = false)

} else {
$mirror = $mirrors[$this->get_config('mirror_xml', 0)];
if ($mirror == null) {
$mirror = $mirrors[0];
}
$url = $mirror . '/package_' . $url_type . $lang . '.xml';
$cacheTimeout = 60*60*12; // XML file is cached for half a day
$target = $serendipity['serendipityPath'] . PATH_SMARTY_COMPILE . '/package_' . $url_type . $lang . '.xml';
Expand Down Expand Up @@ -1012,7 +1002,9 @@ function download(&$tree, $plugin_to_install, $sub = 'plugins')

$mirrors = $this->getMirrors('files', true);
$mirror = $mirrors[$this->get_config('mirror_files', 0)];

if ($mirror == null) {
$mirror = $mirrors[0];
}
$custom = $this->get_config('custommirror');
if (strlen($custom) > 2) {
$servers = explode('|', $custom);
Expand Down Expand Up @@ -1310,4 +1302,4 @@ function event_hook($event, &$bag, &$eventData, $addData = null)
}

/* vim: set sts=4 ts=4 expandtab : */
?>
?>

0 comments on commit b0fb8d2

Please sign in to comment.