From 5b7eecf33efb6dfc96e7c0610c6314640c55f066 Mon Sep 17 00:00:00 2001 From: Eric van der Vlist Date: Fri, 3 Jun 2011 20:02:15 +0200 Subject: [PATCH] Checking that we can create an archives sub directory. --- wordpress/plugins/owark/owark.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wordpress/plugins/owark/owark.php b/wordpress/plugins/owark/owark.php index d24d232..9a865cd 100644 --- a/wordpress/plugins/owark/owark.php +++ b/wordpress/plugins/owark/owark.php @@ -119,9 +119,18 @@ if (!class_exists("Owark")) { $this->notices = $this->notices . "

The Open Web Archive relies on the Broken Link Checker. Please install this plugin!

"; } + // Check if we have an archive subdirectory + + if (!is_dir(dirname(__FILE__) . '/archives')) { + @mkdir(dirname(__FILE__) . '/archives'); + if (!is_dir(dirname(__FILE__) . '/archives')) { + $this->notices = $this->notices . "

The Open Web Archive has not been able to create the folder /archives in its installation directory. Please create it by hand and make it writable for the web server.

"; + } + } + if ($this->notices != '') { add_action('admin_notices', array($this, 'admin_notices')); - } + } }