From b949c187066f7f9384ee9c9fcd35f1f700857643 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 18 May 2013 02:02:00 -0700 Subject: [PATCH] Check e_MEDIA and e_SYSTEM are writable. --- e107_admin/admin.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/e107_admin/admin.php b/e107_admin/admin.php index 978c2068c..2badd69cc 100644 --- a/e107_admin/admin.php +++ b/e107_admin/admin.php @@ -81,13 +81,32 @@ class admin_start function __construct() { - + $this->checkWritable(); $this->checkHtmlarea(); $this->checkIncompatiblePlugins(); $this->checkFileTypes(); $this->checkSuspiciousFiles(); + } + + function checkWritable() + { + $mes = e107::getMessage(); + + if(deftrue('e_MEDIA') && !is_writable(e_MEDIA)) + { + $mes->addWarning("The folder ".e_MEDIA." is not writable. Please correct before proceeding."); + } + + if(deftrue('e_SYSTEM') && !is_writable(e_SYSTEM)) + { + $mes->addWarning("The folder ".e_SYSTEM." is not writable. Please correct before proceeding."); + } + + } + + function checkHtmlarea()