]>
Commit | Line | Data |
---|---|---|
de5680b3 ER |
1 | --- ./smartytemplate.php~ 2005-12-08 19:48:57.000000000 +0200 |
2 | +++ ./smartytemplate.php 2005-12-08 19:51:56.000000000 +0200 | |
3 | @@ -20,7 +20,7 @@ | |
7d2afdb0 ER |
4 | |
5 | // Smarty Drupal engine, by default, expects a smarty installation in ./libs | |
6 | if (!class_exists('Smarty')) { // prevent redeclaration | |
de5680b3 | 7 | - require_once realpath(ENGINE_PATH.'/libs/Smarty.class.php'); |
62f88e96 | 8 | + require_once '/usr/share/php/Smarty/Smarty.class.php'; |
7d2afdb0 ER |
9 | } |
10 | ||
11 | class SmartyTemplate extends Smarty { | |
de5680b3 ER |
12 | @@ -116,14 +116,7 @@ |
13 | * If unable to create it will stop execution and direct user to permissions setup | |
14 | */ | |
15 | function _get_compile_dir($path) { | |
16 | - $dir = ENGINE_PATH.'/templates_c/'.substr(strrchr($path, '/'), 1); | |
17 | - if (!file_exists($dir)) { | |
18 | - if (!@mkdir($dir)) { | |
19 | - _test_permissions(true); | |
20 | - exit; | |
21 | - } | |
22 | - } | |
23 | - return $dir; | |
ea30441e | 24 | + return '/var/cache/drupal/smarty/' . substr(strrchr($path, '/'), 1); |
de5680b3 ER |
25 | } |
26 | ||
27 | } | |
28 | --- ./common.php~ 2005-08-21 23:06:23.000000000 +0300 | |
29 | +++ ./common.php 2005-12-08 19:53:36.000000000 +0200 | |
30 | @@ -20,7 +20,7 @@ | |
31 | * by the web server process. | |
32 | */ | |
33 | function _test_permissions($plainhtml = false) { | |
34 | - $path = ENGINE_PATH.'/templates_c'; | |
35 | + $path = '/var/cache/drupal/smarty'; | |
36 | $_readable = !is_readable($path); | |
37 | $_writable = !is_writable($path); | |
38 | $_retval = $_readable | ($_writable * 2); | |
39 | @@ -30,7 +30,7 @@ | |
40 | $_problems .= $_readable ? ' OR writable' : 'writable'; | |
41 | } | |
7d2afdb0 | 42 | |
de5680b3 ER |
43 | - $_message = t("Smarty Permissions Error: templates_c directory is not <strong> %problems </strong> by the web server process.<br /> |
44 | + $_message = t("Smarty Permissions Error: templates cache directory is not <strong> %problems </strong> by the web server process.<br /> | |
45 | You <strong>must</strong> resolve this issue before you begin to use a Smarty-based theme. | |
46 | See <a href=\"http://drupal.org/project/smarty\">drupal.org/project/smarty</a> for instructions.", array('%problems' => $_problems)); | |
47 | ||
48 | =================================================================== | |
49 | RCS file: /cvs/drupal/contributions/theme-engines/smarty/smarty.engine,v | |
50 | retrieving revision 1.7 | |
51 | retrieving revision 1.7.2.1 | |
52 | diff -u -r1.7 -r1.7.2.1 | |
53 | --- ./smarty.engine 2005/08/21 20:06:23 1.7 | |
54 | +++ ./smarty.engine 2005/12/02 06:22:32 1.7.2.1 | |
55 | @@ -67,7 +67,7 @@ | |
56 | return call_user_func('_smarty_' . $hook, $vars, $file); | |
57 | } | |
58 | elseif (function_exists('_smarty_default')) { | |
59 | - return call_user_func('_smarty_default', $hook, $vars, $file); | |
60 | + return call_user_func('_smarty_default', $vars, $hook, $file); | |
7d2afdb0 | 61 | } |
de5680b3 ER |
62 | |
63 | } |