Skip to content

Commit

Permalink
Install Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
pHAlkaline committed Aug 14, 2022
1 parent 4ee64a7 commit 570b70b
Show file tree
Hide file tree
Showing 104 changed files with 2,613 additions and 1,558 deletions.
12 changes: 6 additions & 6 deletions app/Config/bootstrap.php
Expand Up @@ -114,11 +114,11 @@
if (!file_exists(APP . 'Config' . DS . 'bootstrap_phapp.php')) {
copy(APP . 'Config' . DS . 'bootstrap_phapp.php.default', APP . 'Config' . DS . 'bootstrap_phapp.php');
}

/**
* app Plugin
*/
CakePlugin::load('Phkapa', array('bootstrap' => false, 'routes' => false));
CakePlugin::load('Access', array('bootstrap' => false, 'routes' => false));
if (!file_exists(APP . 'Config' . DS . 'database.php')) {
copy(APP . 'Config' . DS . 'database.php.default', APP . 'Config' . DS . 'database.php');
}
if (!file_exists(APP . 'Config' . DS . 'email.php')) {
copy(APP . 'Config' . DS . 'email.php.default', APP . 'Config' . DS . 'email.php');
}

require 'bootstrap_phapp.php';
45 changes: 35 additions & 10 deletions app/Config/bootstrap_phapp.php.default
@@ -1,4 +1,5 @@
<?php

/**
* pHKapa bootstrap file
*
Expand All @@ -14,28 +15,52 @@
/**
* app Plugins
*/
CakePlugin::load('Install', array('bootstrap' => false, 'routes' => false));
//CakePlugin::load('PrintReport', array('bootstrap' => true, 'routes' => false));
//CakePlugin::load('CsvView', array('bootstrap' => true, 'routes' => false));
//CakePlugin::load('Attachment',array('bootstrap'=>true));
//CakePlugin::load('Feedback',array('bootstrap'=>true));
CakePlugin::load('DebugKit');
CakePlugin::load('ClearCache');
CakePlugin::load('Migrations');
CakePlugin::load('Phkapa', array('bootstrap' => false, 'routes' => false));
CakePlugin::load('Access', array('bootstrap' => false, 'routes' => false));

try {
CakePlugin::load('PrintReport', array('bootstrap' => true, 'routes' => false));
CakePlugin::load('CsvView', array('bootstrap' => true, 'routes' => false));
CakePlugin::load('Attachment',array('bootstrap'=>true));
CakePlugin::load('Feedback',array('bootstrap'=>true));
Configure::write('Application.isFullPack',true);
} catch (\Exception $e) {
Configure::write('Application.isFullPack',false);
}

Configure::write('Attachment.attachment', array(
'path' => '{ROOT}files{DS}{model}{DS}{field}{DS}',
'pathMethod' => 'foreignKey',
'nameCallback' => 'fileRename',
'thumbnails' => false,
'thumbnailMethod' => 'php',
'thumbnailSizes' => array(
'xvga' => '1024x768',
'vga' => '640x480',
'thumb' => '80x80',
),
'maxSize' => '200000',
'extensions' => array('pdf', 'txt', 'png', 'gif', 'jpg')
));

/**
* Languages available
* Idiom Settings
*/
Configure::write('Config.language', 'eng');
Configure::write('Language.list',array(
'deu'=>'Deutsch',
Configure::write('Language.default', 'eng');
Configure::write('Language.list', array(
'deu'=>'Deutsch',
'eng'=>'English',
'fra'=>'French',
'por'=>'Português',
'pt_BR'=>'Portugues ( Brasil )',
'ron' =>'Român',
'spa'=>'Español'
));
));


/**
* Datetime Settings
*/
Expand Down

0 comments on commit 570b70b

Please sign in to comment.