[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Configuration for "min", the default application built with the Minify 4 * library 5 * 6 * @package Minify 7 */ 8 9 10 defined('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 = $CFG->debugdeveloper; 18 $min_cachePath = $CFG->tempdir; 19 $min_documentRoot = $CFG->dirroot.'/lib/minify'; 20 $min_cacheFileLocking = empty($CFG->preventfilelocking); 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 29 return; // end of moodle modification 30 31 32 /** 33 * Allow use of the Minify URI Builder app. Only set this to true while you need it. 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'; 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 * 49 * If you want to use a custom error logger, set this to your logger 50 * instance. Your object should have a method log(string $message). 51 */ 52 $min_errorLogger = false; 53 54 55 /** 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; 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 */ 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(); 83 84 85 /** 86 * Leave an empty string to use PHP's $_SERVER['DOCUMENT_ROOT']. 87 * 88 * On some servers, this value may be misconfigured or missing. If so, set this 89 * to your full document root path with no trailing slash. 90 * E.g. '/home/accountname/public_html' or 'c:\\xampp\\htdocs' 91 * 92 * If /min/ is directly inside your document root, just uncomment the 93 * second line. The third line might work on some Apache servers. 94 */ 95 $min_documentRoot = ''; 96 //$min_documentRoot = substr(__FILE__, 0, -15); 97 //$min_documentRoot = $_SERVER['SUBDOMAIN_DOCUMENT_ROOT']; 98 99 100 /** 101 * Cache file locking. Set to false if filesystem is NFS. On at least one 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 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 113 * affect CSS values (which is why this option is disabled by default). 114 */ 115 $min_serveOptions['bubbleCssImports'] = false; 116 117 118 /** 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 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 130 /** 131 * To use Google's Closure Compiler API to minify Javascript (falling back to JSMin 132 * on failure), uncomment the following line: 133 */ 134 //$min_serveOptions['minifiers']['application/x-javascript'] = array('Minify_JS_ClosureCompiler', 'minify'); 135 136 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. 142 * 143 * // = shortcut for DOCUMENT_ROOT 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 */ 151 $min_serveOptions['minApp']['groupsOnly'] = false; 152 153 154 /** 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. 160 */ 161 //$min_serveOptions['minApp']['noMinPattern'] = '@[-\\.]min\\.(?:js|css)$@i'; 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. 168 * 169 * Because paths need to be normalized for this to work, use "//" to substitute 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 181 * incorrect mtimes for the files. This may cause Minify to keep serving stale 182 * cache files when source file changes are made too frequently (e.g. more than 183 * once an hour). 184 * 185 * Immediately after modifying and uploading a file, use the touch command to 186 * update the mtime on the server. If the mtime jumps ahead by a number of hours, 187 * set this variable to that number. If the mtime moves back, this should not be 188 * needed. 189 * 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, 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 /** 199 * Path to Minify's lib folder. If you happen to move it, change 200 * this accordingly. 201 */ 202 $min_libPath = dirname(__FILE__) . '/lib'; 203 204 205 // try to disable output_compression (may not have an effect) 206 ini_set('zlib.output_compression', '0');
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |