1 --- ./smartytemplate.php~ 2005-12-08 19:48:57.000000000 +0200
2 +++ ./smartytemplate.php 2005-12-08 19:51:56.000000000 +0200
5 // Smarty Drupal engine, by default, expects a smarty installation in ./libs
6 if (!class_exists('Smarty')) { // prevent redeclaration
7 - require_once realpath(ENGINE_PATH.'/libs/Smarty.class.php');
8 + require_once '/usr/share/php/Smarty/Smarty.class.php';
11 class SmartyTemplate extends Smarty {
13 * If unable to create it will stop execution and direct user to permissions setup
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);
24 + return '/var/cache/drupal/smarty';
28 --- ./common.php~ 2005-08-21 23:06:23.000000000 +0300
29 +++ ./common.php 2005-12-08 19:53:36.000000000 +0200
31 * by the web server process.
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);
40 $_problems .= $_readable ? ' OR writable' : 'writable';
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));
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
56 return call_user_func('_smarty_' . $hook, $vars, $file);
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);