Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Create missing directories too.

  • Loading branch information...
commit 33c35e6c30e0430dbf63d979f3d9f9ae524d589d 1 parent 1ca9c0a
authored March 10, 2005

Showing 1 changed file with 11 additions and 0 deletions. Show diff stats Hide diff stats

  1. 11  admin/langdoc.php
11  admin/langdoc.php
@@ -112,6 +112,17 @@
112 112
     if (!empty($currentfile)) {
113 113
 
114 114
         if (!file_exists("$langdir/$currentfile")) {
  115
+            //check if directory exist
  116
+            $pathparts = explode('/',$currentfile);
  117
+            $checkpath = $langdir;
  118
+            for ($a=0; $a < count($pathparts)-1 ; $a++) {
  119
+                $checkpath .= "/".$pathparts[$a];
  120
+                if(!file_exists($checkpath)){
  121
+                     if(!mkdir($checkpath)){
  122
+                         echo ("Cannot create directory: $checkpath");
  123
+                     }    
  124
+                }    
  125
+            }
115 126
             //
116 127
             // file doesn't exist - let's check webserver's permission to create it
117 128
             //

0 notes on commit 33c35e6

Please sign in to comment.
Something went wrong with that request. Please try again.