Permalink
Browse files

Fixed incorrect polling repositories

  • Loading branch information...
1 parent cf8f3db commit 3b37d8c9f1c37b88abf3a4ab5f4a274691023d16 @ashcs ashcs committed Apr 15, 2012
Showing with 8 additions and 1 deletion.
  1. +1 −1 admin/extensions.php
  2. +5 −0 include/cache.php
  3. +2 −0 include/constants.php
View
@@ -860,7 +860,7 @@
if ($forum_config['o_check_for_versions'] == 1)
{
// Check for the new versions of the extensions istalled
- $repository_urls = array('http://punbb.informer.com/extensions/1.4');
+ $repository_urls = array(FORUM_PUN_EXTENSION_REPOSITORY_URL);
($hook = get_hook('aex_add_extensions_repository')) ? eval($hook) : null;
$repository_url_by_extension = array();
View
@@ -566,6 +566,11 @@ function generate_ext_versions_cache($inst_exts, $repository_urls, $repository_u
{
foreach ($inst_exts as $ext)
{
+
+ if ((0 === strpos($ext['id'], 'pun_') AND FORUM_PUN_EXTENSION_REPOSITORY_URL != $url) OR
+ ((FALSE === strpos($ext['id'], 'pun_') AND !isset($ext['repo_url'])) OR (isset($ext['repo_url']) AND $ext['repo_url'] != $url)))
+ continue;
+
$remote_file = get_remote_file($url.'/'.$ext['id'].'/lastversion', 2);
$version = empty($remote_file['content']) ? '' : forum_trim($remote_file['content']);
unset($remote_file);
View
@@ -21,3 +21,5 @@
// Define user email settings
define('FORUM_USER_PUBLIC_EMAIL', 0);
define('FORUM_USER_PRIVATE_EMAIL', 2);
+
+define('FORUM_PUN_EXTENSION_REPOSITORY_URL', 'http://punbb.informer.com/extensions/1.4');

0 comments on commit 3b37d8c

Please sign in to comment.