/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copyright ©2006 by sTEFANs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Implements the execution of SVN commands.
* The commands should be executed before any webpage is opened in order
* to have the results ready within all pages.
* @copyright Copyright ©2006 by sTEFANs
* @license http://opensource.org/licenses/lgpl-license.php GNU General Public License
require_once('var.inc.php');
require_once('utils.inc.php');
/** SVN command library */
require_once('svn_lib.inc.php');
* Executed SVN commands according to $_SESSION[IDX_ACTION].
* Stores all execution results within $_SESSION[IDX_EXEC_RES]
* @param array $results A result array that should be appended by the
* result of the command execution. A new array is returned if this
* parameter is set to NULL.
* @return array Array containing results of command excution.
//PrintDebugArray($_SESSION, 'Svn Executor: SESSION');
$cmd =
str_replace('%repository%', $config->GetRepositoryRoot(), $cmd);
$cmd =
str_replace('%webspace%', $config->GetWebspaceRootDir(), $cmd);
$cmd =
str_replace('%rep%', $config->GetRepositoryRoot(), $cmd);
$cmd =
str_replace('%ws%', $config->GetWebspaceRootDir(), $cmd);
if ($rc !==
false &&
$rc ==
0){