Commit 55eab846 authored by Lisa Seeto's avatar Lisa Seeto
Browse files

Bug 1895617: export html check for directory readability needs to match directory used



 - remove the '/' from directoriestocopy array

Change-Id: I4462a7f0b17c153af750569f72f8476e9fe1977f
Signed-off-by: default avatarLisa Seeto <lisaseeto@catalyst.net.nz>
parent 66fc2deb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -927,7 +927,7 @@ private function get_folder_modals(&$idarray, BlockInstance $bi) {
    protected function copy_static_files() {
        global $THEME, $SESSION;
        require_once('file.php');
        $staticdir = $this->get('exportdir') . '/' . $this->get('rootdir') . '/static/';
        $staticdir = $this->get('exportdir') . $this->get('rootdir') . '/static/';
        $directoriestocopy = array();
        $themestaticdirs = $THEME->get_path('', true);

@@ -937,7 +937,7 @@ private function get_folder_modals(&$idarray, BlockInstance $bi) {
            foreach ($statics as $static) {
                $themedir = $staticdir . 'theme/' . $theme . '/static/' . $static;
                if (is_readable($dir . $static)) {
                    $directoriestocopy[$dir . '/' . $static] = $themedir;
                    $directoriestocopy[$dir . $static] = $themedir;
                    if (!check_dir_exists($themedir)) {
                        throw new SystemException("Could not create theme directory for theme $theme");
                    }
@@ -949,7 +949,7 @@ private function get_folder_modals(&$idarray, BlockInstance $bi) {
            foreach ($statics as $static) {
                $themedir = $staticdir . 'theme/' . $theme . '/static/export/' . $static;
                if (is_readable($dir . $static)) {
                    $directoriestocopy[$dir . '/' . $static] = $themedir;
                    $directoriestocopy[$dir . $static] = $themedir;
                    if (!check_dir_exists($themedir)) {
                        throw new SystemException("Could not create theme directory for theme $theme");
                    }