Changeset 27157


Ignore:
Timestamp:
Feb 4, 2014, 11:59:43 AM (6 years ago)
Author:
mistic100
Message:

Merged revision(s) 27156 from trunk:
*Fatal error*: Call to undefined method plugins::plugin_version_compare
replaced by safe_version_compare
caused by r26999

Location:
branches/2.6/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/admin/include/updates.class.php

    r26461 r27157  
    179179          $ext_info = $server_ext[$fs_ext['extension']];
    180180
    181           if (!$this->version_compare($fs_ext['version'], $ext_info['revision_name'], $type))
     181          if (!safe_version_compare($fs_ext['version'], $ext_info['revision_name'], '>='))
    182182          {
    183183            if (in_array($ext_id, $conf['updates_ignored'][$type]))
     
    208208        {
    209209          if (isset($_SESSION['extensions_need_update'][$type][$ext_id])
    210             and $this->version_compare($fs_ext['version'], $_SESSION['extensions_need_update'][$type][$ext_id], $type))
     210            and safe_version_compare($fs_ext['version'], $_SESSION['extensions_need_update'][$type][$ext_id], '>='))
    211211          {
    212212            // Extension have been upgraded
     
    255255      }
    256256    }
    257   }
    258 
    259   function version_compare($a, $b, $type)
    260   {
    261     $version_compare = rtrim($type, 's').'_version_compare';
    262 
    263     return $this->$type->$version_compare($a, $b);
    264257  }
    265258
  • branches/2.6/admin/updates_ext.php

    r26461 r27157  
    6060    $ext_info = $server_ext[$fs_ext['extension']];
    6161
    62     if (!$autoupdate->version_compare($fs_ext['version'], $ext_info['revision_name'], $type))
     62    if (!safe_version_compare($fs_ext['version'], $ext_info['revision_name'], '>='))
    6363    {
    6464      $template->append('update_'.$type, array(
Note: See TracChangeset for help on using the changeset viewer.