widget module(not completed)

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8987 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2011-09-02 06:14:53 +00:00
parent 6285e0b316
commit 1f6fe648a8
11 changed files with 555 additions and 69 deletions

View file

@ -49,6 +49,8 @@
* Download a widget with type (generation and other means)
**/
function getDownloadedWidgetList() {
$oAutoinstallModel = &getModel('autoinstall');
// 've Downloaded the widget and the widget's list of installed Wanted
$searched_list = FileHandler::readDir('./widgets');
$searched_count = count($searched_list);
@ -61,6 +63,20 @@
// Wanted information on the Widget
$widget_info = $this->getWidgetInfo($widget);
// get easyinstall remove url
$packageSrl = $oAutoinstallModel->getPackageSrlByPath($widget_info->path);
$widget_info->remove_url = $oAutoinstallModel->getRemoveUrlByPackageSrl($packageSrl);
// get easyinstall need update
$package = $oAutoinstallModel->getInstalledPackages($packageSrl);
$widget_info->need_update = $package[$packageSrl]->need_update;
// get easyinstall update url
if ($widget_info->need_update == 'Y')
{
$widget_info->update_url = $oAutoinstallModel->getUpdateUrlByPackageSrl($packageSrl);
}
$list[] = $widget_info;
}
return $list;