[mapguide-commits] r10159 - branches/4.0/MgDev/Server/RepositoryAdmin
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Sat Jul 26 23:48:00 PDT 2025
Author: jng
Date: 2025-07-26 23:47:59 -0700 (Sat, 26 Jul 2025)
New Revision: 10159
Removed:
branches/4.0/MgDev/Server/RepositoryAdmin/CheckVersion.php
branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdmin.php
branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminApp.inc
branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminConstants.inc
branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminDefs.inc
branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminResources.inc
branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminUtil.inc
branches/4.0/MgDev/Server/RepositoryAdmin/license.txt
branches/4.0/MgDev/Server/RepositoryAdmin/php.exe
branches/4.0/MgDev/Server/RepositoryAdmin/php.ini
branches/4.0/MgDev/Server/RepositoryAdmin/php5ts.dll
Log:
#2879: Remove old PHP binary and scripts
Deleted: branches/4.0/MgDev/Server/RepositoryAdmin/CheckVersion.php
===================================================================
--- branches/4.0/MgDev/Server/RepositoryAdmin/CheckVersion.php 2025-07-24 14:41:18 UTC (rev 10158)
+++ branches/4.0/MgDev/Server/RepositoryAdmin/CheckVersion.php 2025-07-27 06:47:59 UTC (rev 10159)
@@ -1,36 +0,0 @@
-<?php
-
- $version_required = "5.0.5";
-
- if (!phpVersion_Check($version_required))
- {
- print "Your current PHP version ("
- . phpversion() . ") is too low\n";
- print "Please upgrade your copy of PHP ";
- print "to at least version : "
- . $version_required;
- print "\n";
- exit (1);
- }
-
-function phpVersion_Check ($version)
-{
- if(!function_exists("version_compare"))
- {
- /* the function version_compare was
- only introduced in PHP version 4.1.0
- which is what we normally recommend as
- the lower limit for our scripts.
-
- So if the function does not exist then
- we must be using a copy of PHP < 4.1.0 */
- return FALSE;
- }
-
- if(version_compare($version, phpversion()) <= 0)
- return TRUE;
-
- return FALSE;
-}
-
-?>
Deleted: branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdmin.php
===================================================================
--- branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdmin.php 2025-07-24 14:41:18 UTC (rev 10158)
+++ branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdmin.php 2025-07-27 06:47:59 UTC (rev 10159)
@@ -1,19 +0,0 @@
-<?php
-
- include 'RepositoryAdminApp.inc';
-
- try
- {
- chdir(dirname(__FILE__));
-
- $repositoryAdminApp = new repositoryAdminApp($_SERVER['argv']);
- $repositoryAdminApp->Run();
-
- echo $IDS_PROGRESS_OPERATION_SUCCEEDED;
- }
- catch (Exception $e)
- {
- echo $e->getMessage()."\n".$IDS_PROGRESS_OPERATION_FAILED;
- }
-
-?>
Deleted: branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminApp.inc
===================================================================
--- branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminApp.inc 2025-07-24 14:41:18 UTC (rev 10158)
+++ branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminApp.inc 2025-07-27 06:47:59 UTC (rev 10159)
@@ -1,434 +0,0 @@
-<?php
-
- include 'RepositoryAdminDefs.inc';
-
- class RepositoryAdminApp
- {
- private $binDir = "";
- private $command = "";
- private $incrementalLevel = 0;
- private $inputPath = "";
- private $outputPath = "";
- private $outputRoot = "";
-
- public function RepositoryAdminApp($arguments)
- {
- include 'RepositoryAdminConstants.inc';
-
- $this->binDir = IsWindows() ? $MG_BIN_DIR_WINDOWS : $MG_BIN_DIR_LINUX;
-
- if (!$this->ParseArguments($arguments))
- {
- $this->DisplayUsage();
- exit();
- }
- }
-
- private function ParseArguments($arguments)
- {
- include 'RepositoryAdminConstants.inc';
-
- $size = count($arguments);
-
- if ($size < $MG_MIN_ARGS || $size > $MG_MAX_ARGS)
- {
- return FALSE;
- }
-
- for ($i = 2; $i < $size; $i += 2)
- {
- $argName = trim($arguments[$i-1]);
- $argValue = trim($arguments[$i]);
-
- switch ($argName)
- {
- case $MG_ARGN_COMMAND:
- $this->command = $argValue;
- break;
-
- case $MG_ARGN_INCREMENTAL_LEVEL:
- $this->incrementalLevel = $argValue;
- break;
-
- case $MG_ARGN_INPUT_PATH:
- $this->inputPath = $argValue;
- break;
-
- case $MG_ARGN_OUTPUT_PATH:
- $this->outputRoot = $argValue;
- break;
-
- default:
- return FALSE;
- }
- }
-
- return TRUE;
- }
-
- public function DisplayUsage()
- {
- include 'RepositoryAdminConstants.inc';
- include 'RepositoryAdminResources.inc';
-
- $usage = $IDS_PROGRAM_SYNTAX.$IDS_PROGRAM_OPTIONS.$IDS_EXAMPLE_BACK_UP_OFFLINE_REPOSITORIES.$IDS_EXAMPLE_BACK_UP_ONLINE_REPOSITORIES.$IDS_EXAMPLE_RESTORE_COLD_BACKUP_REPOSITORIES.$IDS_EXAMPLE_RESTORE_HOT_BACKUP_REPOSITORIES;
-
- if (IsWindows())
- {
- $usage = str_replace($MG_ARGV_PHP_LINUX, $MG_ARGV_PHP_WINDOWS, $usage);
- }
-
- echo $usage;
- }
-
- protected function GetCurrentTimestamp()
- {
- include 'RepositoryAdminConstants.inc';
-
- $currTimestamp = date($MG_FORMAT_TIMESTAMP);
-
- if (empty($currTimestamp))
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception($IDS_ERR_DATE_TIME);
- }
-
- return $currTimestamp;
- }
-
- protected function & GetDatabaseFiles($homeDir)
- {
- $program = $this->binDir.'db_archive -sv -h "'.$homeDir.'"';
-
- try
- {
- $output =& ExecuteProgram($program);
- }
- catch (Exception $e)
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception($IDS_ERR_UNABLE_TO_RETRIEVE_DATABASE_FILES);
- }
-
- return $output;
- }
-
- protected function & GetLogFiles($homeDir, $includeUnusedFilesOnly = FALSE)
- {
- if ($includeUnusedFilesOnly)
- {
- $program = $this->binDir.'db_archive -v -h "'.$homeDir.'"';
- }
- else // all log files
- {
- $program = $this->binDir.'db_archive -lv -h "'.$homeDir.'"';
- }
-
- try
- {
- $output =& ExecuteProgram($program);
- }
- catch (Exception $e)
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception($IDS_ERR_UNABLE_TO_RETRIEVE_LOG_FILES);
- }
-
- return $output;
- }
-
- private function TransferFile($fileName, $moveFile = FALSE)
- {
- include 'RepositoryAdminConstants.inc';
- include 'RepositoryAdminResources.inc';
-
- $srcFile = $this->inputPath.$fileName;
- $dstFile = $this->outputPath.$fileName;
-
- if ($MG_ARGV_BACKUP == $this->command)
- {
- echo sprintf($IDS_PROGRESS_ARCHIVING_FILE, $fileName);
- }
- else if ($MG_ARGV_RESTORE == $this->command)
- {
- echo sprintf($IDS_PROGRESS_RECOVERING_FILE, $fileName);
- }
- else
- {
- throw new Exception($IDS_ERR_INVALID_OPERATION);
- }
-
- if ($moveFile)
- {
- MoveFile($srcFile, $dstFile);
- }
- else
- {
- CopyFile($srcFile, $dstFile);
- }
- }
-
- private function TransferFiles($fileNames, $index = 0, $moveFile = FALSE)
- {
- $size = count($fileNames);
-
- if (($size - $index) <= 0)
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception($IDS_ERR_DATABASE_OR_LOG_FILE_NOT_FOUND);
- }
-
- for ($i = $index; $i < $size; ++$i)
- {
- $this->TransferFile($fileNames[$i], $moveFile);
- }
- }
-
- protected function PerformCheckpoint($homeDir)
- {
- // TODO: db_checkpoint does not work as expected.
-/*
- $program = $this->binDir.'db_checkpoint -1v -h "'.$homeDir.'"';
-
- try
- {
- $output =& ExecuteProgram($program);
- }
- catch (Exception $e)
- {
- // Checkpoint may harmlessly fail if no environment file exists.
-
-// include 'RepositoryAdminResources.inc';
-
-// throw new Exception($IDS_ERR_UNABLE_TO_PERFORM_CHECKPOINT);
- }
-*/
- }
-
- protected function TransferDatabaseFiles()
- {
- $databaseFiles = $this->GetDatabaseFiles($this->inputPath);
- $this->TransferFiles($databaseFiles);
- }
-
- protected function TransferLogFiles()
- {
- include 'RepositoryAdminConstants.inc';
- include 'RepositoryAdminResources.inc';
-
- if ($MG_ARGV_BACKUP == $this->command)
- {
- $unusedFiles = $this->GetLogFiles($this->inputPath, TRUE);
- $logFiles = $this->GetLogFiles($this->inputPath, FALSE);
- $numUnusedFiles = count($unusedFiles);
-
- if ($MG_MIN_INCREMENTAL_LEVEL != $this->incrementalLevel
- && $numUnusedFiles > 0)
- {
- $this->TransferFiles($unusedFiles, 0, TRUE);
- }
- }
- else if ($MG_ARGV_RESTORE == $this->command)
- {
- $logFiles = $this->GetLogFiles($this->inputPath, FALSE);
- $numUnusedFiles = 0;
- }
- else
- {
- throw new Exception($IDS_ERR_INVALID_OPERATION);
- }
-
- $this->TransferFiles($logFiles, $numUnusedFiles, FALSE);
- }
-
- protected function CleanUpLogFiles($homeDir)
- {
- $program = $this->binDir.'db_archive -dv -h "'.$homeDir.'"';
-
- try
- {
- $output =& ExecuteProgram($program);
- }
- catch (Exception $e)
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception($IDS_ERR_UNABLE_TO_CLEAN_UP_LOG_FILES);
- }
- }
-
- protected function PerformRecovery($homeDir)
- {
- $program = $this->binDir.'db_recover -cv -h "'.$homeDir.'"';
-
- try
- {
- $output =& ExecuteProgram($program);
- }
- catch (Exception $e)
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception($IDS_ERR_UNABLE_TO_PERFORM_RECOVERY);
- }
- }
-
- protected function BackupOfflineRepositories()
- {
- include 'RepositoryAdminConstants.inc';
- include 'RepositoryAdminResources.inc';
-
- echo $IDS_PROGRESS_BACKING_UP_OFFLINE_REPOSITORY;
-
- $this->outputPath = $this->outputRoot.$MG_COLD_BACKUP_DIR_NAME;
- AppendSlashToEndOfPath($this->outputPath);
-
- if (is_dir($this->outputPath))
- {
- $modTimestamp = date($MG_FORMAT_TIMESTAMP, filemtime($this->outputPath));
- $lastBackupDir = $this->outputRoot.$MG_PREFIX_COLD_BACKUP.$modTimestamp;
- AppendSlashToEndOfPath($lastBackupDir);
- RenameDirectory($this->outputPath, $lastBackupDir);
- }
-
- CreateDirectory($this->outputPath);
-
- $this->PerformCheckpoint($this->inputPath);
- $this->TransferDatabaseFiles();
- $this->TransferLogFiles();
- }
-
- protected function BackupOnlineRepositories()
- {
- include 'RepositoryAdminConstants.inc';
- include 'RepositoryAdminResources.inc';
-
- echo $IDS_PROGRESS_BACKING_UP_ONLINE_REPOSITORY;
-
- $this->outputPath = $this->outputRoot.$MG_HOT_BACKUP_DIR_NAME;
- AppendSlashToEndOfPath($this->outputPath);
- $fullSnapShot = TRUE;
-
- if (is_dir($this->outputPath))
- {
- $databaseFiles = $this->GetDatabaseFiles($this->outputPath);
- $logFiles = $this->GetLogFiles($this->outputPath, FALSE);
- $numDatabaseFiles = count($databaseFiles);
- $numLogFiles = count($logFiles);
-
- if (($numDatabaseFiles == 0 && $numLogFiles != 0)
- || ($numDatabaseFiles != 0 && $numLogFiles == 0))
- {
- $badBackupDir = $this->outputRoot.$MG_PREFIX_BAD_BACKUP.$this->GetCurrentTimestamp();
- AppendSlashToEndOfPath($badBackupDir);
- RenameDirectory($this->outputPath, $badBackupDir);
- }
- else
- {
- $unusedFiles = $this->GetLogFiles($this->outputPath, TRUE);
- $numUnusedFiles = count($unusedFiles);
- $numActiveFiles = $numLogFiles - $numUnusedFiles;
-
- if ($numActiveFiles > $this->incrementalLevel)
- {
- $modTimestamp = date($MG_FORMAT_TIMESTAMP, filemtime($this->outputPath));
- $lastBackupDir = $this->outputRoot.$MG_PREFIX_HOT_BACKUP.$modTimestamp;
- AppendSlashToEndOfPath($lastBackupDir);
- RenameDirectory($this->outputPath, $lastBackupDir);
- }
- else
- {
- $fullSnapShot = FALSE;
- }
- }
- }
-
- if ($fullSnapShot)
- {
- CreateDirectory($this->outputPath);
- $this->TransferDatabaseFiles();
- }
-
- $this->TransferLogFiles();
- }
-
- protected function RestoreRepositories()
- {
- include 'RepositoryAdminConstants.inc';
- include 'RepositoryAdminResources.inc';
-
- echo $IDS_PROGRESS_RESTORING_BACKUP_REPOSITORY;
-
- $this->outputPath = $this->outputRoot;
-
- if (!IsDirectoryEmpty($this->outputPath, TRUE, FALSE))
- {
- $tempBackupDir = $this->outputRoot.$MG_PREFIX_TEMP_BACKUP.$this->GetCurrentTimestamp();
- AppendSlashToEndOfPath($tempBackupDir);
- CreateDirectory($tempBackupDir);
- MoveFiles($this->outputPath, $tempBackupDir);
- }
-
- $this->TransferDatabaseFiles();
- $this->TransferLogFiles();
- $this->PerformRecovery($this->outputPath);
- $this->CleanUpLogFiles($this->outputPath);
- }
-
- public function Run()
- {
- include 'RepositoryAdminConstants.inc';
- include 'RepositoryAdminResources.inc';
-
- CheckDirectory($this->inputPath);
- CheckDirectory($this->outputRoot);
-
- AppendSlashToEndOfPath($this->inputPath);
- AppendSlashToEndOfPath($this->outputRoot);
-
- try
- {
- switch ($this->command)
- {
- case $MG_ARGV_BACKUP:
- if ($MG_MIN_INCREMENTAL_LEVEL == $this->incrementalLevel)
- {
- $this->BackupOfflineRepositories();
- }
- else if ($this->incrementalLevel > $MG_MIN_INCREMENTAL_LEVEL
- && $this->incrementalLevel <= $MG_MAX_INCREMENTAL_LEVEL)
- {
- $this->BackupOnlineRepositories();
- }
- else
- {
- throw new Exception(sprintf($IDS_ERR_ARGUMENT_OUT_OF_RANGE, $this->incrementalLevel));
- }
-
- break;
-
- case $MG_ARGV_RESTORE:
- $this->RestoreRepositories();
- break;
-
- default:
- throw new Exception(sprintf($IDS_ERR_INVALID_ARGUMENT, $this->command));
- }
- }
- catch (Exception $e)
- {
- if ($this->outputPath != $this->outputRoot && is_dir($this->outputPath))
- {
- DeleteDirectory($this->outputPath);
- }
-
- throw $e;
- }
- }
- }
-
-?>
Deleted: branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminConstants.inc
===================================================================
--- branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminConstants.inc 2025-07-24 14:41:18 UTC (rev 10158)
+++ branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminConstants.inc 2025-07-27 06:47:59 UTC (rev 10159)
@@ -1,37 +0,0 @@
-<?php
-
- // Numbers of arguments:
-
- $MG_MIN_ARGS = 7;
- $MG_MAX_ARGS = 9;
-
- // Argument names:
-
- $MG_ARGN_COMMAND = "-c";
- $MG_ARGN_INCREMENTAL_LEVEL = "-l";
- $MG_ARGN_INPUT_PATH = "-i";
- $MG_ARGN_OUTPUT_PATH = "-o";
-
- // Argument values:
-
- $MG_ARGV_BACKUP = "Backup";
- $MG_ARGV_RESTORE = "Restore";
- $MG_ARGV_PHP_LINUX = "php -c $(pwd)";
- $MG_ARGV_PHP_WINDOWS = "php -n";
- $MG_MIN_INCREMENTAL_LEVEL = 0;
- $MG_MAX_INCREMENTAL_LEVEL = 10;
-
- // Other constants:
-
- $MG_BIN_DIR_LINUX = "../bin/";
- $MG_BIN_DIR_WINDOWS = "..\\bin\\";
-
- $MG_COLD_BACKUP_DIR_NAME = "LastColdBackup";
- $MG_HOT_BACKUP_DIR_NAME = "LastHotBackup";
- $MG_PREFIX_COLD_BACKUP = "COLD_BK_";
- $MG_PREFIX_HOT_BACKUP = "HOT_BK_";
- $MG_PREFIX_BAD_BACKUP = "BAD_BK_";
- $MG_PREFIX_TEMP_BACKUP = "TEMP_BK_";
- $MG_FORMAT_TIMESTAMP = "Y-m-d_H-i-s";
-
-?>
Deleted: branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminDefs.inc
===================================================================
--- branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminDefs.inc 2025-07-24 14:41:18 UTC (rev 10158)
+++ branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminDefs.inc 2025-07-27 06:47:59 UTC (rev 10159)
@@ -1,7 +0,0 @@
-<?php
-
- require_once 'RepositoryAdminConstants.inc';
- require_once 'RepositoryAdminResources.inc';
- require_once 'RepositoryAdminUtil.inc';
-
-?>
Deleted: branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminResources.inc
===================================================================
--- branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminResources.inc 2025-07-24 14:41:18 UTC (rev 10158)
+++ branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminResources.inc 2025-07-27 06:47:59 UTC (rev 10159)
@@ -1,49 +0,0 @@
-<?php
-
- // Program usage:
-
- $IDS_PROGRAM_SYNTAX = "Syntax:\n\n php -c $(pwd) RepositoryAdmin.php [-c {Backup|Restore}] [-l {0 - 10}] [-i \"Input Path\"] [-o \"Ouput Path\"]\n\n";
- $IDS_PROGRAM_OPTIONS = "Options:\n\n -c Name of the command.\n = Backup, to back up repositories.\n = Restore, to restore repositories (any existing file directly under the specified output directory will be moved to a time-stamped backup sub-directory).\n\n -l Incremental level (from 0 to 10), only applicable to the Backup command.\n = 0, offline (cold) backup - i.e. A full snapshot will always be taken.\n > 0, online (hot) backup - e.g. For an incremental level value of 2:\n a. If the number of active log files in the previous snapshot is less than or equal to 2, then an incremental snapshot will be taken.\n b. If the number of active log files in the previous snapshot is greater than 2, then a full snapshot will be taken.\n Note that active log files are files containing data that have NOT been saved to the database (by default, the size of a log file is about 10 MB).\n\n -i Absolu
te path to the source location from where the repository is backed up or restored.\n\n -o Absolute path to the destination location to where the repository is backed up or restored.\n For offline (cold) backups, repositories will be archived to the \"LastColdBackup\" sub-directory; previous backups are saved to a time-stamped sub-directory.\n For online (hot) backups, repositories will be archived to the \"LastHotBackup\" or a time-stamped sub-directory when taking an incremental or full snapshot respectively.\n\n";
-
- $IDS_EXAMPLE_BACK_UP_OFFLINE_REPOSITORIES = "Examples:\n\n 1. Backing up offline (cold) repositories:\n\n php -c $(pwd) RepositoryAdmin.php -c Backup -l 0 -i \"/MapGuide/Server/Repositories/Library\" -o \"/MapGuide/Server/BackupRepositories/Library\"\n\n";
- $IDS_EXAMPLE_BACK_UP_ONLINE_REPOSITORIES = " 2. Backing up online (hot) repositories:\n\n php -c $(pwd) RepositoryAdmin.php -c Backup -l 2 -i \"/MapGuide/Server/Repositories/Library\" -o \"/MapGuide/Server/BackupRepositories/Library\"\n\n";
- $IDS_EXAMPLE_RESTORE_COLD_BACKUP_REPOSITORIES = " 3. Restoring cold backup repositories:\n\n php -c $(pwd) RepositoryAdmin.php -c Restore -i \"/MapGuide/Server/BackupRepositories/Library/LastColdBackup\" -o \"/MapGuide/Server/Repositories/Library\"\n\n";
- $IDS_EXAMPLE_RESTORE_HOT_BACKUP_REPOSITORIES = " 4. Restoring hot backup repositories:\n\n php -c $(pwd) RepositoryAdmin.php -c Restore -i \"/MapGuide/Server/BackupRepositories/Library/LastHotBackup\" -o \"/MapGuide/Server/Repositories/Library\"\n\n";
-
- // Error messages:
-
- $IDS_ERR_UNCLASSIFIED = "An unclassified exception occurred.";
- $IDS_ERR_INVALID_OPERATION = "Invalid operation.";
- $IDS_ERR_DATE_TIME = "A date and/or time error occurred.";
- $IDS_ERR_INVALID_ARGUMENT = "Invalid argument: %s";
- $IDS_ERR_ARGUMENT_OUT_OF_RANGE = "Argument out of range: %d";
-
- $IDS_ERR_DIRECTORY_NOT_FOUND = "Directory not found: \"%s\"";
- $IDS_ERR_UNABLE_TO_CREATE_DIRECTORY = "Unable to create directory: \"%s\"";
- $IDS_ERR_UNABLE_TO_DELETE_DIRECTORY = "Unable to delete directory: \"%s\"";
- $IDS_ERR_UNABLE_TO_RENAME_DIRECTORY = "Unable to rename directory \"%s\" to \"%s\"";
-
- $IDS_ERR_FILE_NOT_FOUND = "File not found: \"%s\"";
- $IDS_ERR_UNABLE_TO_DELETE_FILE = "Unable to delete file: \"%s\"";
- $IDS_ERR_UNABLE_TO_COPY_FILE = "Unable to copy file \"%s\" to \"%s\"";
- $IDS_ERR_UNABLE_TO_MOVE_FILE = "Unable to move file \"%s\" to \"%s\"";
-
- $IDS_ERR_DATABASE_OR_LOG_FILE_NOT_FOUND = "Database or log file not found.";
- $IDS_ERR_UNABLE_TO_EXECUTE_PROGRAM = "Unable to execute program: %s";
- $IDS_ERR_UNABLE_TO_PERFORM_CHECKPOINT = "Unable to perform checkpoint.";
- $IDS_ERR_UNABLE_TO_RETRIEVE_DATABASE_FILES = "Unable to retrieve database files.";
- $IDS_ERR_UNABLE_TO_RETRIEVE_LOG_FILES = "Unable to retrieve log files.";
- $IDS_ERR_UNABLE_TO_CLEAN_UP_LOG_FILES = "Unable to clean up log files.";
- $IDS_ERR_UNABLE_TO_PERFORM_RECOVERY = "Unable to perform recovery.";
-
- // Progress messages:
-
- $IDS_PROGRESS_BACKING_UP_OFFLINE_REPOSITORY = "Backing up offline (cold) repository ...\n";
- $IDS_PROGRESS_BACKING_UP_ONLINE_REPOSITORY = "Backing up online (hot) repository ...\n";
- $IDS_PROGRESS_RESTORING_BACKUP_REPOSITORY = "Restoring backup repository ...\n";
- $IDS_PROGRESS_ARCHIVING_FILE = "\tArchiving file: \"%s\"\n";
- $IDS_PROGRESS_RECOVERING_FILE = "\tRecovering file: \"%s\"\n";
- $IDS_PROGRESS_OPERATION_SUCCEEDED = "Operation succeeded!\n";
- $IDS_PROGRESS_OPERATION_FAILED = "Operation failed!\n";
-
-?>
Deleted: branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminUtil.inc
===================================================================
--- branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminUtil.inc 2025-07-24 14:41:18 UTC (rev 10158)
+++ branches/4.0/MgDev/Server/RepositoryAdmin/RepositoryAdminUtil.inc 2025-07-27 06:47:59 UTC (rev 10159)
@@ -1,246 +0,0 @@
-<?php
-
- function & ExecuteProgram($program)
- {
- $result = "";
- $output = array();
- $status = 0;
-
- $result = exec($program, $output, $status);
-
- if (0 != $status)
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception(sprintf($IDS_ERR_UNABLE_TO_EXECUTE_PROGRAM, $program));
- }
-
- return $output;
- }
-
- function IsWindows()
- {
- $path = realpath(".");
-
- if (FALSE == strstr($path, '/'))
- {
- return TRUE;
- }
-
- return FALSE;
- }
-
- function PathEndsWithSlash($path)
- {
- $index = strlen($path) - 1;
-
- if ($index >= 0 && ('/' == $path[$index] || '\\' == $path[$index]))
- {
- return TRUE;
- }
-
- return FALSE;
- }
-
- function AppendSlashToEndOfPath(&$path)
- {
- if (!PathEndsWithSlash($path))
- {
- if (IsWindows() && FALSE == strstr($path, '/'))
- {
- $path = $path."\\\\";
- }
- else
- {
- $path = $path."/";
- }
- }
- }
-
- function RemoveSlashFromEndOfPath(&$path)
- {
- if (PathEndsWithSlash($path))
- {
- $path = substr($path, 0, strlen($path) - 1);
- }
- }
-
- function IsDirectoryEmpty($dir, $checkFiles = TRUE, $checkDirectories = TRUE)
- {
- AppendSlashToEndOfPath($dir);
-
- $files = scandir($dir);
- $size = count($files);
- $numSystemDirs = 2; // "." and ".."
-
- if ($checkFiles && $checkDirectories)
- {
- return (numSystemDirs == $size);
- }
-
- for ($i = $numSystemDirs; $i < $size; ++$i)
- {
- $pathname = $dir.$files[$i];
-
- if ($checkFiles && is_file($pathname))
- {
- return FALSE;
- }
-
- if ($checkDirectories && is_dir($pathname))
- {
- return FALSE;
- }
- }
-
- return TRUE;
- }
-
- function CreateDirectory($dir)
- {
- if (!mkdir($dir))
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception(sprintf($IDS_ERR_UNABLE_TO_CREATE_DIRECTORY, $dir));
- }
- }
-
- function DeleteDirectory($dir)
- {
- // Note that this function will not delete sub-directories.
-
- DeleteFiles($dir);
-
- if (!rmdir($dir))
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception(sprintf($IDS_ERR_UNABLE_TO_DELETE_DIRECTORY, $dir));
- }
- }
-
- function RenameDirectory($oldDir, $newDir)
- {
- if (!rename($oldDir, $newDir))
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception(sprintf($IDS_ERR_UNABLE_TO_RENAME_DIRECTORY, $oldDir, $newDir));
- }
- }
-
- function CheckDirectory($pathname)
- {
- if (!is_dir($pathname))
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception(sprintf($IDS_ERR_DIRECTORY_NOT_FOUND, $pathname));
- }
- }
-
- function CheckFile($pathname)
- {
- if (!is_file($pathname))
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception(sprintf($IDS_ERR_FILE_NOT_FOUND, $pathname));
- }
- }
-
- function DeleteFile($file)
- {
- if (!unlink($file))
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception(sprintf($IDS_ERR_UNABLE_TO_DELETE_FILE, $file));
- }
- }
-
- function DeleteFiles($dir)
- {
- AppendSlashToEndOfPath($dir);
-
- $files = scandir($dir);
- $size = count($files);
-
- for ($i = 0; $i < $size; ++$i)
- {
- $pathname = $dir.$files[$i];
-
- if (is_file($pathname))
- {
- DeleteFile($pathname);
- }
- }
- }
-
- function CopyFile($srcFile, $dstFile)
- {
- if (!copy($srcFile, $dstFile))
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception(sprintf($IDS_ERR_UNABLE_TO_COPY_FILE, $srcFile, $dstFile));
- }
- }
-
- function CopyFiles($srcDir, $dstDir)
- {
- AppendSlashToEndOfPath($srcDir);
- AppendSlashToEndOfPath($dstDir);
-
- $files = scandir($srcDir);
- $size = count($files);
-
- for ($i = 0; $i < $size; ++$i)
- {
- $srcPathname = $srcDir.$files[$i];
-
- if (is_file($srcPathname))
- {
- $dstPathname = $dstDir.$files[$i];
-
- CopyFile($srcPathname, $dstPathname);
- }
- }
- }
-
- function MoveFile($srcFile, $dstFile)
- {
- if (!rename($srcFile, $dstFile))
- {
- include 'RepositoryAdminResources.inc';
-
- throw new Exception(sprintf($IDS_ERR_UNABLE_TO_MOVE_FILE, $srcFile, $dstFile));
- }
- }
-
- function MoveFiles($srcDir, $dstDir)
- {
- AppendSlashToEndOfPath($srcDir);
- AppendSlashToEndOfPath($dstDir);
-
- CheckDirectory($srcDir);
- CheckDirectory($dstDir);
-
- $files = scandir($srcDir);
- $size = count($files);
-
- for ($i = 0; $i < $size; ++$i)
- {
- $srcPathname = $srcDir.$files[$i];
-
- if (is_file($srcPathname))
- {
- $dstPathname = $dstDir.$files[$i];
-
- MoveFile($srcPathname, $dstPathname);
- }
- }
- }
-
-?>
Deleted: branches/4.0/MgDev/Server/RepositoryAdmin/license.txt
===================================================================
--- branches/4.0/MgDev/Server/RepositoryAdmin/license.txt 2025-07-24 14:41:18 UTC (rev 10158)
+++ branches/4.0/MgDev/Server/RepositoryAdmin/license.txt 2025-07-27 06:47:59 UTC (rev 10159)
@@ -1,68 +0,0 @@
---------------------------------------------------------------------
- The PHP License, Version 3.0
-Copyright (c) 1999 - 2003 The PHP Group. All rights reserved.
---------------------------------------------------------------------
-
-Redistribution and use in source and binary forms, with or without
-modification, is permitted provided that the following conditions
-are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The name "PHP" must not be used to endorse or promote products
- derived from this software without prior written permission. For
- written permission, please contact group at php.net.
-
- 4. Products derived from this software may not be called "PHP", nor
- may "PHP" appear in their name, without prior written permission
- from group at php.net. You may indicate that your software works in
- conjunction with PHP by saying "Foo for PHP" instead of calling
- it "PHP Foo" or "phpfoo"
-
- 5. The PHP Group may publish revised and/or new versions of the
- license from time to time. Each version will be given a
- distinguishing version number.
- Once covered code has been published under a particular version
- of the license, you may always continue to use it under the terms
- of that version. You may also choose to use such covered code
- under the terms of any subsequent version of the license
- published by the PHP Group. No one other than the PHP Group has
- the right to modify the terms applicable to covered code created
- under this License.
-
- 6. Redistributions of any form whatsoever must retain the following
- acknowledgment:
- "This product includes PHP, freely available from
- <http://www.php.net/>".
-
-THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
-ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
-DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
---------------------------------------------------------------------
-
-This software consists of voluntary contributions made by many
-individuals on behalf of the PHP Group.
-
-The PHP Group can be contacted via Email at group at php.net.
-
-For more information on the PHP Group and the PHP project,
-please see <http://www.php.net>.
-
-This product includes the Zend Engine, freely available at
-<http://www.zend.com>.
Deleted: branches/4.0/MgDev/Server/RepositoryAdmin/php.exe
===================================================================
(Binary files differ)
Deleted: branches/4.0/MgDev/Server/RepositoryAdmin/php.ini
===================================================================
--- branches/4.0/MgDev/Server/RepositoryAdmin/php.ini 2025-07-24 14:41:18 UTC (rev 10158)
+++ branches/4.0/MgDev/Server/RepositoryAdmin/php.ini 2025-07-27 06:47:59 UTC (rev 10159)
@@ -1 +0,0 @@
-safe_mode = Off
Deleted: branches/4.0/MgDev/Server/RepositoryAdmin/php5ts.dll
===================================================================
(Binary files differ)
More information about the mapguide-commits
mailing list