From 3d28caf759d4e290f794ee3fb14e5911f6c4d260 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Mon, 8 Aug 2016 05:00:39 +0000 Subject: [PATCH] change error message depending on whether templates_c is present or not git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1855 a1433add-5e2c-0410-b055-b7f2511e0802 --- setup.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/setup.php b/setup.php index da1fb5dc..e48a4662 100644 --- a/setup.php +++ b/setup.php @@ -152,10 +152,17 @@ else if (!is_writeable($incpath.'/templates_c')) { - print "
  • Error: Smarty template compile directory templates_c is not writable.
    \n"; - print "Please make it writable.
    \n"; - print "If you are using SELinux or AppArmor, you might need to adjust their setup to allow write access.
    \n"; - $error =+ 1; + if(!is_dir($incpath . '/templates_c')) { + print "
  • Error: Smarty template compile directory templates_c not found.
    \n"; + echo "Please mkdir -p $incpath/templates_c and make it writeable by the web server\n"; + $error =+ 1; + } + else { + print "
  • Error: Smarty template compile directory templates_c is not writable.
    \n"; + print "Please make it writable.
    \n"; + print "If you are using SELinux or AppArmor, you might need to adjust their setup to allow write access.
    \n"; + $error =+ 1; + } } else { print "
  • Smarty template compile directory is writable - OK
    \n"; }