Changeset 858 for trunk/Application


Ignore:
Timestamp:
Jan 21, 2016, 9:54:58 AM (9 years ago)
Author:
chronos
Message:
  • Modified: Custom install script replaced by more sophisticated Setup class which also allows to configure system parameters and application modules.
Location:
trunk/Application
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/DefaultConfig.php

    r837 r858  
    11<?php
    22
    3 $IsDeveloper = in_array($_SERVER['REMOTE_ADDR'], array('127.0.0.1'));
    4 
    5 $DefaultConfig = array(
    6   'Database' => array(
    7     'Host' => 'localhost',
    8     'User' => 'root',
    9     'Password' => '',
    10     'Database' => 'wowpreklad',
    11     'DatabaseAoWoW' => 'wowpreklad_mangos',
    12     'Prefix' => '',
    13     'Charset' => 'utf8',
    14     'MangosPrefix' => '',
    15   ),
    16   'Style' => 'maron',
    17   'Web' => array(
    18     'Title' => 'Projekt překládání textů hry WoW',
    19     'Description' => '',
    20     'Keywords' => 'world of warcraft, wow, translation',
    21     'Charset' => 'utf-8',
    22     'Host' => 'localhost',
    23     'BaseURL' => '',
    24     'AdminEmail' => 'admin@localhost',
    25     'Authors' => 'autor',
    26     'ShowSQLQuery' => false,
    27     'ShowSQLError' => $IsDeveloper,
    28     'LogSQLQuery' => $IsDeveloper,
    29     'ShowPHPError' => $IsDeveloper,
    30     'ShowRuntimeInfo' => $IsDeveloper,
    31     'FormatOutput' => $IsDeveloper,
    32     'ItemsPerPage' => 40,
    33     'TempFolder' => 'tmp/',
    34     'SourceFolder' => 'source/',
    35     'GameVersion' => '3.3.5a',
    36     'VisiblePagingItems' => 20,
    37     'Timezone' => 'Europe/Prague',
    38     'WebCounter' => '',
    39     'Advertisement' => '',
    40     'Locale' => 'cs',
    41   ),
    42   'ForbiddedUserNames' => array('addon', 'admin', 'administrator'),
    43   'ExportTaskProcessPeriod' => 10,
    44   'MaxExportPerUser' => 10,
    45   'AoWoWExportId' => 1,
    46   'OriginalLanguage' => 1,
    47   'SystemPassword' => '',
    48 );
     3class DefaultConfig
     4{
     5  function Get()
     6  {
     7    $IsDeveloper = in_array($_SERVER['REMOTE_ADDR'], array('127.0.0.1'));
     8    return(array(
     9      array('Name' => 'SystemPassword', 'Type' => 'PasswordEncoded', 'Default' => '', 'Title' => 'System password'),
     10      array('Name' => 'Database/Host', 'Type' => 'String', 'Default' => 'localhost', 'Title' => 'Server'),
     11      array('Name' => 'Database/User', 'Type' => 'String', 'Default' => 'root', 'Title' => 'User'),
     12      array('Name' => 'Database/Password', 'Type' => 'Password', 'Default' => '', 'Title' => 'Password'),
     13      array('Name' => 'Database/Database', 'Type' => 'String', 'Default' => 'wowpreklad', 'Title' => 'Database'),
     14      array('Name' => 'Database/Prefix', 'Type' => 'String', 'Default' => '', 'Title' => 'Prefix'),
     15      array('Name' => 'Database/Charset', 'Type' => 'String', 'Default' => 'utf8', 'Title' => 'Charset'),
     16      array('Name' => 'Database/DatabaseAoWoW', 'Type' => 'String', 'Default' => 'wowpreklad_mangos', 'Title' => 'Database AoWoW'),
     17      array('Name' => 'Database/MangosPrefix', 'Type' => 'String', 'Default' => '', 'Title' => 'Mangos prefix'),
     18      array('Name' => 'Web/Style', 'Type' => 'String', 'Default' => 'maron', 'Title' => 'Style'),
     19      array('Name' => 'Web/Title', 'Type' => 'String', 'Default' => 'Project of translation of WoW game', 'Title' => 'Title'),
     20      array('Name' => 'Web/Description', 'Type' => 'String', 'Default' => '', 'Title' => 'Description'),
     21      array('Name' => 'Web/Keywords', 'Type' => 'String', 'Default' => 'world of warcraft, wow, translation', 'Title' => 'Keywords'),
     22      array('Name' => 'Web/Charset', 'Type' => 'String', 'Default' => 'utf-8', 'Title' => 'Charset'),
     23      array('Name' => 'Web/Host', 'Type' => 'String', 'Default' => 'localhost', 'Title' => 'Host domain name'),
     24      array('Name' => 'Web/BaseURL', 'Type' => 'String', 'Default' => '', 'Title' => 'Root URL'),
     25      array('Name' => 'Web/AdminEmail', 'Type' => 'String', 'Default' => 'admin@localhost', 'Title' => 'Admin e-mail'),
     26      array('Name' => 'Web/Authors', 'Type' => 'String', 'Default' => '', 'Title' => 'Authors'),
     27      array('Name' => 'Web/ShowSQLError', 'Type' => 'Boolean', 'Default' => '0', 'Title' => 'Show SQL errors'),
     28      array('Name' => 'Web/ShowSQLQuery', 'Type' => 'Boolean', 'Default' => '0', 'Title' => 'Show SQL queries'),
     29      array('Name' => 'Web/ShowPHPError', 'Type' => 'Boolean', 'Default' => '0', 'Title' => 'Show PHP errors'),
     30      array('Name' => 'Web/ShowRuntimeInfo', 'Type' => 'Boolean', 'Default' => '0', 'Title' => 'Show runtime information'),
     31      array('Name' => 'Web/LogSQLQuery', 'Type' => 'Boolean', 'Default' => '0', 'Title' => 'Log SQL queries'),
     32      array('Name' => 'Web/FormatOutput', 'Type' => 'Boolean', 'Default' => '0', 'Title' => 'Format produced HTML code'),
     33      array('Name' => 'Web/ItemsPerPage', 'Type' => 'Integer', 'Default' => '50', 'Title' => 'Items per page'),
     34      array('Name' => 'Web/TempFolder', 'Type' => 'String', 'Default' => 'tmp/', 'Title' => 'Temporary directory'),
     35      array('Name' => 'Web/SourceFolder', 'Type' => 'String', 'Default' => 'source/', 'Title' => 'Source directory'),
     36      array('Name' => 'Web/GameVersion', 'Type' => 'String', 'Default' => '3.3.5a', 'Title' => 'Game version'),
     37      array('Name' => 'Web/VisiblePagingItems', 'Type' => 'Integer', 'Default' => 20, 'Title' => 'Visible paging items'),
     38      array('Name' => 'Web/Timezone', 'Type' => 'String', 'Default' => 'Europe/Prague', 'Title' => 'Time zone'),
     39      array('Name' => 'Web/WebCounter', 'Type' => 'String', 'Default' => '', 'Title' => 'Web counter HTML code'),
     40      array('Name' => 'Web/Advertisement', 'Type' => 'String', 'Default' => '', 'Title' => 'Advertisement HTML code'),
     41      array('Name' => 'Web/Locale', 'Type' => 'String', 'Default' => 'cs', 'Title' => 'Default locale code'),
     42      array('Name' => 'ForbiddedUserNames', 'Type' => 'Array', 'Default' => array('addon', 'admin', 'administrator'), 'Title' => 'Forbidded user names'),
     43      array('Name' => 'ExportTaskProcessPeriod', 'Type' => 'Integer', 'Default' => 10, 'Title' => 'Export task process period'),
     44      array('Name' => 'MaxExportPerUser', 'Type' => 'Integer', 'Default' => 10, 'Title' => 'Max export count per user'),
     45      array('Name' => 'AoWoWExportId', 'Type' => 'Integer', 'Default' => 1, 'Title' => 'ID of AoWoW export'),
     46      array('Name' => 'OriginalLanguage', 'Type' => 'Integer', 'Default' => 1, 'Title' => 'Original language'),
     47      array('Name' => 'EnableGoogleTranslate', 'Type' => 'Boolean', 'Default' => false, 'Title' => 'Enable Google translate'),
     48    ));
     49  }
     50}
  • trunk/Application/Version.php

    r857 r858  
    77
    88$Version = '1.0-alfa';
    9 $Revision = 857; // Subversion revision
     9$Revision = 858; // Subversion revision
    1010$DatabaseRevision = 857; // Database structure revision
    11 $ReleaseTime = '2016-01-19';
     11$ReleaseTime = '2016-01-20';
Note: See TracChangeset for help on using the changeset viewer.