Changeset 27156 for trunk


Ignore:
Timestamp:
Feb 4, 2014, 11:56:44 AM (11 years ago)
Author:
mistic100
Message:

*Fatal error*: Call to undefined method plugins::plugin_version_compare
replaced by safe_version_compare
caused by r26998

Location:
trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/updates.class.php

    r26461 r27156  
    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
  • trunk/admin/updates_ext.php

    r26461 r27156  
    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.