Remove a bunch of unused stuff from config/core.php

This commit is contained in:
Karl Cordes 2019-07-04 17:15:06 +10:00
parent 8c627e26c0
commit 207d5db135
2 changed files with 16 additions and 122 deletions

View file

@ -62,86 +62,41 @@ $production_hosts = array('cmc.lan', '192.168.0.7', 'cmcbeta.lan', 'office.cmcte
if (in_array($host, $production_hosts)) {
$basedir = '/var/www/CMC-Sales/app';
Cache::config('default', array(
'engine' => 'Apc', //[required]
'duration'=> 3600, //[optional]
'probability'=> 100, //[optional]
'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
));
} else { //Development config
$basedir = '/var/www/cmc-sales/app/';
Cache::config('default', array(
'engine' => 'File', //[required]
'duration'=> 3600, //[optional]
'probability'=> 100, //[optional]
'path' => '/home/cmc/cmc-sales/app/tmp/', //[optional] use system tmp directory - remember to use absolute path
'prefix' => 'cake_', //[optional] prefix every cache file with this string
'lock' => false, //[optional] use file locking
'serialize' => true,
));
}
$basedir = '/var/www/cmc-sales/app/';
Cache::config('default', array(
'engine' => 'File', //[required]
'duration'=> 3600, //[optional]
'probability'=> 100, //[optional]
'path' => '/home/cmc/cmc-sales/app/tmp/', //[optional] use system tmp directory - remember to use absolute path
'prefix' => 'cake_', //[optional] prefix every cache file with this string
'lock' => false, //[optional] use file locking
'serialize' => true,
));
Configure::write('email_directory', '/var/www/emails');
Configure::write('pdf_directory', $basedir.'/webroot/pdf/');
Configure::write('attachments_directory', $basedir.'/webroot/attachments_files/');
// $output_dir = '/var/www/cakephp/app/webroot/pdf/';
/**
* Application wide charset encoding
*/
Configure::write('App.encoding', 'UTF-8');
/**
* To configure CakePHP *not* to use mod_rewrite and to
* use CakePHP pretty URLs, remove these .htaccess
* files:
*
* /.htaccess
* /app/.htaccess
* /app/webroot/.htaccess
*
* And uncomment the App.baseUrl below:
*/
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
/**
* Uncomment the define below to use CakePHP admin routes.
*
* The value of the define determines the name of the route
* and its associated controller actions:
*
* 'admin' -> admin_index() and /admin/controller/index
* 'superuser' -> superuser_index() and /superuser/controller/index
*/
//Configure::write('Routing.admin', 'admin');
/**
* Turn off all caching application-wide.
*
*/
Configure::write('Cache.disable', true);
/**
* Enable cache checking.
*
* If set to true, for view caching you must still use the controller
* var $cacheAction inside your controllers to define caching settings.
* You can either set it controller-wide by setting var $cacheAction = true,
* or in each action using $this->cacheAction = true.
*
*/
//Configure::write('Cache.check', true);
/**
* Defines the default error type when using the log() function. Used for
* differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
*/
define('LOG_ERROR', 1);
/**
* The preferred session handling method. Valid values:
*
@ -205,21 +160,8 @@ Configure::write('Security.level', 'medium');
* A random string used in security hashing methods.
*/
Configure::write('Security.salt', 'uiPxR3MzVXAID5zucbxLdxP4TX33buPoCWZr4JfroGoaE57UQC');
/**
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
* This requires a/var/cache directory to be writable by the web server for caching.
* and /vendors/csspp/csspp.php
*
* To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
*/
//Configure::write('Asset.filter.css', 'css.php');
/**
* Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
* output, and setting the config below to the name of the script.
*
* To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link().
*/
//Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
/**
* The classname and database used in CakePHP's
* access control lists.
@ -229,47 +171,4 @@ Configure::write('Acl.database', 'default');
/*
*
*
*
*
*/
//APC (http://pecl.php.net/package/APC)
/*Cache::config('default', array(
'engine' => 'Apc', //[required]
'duration'=> 3600, //[optional]
'probability'=> 100, //[optional]
'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
)); */
/*
*
*
// Xcache (http://xcache.lighttpd.net/)
*/
/* Cache::config('default', array(
'engine' => 'Xcache', //[required]
'duration'=> 3600, //[optional]
'probability'=> 100, //[optional]
'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
'user' => 'user', //user from xcache.admin.user settings
'password' => 'password', //plaintext password (xcache.admin.pass)
)); */
/*
*
* Memcache (http://www.danga.com/memcached/)
*
* Cache::config('default', array(
* 'engine' => 'Memcache', //[required]
* 'duration'=> 3600, //[optional]
* 'probability'=> 100, //[optional]
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
* 'servers' => array(
* '127.0.0.1:11211' // localhost, default port 11211
* ), //[optional]
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
* ));
*
*/

View file

@ -10,12 +10,7 @@
<?php
$debugLevel = Configure::read('debug');
if ($debugLevel > 0) {
echo $html->meta('favicon.ico', '/img/core.png', array('type' => 'icon'));
} else {
echo $html->meta('icon');
}
echo $html->meta('icon');
echo $html->css('quotenik');
echo $html->css('jquery-ui.custom.css');