|
@@ 56-59 (lines=4) @@
|
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
// ensure smarty "tpl_compile" folder exists |
| 56 |
|
if (false === is_dir(APPLICATION_CACHE_PATH . 'tpl_compile') and |
| 57 |
|
(false === @mkdir(APPLICATION_CACHE_PATH . 'tpl_compile', 0755, true))) { |
| 58 |
|
throw new Exception('Smarty Template Directories not existant.', 9); |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
// ensure smarty "cache" folder exists |
| 62 |
|
if (false === is_dir(APPLICATION_CACHE_PATH . 'tpl_cache') and |
|
@@ 62-65 (lines=4) @@
|
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
// ensure smarty "cache" folder exists |
| 62 |
|
if (false === is_dir(APPLICATION_CACHE_PATH . 'tpl_cache') and |
| 63 |
|
(false === @mkdir(APPLICATION_CACHE_PATH . 'tpl_cache', 0755, true))) { |
| 64 |
|
throw new Exception('Smarty Template Directories not existant.', 9); |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
// ensure smarty folders are writable |
| 68 |
|
if (false === is_writable(APPLICATION_CACHE_PATH . 'tpl_compile') or |
|
@@ 71-74 (lines=4) @@
|
| 68 |
|
if (false === is_writable(APPLICATION_CACHE_PATH . 'tpl_compile') or |
| 69 |
|
(false === is_writable(APPLICATION_CACHE_PATH . 'tpl_cache'))) { |
| 70 |
|
// if not, try to set writeable permission on the folders |
| 71 |
|
if ((false === chmod(APPLICATION_CACHE_PATH . 'tpl_compile', 0755)) and |
| 72 |
|
(false === chmod(APPLICATION_CACHE_PATH . 'tpl_cache', 0755))) { |
| 73 |
|
throw new Exception('Smarty Template Directories not writable.', 10); |
| 74 |
|
} |
| 75 |
|
} |
| 76 |
|
} |
| 77 |
|
} |