Changeset 565


Ignore:
Timestamp:
Sep 1, 2013, 11:37:27 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Třída Module nahrazena třídami Model, View, Controller.
  • Přidáno: Modul Wiki.
Location:
trunk
Files:
3 added
10 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Common/Base.php

    r564 r565  
    11<?php
    22
    3 class Module
     3class Base
    44{
    55  /** @var Database */
     
    77  /** @var System */
    88  var $System;
    9   var $Title = '';
    10   var $Dependencies = array();
    11   var $CurrentPath = '/';
    129
    1310  function __construct($System)
     
    1714  }
    1815}
     16
     17class Model extends Base
     18{
     19 
     20}
     21
     22class View extends Base
     23{
     24 
     25}
     26
     27class Controller extends Base
     28{
     29 
     30}
  • trunk/Common/Global.php

    r556 r565  
    1111include_once(dirname(__FILE__).'/Update.php');
    1212include_once(dirname(__FILE__).'/VarDumper.php');
    13 include_once(dirname(__FILE__).'/Module.php');
     13include_once(dirname(__FILE__).'/Base.php');
    1414include_once(dirname(__FILE__).'/AppModule.php');
    1515include_once(dirname(__FILE__).'/Database.php');
  • trunk/Common/Page.php

    r548 r565  
    33define('PAGE_NOT_FOUND', 'Stránka nenalezena');
    44
    5 class Page extends Module
     5class Page extends Model
    66{
    77  var $TimeStart;
  • trunk/Common/Version.php

    r564 r565  
    11<?php
    22
    3 $Revision = 564; // Subversion revision
    4 $DatabaseRevision = 551; // SQL structure revision
    5 $ReleaseTime = '2013-08-10';
     3$Revision = 565; // Subversion revision
     4$DatabaseRevision = 565; // SQL structure revision
     5$ReleaseTime = '2013-09-01';
  • trunk/Modules/File/File.php

    r561 r565  
    33include_once(dirname(__FILE__).'/MimeTypes.php');
    44
    5 class File extends Module
     5class File extends Model
    66{
    77  var $FilesDir;
  • trunk/Modules/Finance/Bill.php

    r558 r565  
    11<?php
    22
    3 class Bill extends Module
     3class Bill extends Model
    44{
    55  var $SpecificSymbol = 1; // počítačová sít
  • trunk/Modules/Finance/Finance.php

    r561 r565  
    1717define('INVOICE_OUT_DOC_LINE', 6);
    1818
    19 class Finance extends Module
     19class Finance extends Model
    2020{
    2121  var $kWh;
  • trunk/Modules/Meteostation/Meteostation.php

    r548 r565  
    1818}
    1919
    20 class MeteoStation extends Module
     20class MeteoStation extends Model
    2121{
    2222  var $Id;
  • trunk/Modules/TimeMeasure/TimeMeasure.php

    r548 r565  
    2727  {
    2828    parent::Start();
     29    $this->System->Pages['grafy'] = 'PageMeasure';
    2930    $this->System->FormManager->RegisterClass('Measure', array(
    3031      'Title' => 'Měření',
  • trunk/Modules/User/User.php

    r545 r565  
    4949// TODO: Make User class more general without dependencies to System, Mail, Log
    5050
    51 class User extends Module
     51class User extends Model
    5252{
    5353  var $Roles = array();
  • trunk/admin/Updates.php

    r552 r565  
    343343}
    344344
     345function UpdateTo565($Manager)
     346
     347  $Manager->Execute('CREATE TABLE IF NOT EXISTS `WikiPage` (
     348    `Id` int(11) NOT NULL AUTO_INCREMENT,
     349    `Name` varchar(255) NOT NULL,
     350    `NormalizedName` varchar(255) NOT NULL,
     351    `VisibleInMenu` int(11) NOT NULL,
     352    PRIMARY KEY (`Id`),
     353    UNIQUE KEY `Name` (`Name`),
     354    KEY `VisibleInMenu` (`VisibleInMenu`)
     355    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;');
     356  $Manager->Execute('CREATE TABLE IF NOT EXISTS `WikiPageContent` (
     357    `Id` int(11) NOT NULL AUTO_INCREMENT,
     358    `Page` int(11) NOT NULL,
     359    `Time` datetime NOT NULL,
     360    `Content` text NOT NULL,
     361    `User` int(11) NOT NULL,
     362    PRIMARY KEY (`Id`),
     363    KEY `User` (`User`),
     364        KEY `Page` (`Page`)
     365    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;');
     366    $Manager->Execute('ALTER TABLE `WikiPageContent`
     367    ADD CONSTRAINT `WikiPageContent_ibfk_2` FOREIGN KEY (`Page`) REFERENCES `WikiPage` (`Id`),
     368ADD CONSTRAINT `WikiPageContent_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`ID`);');
     369}
    345370
    346371$Updates = array(
     
    363388  549 => array('Revision' => 550, 'Function' => 'UpdateTo550'),
    364389  550 => array('Revision' => 551, 'Function' => 'UpdateTo551'),
     390  551 => array('Revision' => 565, 'Function' => 'UpdateTo565'),
    365391);
Note: See TracChangeset for help on using the changeset viewer.