NOBUG: fix file permissions
[moodle.git] / lib / minify / config.php
CommitLineData
045f492c
SH
1<?php
2/**
37d72977
PS
3 * Configuration for "min", the default application built with the Minify
4 * library
5 *
045f492c
SH
6 * @package Minify
7 */
8
37d72977
PS
9
10defined('MOODLE_INTERNAL') || die(); // start of moodle modification
11
12// NOTE: Copy all necessary settings here, do not modify the rest.
13// Minifier can not be accessed directly, only use PHP api.
14
15$min_enableBuilder = false;
16$min_errorLogger = false;
17$min_allowDebugFlag = debugging('', DEBUG_DEVELOPER);
18$min_cachePath = $CFG->tempdir;
19$min_documentRoot = $CFG->dirroot.'/lib/minify';
f0bf9ffe 20$min_cacheFileLocking = empty($CFG->preventfilelocking);
37d72977
PS
21$min_serveOptions['bubbleCssImports'] = false;
22$min_serveOptions['maxAge'] = 1800;
23$min_serveOptions['minApp']['groupsOnly'] = true;
24$min_symlinks = array();
25$min_uploaderHoursBehind = 0;
26$min_libPath = dirname(__FILE__) . '/lib';
27// do not change zlib compression or buffering here
28
37d72977
PS
29return; // end of moodle modification
30
045f492c
SH
31
32/**
37d72977 33 * Allow use of the Minify URI Builder app. Only set this to true while you need it.
f83037e8
PS
34 */
35$min_enableBuilder = false;
36
37/**
38 * If non-empty, the Builder will be protected with HTTP Digest auth.
39 * The username is "admin".
40 */
41$min_builderPassword = 'admin';
045f492c
SH
42
43
44/**
45 * Set to true to log messages to FirePHP (Firefox Firebug addon).
46 * Set to false for no error logging (Minify may be slightly faster).
47 * @link http://www.firephp.org/
48 *
1d29fc9e 49 * If you want to use a custom error logger, set this to your logger
045f492c 50 * instance. Your object should have a method log(string $message).
045f492c
SH
51 */
52$min_errorLogger = false;
53
54
55/**
37d72977
PS
56 * To allow debug mode output, you must set this option to true.
57 *
58 * Once true, you can send the cookie minDebug to request debug mode output. The
59 * cookie value should match the URIs you'd like to debug. E.g. to debug
60 * /min/f=file1.js send the cookie minDebug=file1.js
61 * You can manually enable debugging by appending "&debug" to a URI.
62 * E.g. /min/?f=script1.js,script2.js&debug
63 *
64 * In 'debug' mode, Minify combines files with no minification and adds comments
65 * to indicate line #s of the original files.
66 */
67$min_allowDebugFlag = false;
045f492c
SH
68
69
70/**
71 * For best performance, specify your temp directory here. Otherwise Minify
72 * will have to load extra code to guess. Some examples below:
73 */
37d72977
PS
74//$min_cachePath = 'c:\\WINDOWS\\Temp';
75//$min_cachePath = '/tmp';
76//$min_cachePath = preg_replace('/^\\d+;/', '', session_save_path());
77/**
78 * To use APC/Memcache/ZendPlatform for cache storage, require the class and
79 * set $min_cachePath to an instance. Example below:
80 */
81//require dirname(__FILE__) . '/lib/Minify/Cache/APC.php';
82//$min_cachePath = new Minify_Cache_APC();
045f492c
SH
83
84
85/**
86 * Leave an empty string to use PHP's $_SERVER['DOCUMENT_ROOT'].
87 *
1d29fc9e 88 * On some servers, this value may be misconfigured or missing. If so, set this
045f492c
SH
89 * to your full document root path with no trailing slash.
90 * E.g. '/home/accountname/public_html' or 'c:\\xampp\\htdocs'
91 *
1d29fc9e 92 * If /min/ is directly inside your document root, just uncomment the
045f492c
SH
93 * second line. The third line might work on some Apache servers.
94 */
37d72977
PS
95$min_documentRoot = '';
96//$min_documentRoot = substr(__FILE__, 0, -15);
045f492c
SH
97//$min_documentRoot = $_SERVER['SUBDOMAIN_DOCUMENT_ROOT'];
98
99
100/**
1d29fc9e 101 * Cache file locking. Set to false if filesystem is NFS. On at least one
045f492c
SH
102 * NFS system flock-ing attempts stalled PHP for 30 seconds!
103 */
104$min_cacheFileLocking = true;
105
106
107/**
108 * Combining multiple CSS files can place @import declarations after rules, which
109 * is invalid. Minify will attempt to detect when this happens and place a
1d29fc9e
PS
110 * warning comment at the top of the CSS output. To resolve this you can either
111 * move the @imports within your CSS files, or enable this option, which will
112 * move all @imports to the top of the output. Note that moving @imports could
045f492c
SH
113 * affect CSS values (which is why this option is disabled by default).
114 */
115$min_serveOptions['bubbleCssImports'] = false;
116
117
118/**
37d72977
PS
119 * Cache-Control: max-age value sent to browser (in seconds). After this period,
120 * the browser will send another conditional GET. Use a longer period for lower
121 * traffic but you may want to shorten this before making changes if it's crucial
045f492c
SH
122 * those changes are seen immediately.
123 *
124 * Note: Despite this setting, if you include a number at the end of the
125 * querystring, maxAge will be set to one year. E.g. /min/f=hello.css&123456
126 */
127$min_serveOptions['maxAge'] = 1800;
128
129
37d72977 130/**
f83037e8
PS
131 * To use Google's Closure Compiler API to minify Javascript (falling back to JSMin
132 * on failure), uncomment the following line:
37d72977 133 */
f83037e8 134//$min_serveOptions['minifiers']['application/x-javascript'] = array('Minify_JS_ClosureCompiler', 'minify');
37d72977
PS
135
136
045f492c
SH
137/**
138 * If you'd like to restrict the "f" option to files within/below
139 * particular directories below DOCUMENT_ROOT, set this here.
140 * You will still need to include the directory in the
141 * f or b GET parameters.
1d29fc9e
PS
142 *
143 * // = shortcut for DOCUMENT_ROOT
045f492c
SH
144 */
145//$min_serveOptions['minApp']['allowDirs'] = array('//js', '//css');
146
147/**
148 * Set to true to disable the "f" GET parameter for specifying files.
149 * Only the "g" parameter will be considered.
150 */
37d72977
PS
151$min_serveOptions['minApp']['groupsOnly'] = false;
152
045f492c
SH
153
154/**
37d72977
PS
155 * By default, Minify will not minify files with names containing .min or -min
156 * before the extension. E.g. myFile.min.js will not be processed by JSMin
157 *
158 * To minify all files, set this option to null. You could also specify your
159 * own pattern that is matched against the filename.
045f492c 160 */
37d72977 161//$min_serveOptions['minApp']['noMinPattern'] = '@[-\\.]min\\.(?:js|css)$@i';
045f492c
SH
162
163
164/**
165 * If you minify CSS files stored in symlink-ed directories, the URI rewriting
166 * algorithm can fail. To prevent this, provide an array of link paths to
167 * target paths, where the link paths are within the document root.
1d29fc9e
PS
168 *
169 * Because paths need to be normalized for this to work, use "//" to substitute
045f492c
SH
170 * the doc root in the link paths (the array keys). E.g.:
171 * <code>
172 * array('//symlink' => '/real/target/path') // unix
173 * array('//static' => 'D:\\staticStorage') // Windows
174 * </code>
175 */
176$min_symlinks = array();
177
178
179/**
180 * If you upload files from Windows to a non-Windows server, Windows may report
1d29fc9e 181 * incorrect mtimes for the files. This may cause Minify to keep serving stale
045f492c
SH
182 * cache files when source file changes are made too frequently (e.g. more than
183 * once an hour).
1d29fc9e
PS
184 *
185 * Immediately after modifying and uploading a file, use the touch command to
045f492c 186 * update the mtime on the server. If the mtime jumps ahead by a number of hours,
1d29fc9e 187 * set this variable to that number. If the mtime moves back, this should not be
045f492c
SH
188 * needed.
189 *
1d29fc9e
PS
190 * In the Windows SFTP client WinSCP, there's an option that may fix this
191 * issue without changing the variable below. Under login > environment,
045f492c
SH
192 * select the option "Adjust remote timestamp with DST".
193 * @link http://winscp.net/eng/docs/ui_login_environment#daylight_saving_time
194 */
195$min_uploaderHoursBehind = 0;
196
197
198/**
1d29fc9e 199 * Path to Minify's lib folder. If you happen to move it, change
045f492c
SH
200 * this accordingly.
201 */
37d72977 202$min_libPath = dirname(__FILE__) . '/lib';
045f492c
SH
203
204
205// try to disable output_compression (may not have an effect)
206ini_set('zlib.output_compression', '0');