Changeset 403 for branches


Ignore:
Timestamp:
Jun 11, 2012, 10:08:38 PM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Instalace a odinstalace základních modulů v opačném pořadí.
Location:
branches/Modular
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/Modular/Common/Model.php

    r401 r403  
    4141    $this->AddPropertyOneToMany('ItemOwnerModule', 'SystemModule', true);
    4242    $this->AddPropertyDateTime('ItemTimeCreate', true);
    43     $this->AddPropertyOneToMany('ItemUserCreate', 'User', true);
     43    //$this->AddPropertyOneToMany('ItemUserCreate', 'User', true);
    4444    $this->AddPropertyDateTime('ItemTimeModify', true);
    45     $this->AddPropertyOneToMany('ItemUserModify', 'User', true);   
     45    //$this->AddPropertyOneToMany('ItemUserModify', 'User', true);   
    4646  }
    4747 
     
    169169  function Install()
    170170  {
     171    DebugLog('Installing model '.$this->Name.'...');
    171172    if($this->Installed) return;
    172173    $this->Installed = true;
     
    243244  function UnInstall()
    244245  {
     246    DebugLog('Uninstalling model '.$this->Name.'...');
    245247    foreach($this->Properties as $Property)
    246248    {
     
    251253        $this->Database->query('ALTER TABLE `'.$this->Name.'` DROP FOREIGN KEY `'.
    252254          $this->Name.'_ibfk_'.$Property['Name'].'`');
    253       echo('ss');
    254255      }
    255256    }
    256     //$this->Database->query('DROP TABLE IF EXISTS `'.$this->Name.'`');
     257    $this->Database->query('DROP TABLE IF EXISTS `'.$this->Name.'`');
    257258    $this->Installed = false;
    258259  }
  • branches/Modular/Common/Module.php

    r401 r403  
    4545  {
    4646    DebugLog('Uninstalling module '.$this->Name.'...');
    47     foreach($this->Models as $Index => $Model)
     47    $this->LoadModels();
     48    foreach(array_reverse($this->Models, true) as $Index => $Model)
    4849    {
    4950      $this->Models[$Index]->UnInstall();
     
    170171    $this->ReloadList();
    171172    $this->LoadModules(false);
    172     $this->Modules['System']->Install();
    173     //foreach($this->Modules as $Index => $Module)
    174     //{     
    175     //  $this->Modules[$Index]->Install();
    176     //}
     173    //$this->Modules['System']->Install();
     174    foreach($this->Modules as $Index => $Module)
     175    {     
     176      $this->Modules[$Index]->Install();
     177    }
    177178  }
    178179 
     
    180181  {
    181182    DebugLog('Uninstalling modular system core...');
    182     foreach($this->Modules as $Index => $Module)
     183    foreach(array_reverse($this->Modules, true) as $Index => $Module)
    183184      $this->Modules[$Index]->UnInstall();
    184185   
  • branches/Modular/FileDownload.php

    r237 r403  
    11<?php
    22
    3 include('global.php');
     3include('Common/Global.php');
    44if(array_key_exists('Id', $_GET))
    55{
  • branches/Modular/Modules/System/System.php

    r398 r403  
    4545    $this->Description = 'Base system module';
    4646    $this->Dependencies = array('User');
    47     $this->SupportedModels = array('SystemMenu', 'SystemView', 'SystemAction');
     47    $this->SupportedModels = array('SystemView', 'SystemAction', 'SystemMenu');
    4848  }
    4949 
Note: See TracChangeset for help on using the changeset viewer.