|
17 | 17 | See the License for the specific language governing permissions and
|
18 | 18 | limitations under the License.
|
19 | 19 | =========================================================================*/
|
| 20 | + |
20 | 21 | /*
|
21 | 22 | * SmartOptimizer Configuration File
|
22 | 23 | */
|
| 24 | + |
23 | 25 | if(file_exists('../../configs/application.local.ini'))
|
24 | 26 | {
|
25 |
| - $config=parse_ini_file('../../configs/application.local.ini'); |
| 27 | + $config = parse_ini_file('../../configs/application.local.ini'); |
26 | 28 | }
|
27 | 29 | else
|
28 | 30 | {
|
29 |
| - $config=parse_ini_file('../../configs/application.ini'); |
| 31 | + $config = parse_ini_file('../../configs/application.ini'); |
30 | 32 | }
|
31 |
| - |
32 |
| -if(isset($config['smartoptimizer'])&&$config['smartoptimizer']==1) |
33 |
| -{ |
34 |
| -//use this to set gzip compression On or Off |
35 |
| -$settings['gzip'] = true; |
36 | 33 |
|
37 |
| -//use this to set Minifier On or Off |
38 |
| -$settings['minify'] = true; |
| 34 | +if(isset($config['smartoptimizer']) && $config['smartoptimizer'] == 1 && is_writable('../../../tmp/cache/smartoptimizer/')) |
| 35 | + { |
| 36 | + //use this to set gzip compression On or Off |
| 37 | + $settings['gzip'] = true; |
39 | 38 |
|
40 |
| -//use this to set file concatenation On or Off |
41 |
| -$settings['concatenate'] = true; |
| 39 | + //use this to set Minifier On or Off |
| 40 | + $settings['minify'] = true; |
42 | 41 |
|
43 |
| -//specifies whether to emebed files included in css files using the data URI scheme or not |
44 |
| -$settings['embed'] = false; |
45 |
| -} |
| 42 | + //use this to set file concatenation On or Off |
| 43 | + $settings['concatenate'] = true; |
| 44 | + |
| 45 | + //specifies whether to emebed files included in css files using the data URI scheme or not |
| 46 | + $settings['embed'] = false; |
| 47 | + } |
46 | 48 | else
|
47 |
| -{ |
48 |
| -//use this to set gzip compression On or Off |
49 |
| -$settings['gzip'] = false; |
| 49 | + { |
| 50 | + //use this to set gzip compression On or Off |
| 51 | + $settings['gzip'] = false; |
50 | 52 |
|
51 |
| -//use this to set Minifier On or Off |
52 |
| -$settings['minify'] = false; |
| 53 | + //use this to set Minifier On or Off |
| 54 | + $settings['minify'] = false; |
53 | 55 |
|
54 |
| -//use this to set file concatenation On or Off |
55 |
| -$settings['concatenate'] = false; |
| 56 | + //use this to set file concatenation On or Off |
| 57 | + $settings['concatenate'] = false; |
56 | 58 |
|
57 |
| -//specifies whether to emebed files included in css files using the data URI scheme or not |
58 |
| -$settings['embed'] = false; |
59 |
| -} |
| 59 | + //specifies whether to emebed files included in css files using the data URI scheme or not |
| 60 | + $settings['embed'] = false; |
| 61 | + } |
60 | 62 |
|
61 | 63 | //base dir (a relative path to the base directory)
|
62 | 64 | $settings['baseDir'] = '../';
|
|
67 | 69 | //Show error messages if any error occurs (true or false)
|
68 | 70 | $settings['debug'] = false;
|
69 | 71 |
|
70 |
| - |
71 | 72 | //use this to set gzip compression level (an integer between 1 and 9)
|
72 | 73 | $settings['compressionLevel'] = 9;
|
73 | 74 |
|
74 | 75 | //these types of files will not be gzipped nor minified
|
75 | 76 | $settings['gzipExceptions'] = array('gif','jpeg','jpg','png','swf');
|
76 | 77 |
|
77 |
| - |
78 |
| - |
79 | 78 | //separator for files to be concatenated
|
80 | 79 | $settings['separator'] = ',';
|
81 | 80 |
|
|
102 | 101 |
|
103 | 102 | //Setting this to false will force the browser to use cached files without checking for changes.
|
104 | 103 | $settings['clientCacheCheck'] = true;
|
105 |
| - |
106 |
| -?> |
0 commit comments