Changeset 2216:91f485a16187 for inc/admin
- Timestamp:
- 10/02/13 17:47:15 (12 years ago)
- Branch:
- dcRepo
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.moduleslist.php
r2215 r2216 16 16 public $core; 17 17 public $modules; 18 public $ repository;18 public $store; 19 19 20 20 public static $allow_multi_install = false; … … 47 47 $this->core = $modules->core; 48 48 $this->modules = $modules; 49 $this-> repository = new dcRepository($modules, $xml_url);49 $this->store = new dcStore($modules, $xml_url); 50 50 51 51 $this->setPathInfo($modules_root); … … 231 231 } 232 232 233 /** @todo Use new mesasge system **/ 233 234 public function displayMessage($action) 234 235 { … … 487 488 } break; 488 489 489 # Install (from repository)490 # Install (from store) 490 491 case 'install': if ($this->path_writable) { 491 492 $submits[] = … … 493 494 } break; 494 495 495 # Update (from repository)496 # Update (from store) 496 497 case 'update': if ($this->path_writable) { 497 498 $submits[] = … … 591 592 elseif (!empty($_POST['install'])) { 592 593 593 $updated = $this-> repository->get();594 $updated = $this->store->get(); 594 595 if (!isset($updated[$id])) { 595 596 throw new Exception(__('No such module.')); … … 604 605 $this->core->callBehavior($prefix.'BeforeAdd', $module); 605 606 606 $ret_code = $this-> repository->process($module['file'], $dest);607 $ret_code = $this->store->process($module['file'], $dest); 607 608 608 609 # --BEHAVIOR-- moduleAfterAdd … … 614 615 elseif (!empty($_POST['update'])) { 615 616 616 $updated = $ repository->get();617 $updated = $store->get(); 617 618 if (!isset($updated[$id])) { 618 619 throw new Exception(__('No such module.')); … … 639 640 $this->core->callBehavior($prefix.'BeforeUpdate', $module); 640 641 641 $this-> repository->process($module['file'], $dest);642 $this->store->process($module['file'], $dest); 642 643 643 644 # --BEHAVIOR-- moduleAfterUpdate … … 666 667 $url = urldecode($_POST['pkg_url']); 667 668 $dest = $this->getPath().'/'.basename($url); 668 $this-> repository->download($url, $dest);669 $this->store->download($url, $dest); 669 670 } 670 671 … … 672 673 $this->core->callBehavior($prefix.'BeforeAdd', null); 673 674 674 $ret_code = $this-> repository->install($dest);675 $ret_code = $this->store->install($dest); 675 676 676 677 # --BEHAVIOR-- moduleAfterAdd … … 861 862 $has_parent = !empty($module['parent']); 862 863 if ($has_parent) { 863 $is_parent_present = $this-> core->themes->moduleExists($parent);864 $is_parent_present = $this->modules->moduleExists($parent); 864 865 } 865 866
Note: See TracChangeset
for help on using the changeset viewer.