* finish task #1511.

This commit is contained in:
wangyidong
2013-07-12 08:06:42 +00:00
parent 1c18615310
commit e2d706e34e
5 changed files with 60 additions and 1 deletions
+32
View File
@@ -143,6 +143,22 @@ class extensionModel extends model
return false;
}
/**
* Check incompatible extension
*
* @param array $versions
* @access public
* @return array
*/
public function checkIncompatible($versions)
{
$apiURL = $this->apiRoot . 'apiCheckCompatible-' . helper::safe64Encode(json_encode($versions)) . '.json';
$data = $this->fetchAPI($apiURL);
if(isset($data->incompatibleExts)) return (array)$data->incompatibleExts;
return array();
}
/**
* Download an extension.
*
@@ -804,6 +820,13 @@ class extensionModel extends model
return $this->dao->update(TABLE_EXTENSION)->data($data)->where('code')->eq($extension)->exec();
}
/**
* Check depends extension.
*
* @param string $extension
* @access public
* @return array
*/
public function checkDepends($extension)
{
$result = array();
@@ -820,6 +843,15 @@ class extensionModel extends model
return $result;
}
/**
* Compare for limit data.
*
* @param string $version
* @param array $limit
* @param string $type
* @access public
* @return void
*/
public function compare4Limit($version, $limit, $type = 'between')
{
$result = false;