svn: /web/doc-editor/trunk/php/ File.php

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Sat, 12 Dec 2009 08:24:32 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=292026

Log:
Use native php function to create a new folder

Changed paths:
    U   web/doc-editor/trunk/php/File.php

Modified: web/doc-editor/trunk/php/File.php
===================================================================
--- web/doc-editor/trunk/php/File.php	2009-12-12 08:22:46 UTC (rev 292025)
+++ web/doc-editor/trunk/php/File.php	2009-12-12 08:24:32 UTC (rev 292026)
@@ -86,15 +86,8 @@
     private function createFolder($path) {

        // We create this folder localy
-       $cmd = 'cd '.DOC_EDITOR_VCS_PATH.'; mkdir '.$this->lang.$path;
+       mkdir(DOC_EDITOR_VCS_PATH.$this->lang.$path);

-       $trial_threshold = 3;
-       while ($trial_threshold-- > 0) {
-           $output = array();
-           exec($cmd, $output);
-           if (strlen(trim(implode('', $output))) != 0) break;
-       }
-
        // We register this new folder to be committed
        $obj = (object) array('lang' => $this->lang, 'path' => $path, 'name' => '-');
        RepositoryManager::getInstance()->addPendingCommit($obj, '-', '-', '-', '-', 'new');
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.