From 2c4e2afb8be6483558b6e3cf6bff1d3b600ad94f Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 11 Jul 2011 16:14:34 -0400 Subject: [PATCH] -removed airtime-clean-storage.php + airtime-import.php -default created stor dir now has www-data:www-data permission -created airtime-install.ini file for specifying install defaults -removed all references to storDir in /etc/airtime/airtime.conf, and get value from database instead. --- airtime_mvc/application/configs/conf.php | 4 +- .../application/controllers/ApiController.php | 4 +- airtime_mvc/application/models/StoredFile.php | 4 +- install/include/AirtimeIni.php | 2 + install/include/AirtimeInstall.php | 16 +- install/include/airtime-db-install.php | 7 +- install/include/airtime-install.ini | 1 + .../airtime-1.8.1/airtime-upgrade.php | 2 - .../airtime-1.8.2/airtime-upgrade.php | 2 - .../upgrades/airtime-1.8/airtime-upgrade.php | 2 +- .../airtimefilemonitor/airtimeprocessevent.py | 2 +- utils/airtime-clean-storage | 34 -- utils/airtime-clean-storage.php | 132 ------ utils/airtime-import | 44 -- utils/airtime-import.php | 393 ------------------ utils/phone_home_stat.php | 2 - 16 files changed, 23 insertions(+), 628 deletions(-) create mode 100644 install/include/airtime-install.ini delete mode 100755 utils/airtime-clean-storage delete mode 100644 utils/airtime-clean-storage.php delete mode 100755 utils/airtime-import delete mode 100644 utils/airtime-import.php diff --git a/airtime_mvc/application/configs/conf.php b/airtime_mvc/application/configs/conf.php index 23e28ee32..6829b7a85 100644 --- a/airtime_mvc/application/configs/conf.php +++ b/airtime_mvc/application/configs/conf.php @@ -67,9 +67,7 @@ class Config { $CC_CONFIG['basePort'] = $values['general']['base_port']; $CC_CONFIG['baseFilesDir'] = $values['general']['base_files_dir']; - // main directory for storing binary media files - $CC_CONFIG['storageDir'] = $values['general']['base_files_dir']."/stor"; - + // Database config $CC_CONFIG['dsn']['username'] = $values['database']['dbuser']; $CC_CONFIG['dsn']['password'] = $values['database']['dbpass']; diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 08e01c3de..1d6822db7 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -408,8 +408,8 @@ class ApiController extends Zend_Controller_Action print 'You are not allowed to access this resource.'; exit; } - - $this->view->stor = $CC_CONFIG['storageDir']; + + $this->view->stor = MusicDir::getStorDir()->getDirectory(); } public function reloadMetadataAction() { diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 13a01f234..3c6bdfa7f 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -336,9 +336,11 @@ class StoredFile { if (Schedule::IsFileScheduledInTheFuture($this->getId())) { return PEAR::raiseError('Cannot delete a file that is scheduled in the future.'); } + + $storageDir = MusicDir::getStorDir()->getDirectory(); // Only delete the file from filesystem if it has been copied to the storage directory - if (substr($this->getFilePath(), 0, strlen($CC_CONFIG["storageDir"])) == $CC_CONFIG["storageDir"]) { + if (substr($this->getFilePath(), 0, strlen($storageDir) == $storageDir)) { // Delete the file $res = unlink($this->getFilePath()); if (!$res) { diff --git a/install/include/AirtimeIni.php b/install/include/AirtimeIni.php index 88ed2c677..559b7670f 100644 --- a/install/include/AirtimeIni.php +++ b/install/include/AirtimeIni.php @@ -20,6 +20,8 @@ if (!function_exists('pg_connect')) { exit(2); } + +/* This class deals with the config files stored in /etc/airtime */ class AirtimeIni { const CONF_FILE_AIRTIME = "/etc/airtime/airtime.conf"; diff --git a/install/include/AirtimeInstall.php b/install/include/AirtimeInstall.php index 26149d2b1..4c4711f6a 100644 --- a/install/include/AirtimeInstall.php +++ b/install/include/AirtimeInstall.php @@ -117,12 +117,18 @@ class AirtimeInstall } } + + /* TODO: This function should be moved to the media-monitor + * install script. */ public static function InstallStorageDirectory() { global $CC_CONFIG, $CC_DBC; echo "* Storage directory setup".PHP_EOL; - $dirs = array($CC_CONFIG['storageDir'], $CC_CONFIG['storageDir']."/organize"); + $ini = parse_ini_file(__DIR__."/airtime-install.ini"); + $stor_dir = $ini["storage_dir"]; + + $dirs = array($stor_dir, $stor_dir."/organize"); foreach ($dirs as $dir){ if (!file_exists($dir)) { @@ -150,9 +156,6 @@ class AirtimeInstall $success = chown($rp, "pypo"); $success = chmod($rp, 02777); } - - //July 5th, 2011: Why is this here - MK????? - //$CC_CONFIG['storageDir'] = $rp; } public static function CreateDatabaseUser() @@ -310,10 +313,6 @@ class AirtimeInstall $dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-import"; exec("ln -s $dir /usr/bin/airtime-import"); - echo "* Installing airtime-clean-storage".PHP_EOL; - $dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-clean-storage"; - exec("ln -s $dir /usr/bin/airtime-clean-storage"); - echo "* Installing airtime-update-db-settings".PHP_EOL; $dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-update-db-settings"; exec("ln -s $dir /usr/bin/airtime-update-db-settings"); @@ -326,7 +325,6 @@ class AirtimeInstall public static function RemoveSymlinks() { exec("rm -f /usr/bin/airtime-import"); - exec("rm -f /usr/bin/airtime-clean-storage"); exec("rm -f /usr/bin/airtime-update-db-settings"); exec("rm -f /usr/bin/airtime-check-system"); } diff --git a/install/include/airtime-db-install.php b/install/include/airtime-db-install.php index 1a2208fd5..f1abf02c1 100644 --- a/install/include/airtime-db-install.php +++ b/install/include/airtime-db-install.php @@ -50,8 +50,11 @@ AirtimeInstall::SetAirtimeVersion(AIRTIME_VERSION); AirtimeInstall::SetUniqueId(); if (AirtimeInstall::$databaseTablesCreated) { - echo "* Inserting stor directory into music_dirs table".PHP_EOL; - $stor_dir = realpath($CC_CONFIG['storageDir']); + + $ini = parse_ini_file(__DIR__."/airtime-install.ini"); + + $stor_dir = $ini["storage_dir"]; + echo "* Inserting stor directory location $stor_dir into music_dirs table".PHP_EOL; $sql = "INSERT INTO cc_music_dirs (directory, type) VALUES ('$stor_dir', 'stor')"; $result = $CC_DBC->query($sql); diff --git a/install/include/airtime-install.ini b/install/include/airtime-install.ini new file mode 100644 index 000000000..7ea43d9a5 --- /dev/null +++ b/install/include/airtime-install.ini @@ -0,0 +1 @@ +storage_dir = /srv/airtime/stor diff --git a/install/upgrades/airtime-1.8.1/airtime-upgrade.php b/install/upgrades/airtime-1.8.1/airtime-upgrade.php index a282aefcb..619e72c64 100644 --- a/install/upgrades/airtime-1.8.1/airtime-upgrade.php +++ b/install/upgrades/airtime-1.8.1/airtime-upgrade.php @@ -92,8 +92,6 @@ function LoadConfig($CC_CONFIG) { //$CC_CONFIG['basePort'] = $values['general']['base_port']; $CC_CONFIG['baseFilesDir'] = $values['general']['base_files_dir']; - // main directory for storing binary media files - $CC_CONFIG['storageDir'] = $values['general']['base_files_dir']."/stor"; // Database config $CC_CONFIG['dsn']['username'] = $values['database']['dbuser']; diff --git a/install/upgrades/airtime-1.8.2/airtime-upgrade.php b/install/upgrades/airtime-1.8.2/airtime-upgrade.php index abfbe3868..6ebe4d39f 100644 --- a/install/upgrades/airtime-1.8.2/airtime-upgrade.php +++ b/install/upgrades/airtime-1.8.2/airtime-upgrade.php @@ -92,8 +92,6 @@ function LoadConfig($CC_CONFIG) { $CC_CONFIG['basePort'] = $values['general']['base_port']; $CC_CONFIG['baseFilesDir'] = $values['general']['base_files_dir']; - // main directory for storing binary media files - $CC_CONFIG['storageDir'] = $values['general']['base_files_dir']."/stor"; // Database config $CC_CONFIG['dsn']['username'] = $values['database']['dbuser']; diff --git a/install/upgrades/airtime-1.8/airtime-upgrade.php b/install/upgrades/airtime-1.8/airtime-upgrade.php index ba4f5b631..c6fdc9ba6 100644 --- a/install/upgrades/airtime-1.8/airtime-upgrade.php +++ b/install/upgrades/airtime-1.8/airtime-upgrade.php @@ -66,5 +66,5 @@ $CC_CONFIG = Config::loadConfig($CC_CONFIG); echo "* Creating default storage directory".PHP_EOL; AirtimeInstall::InstallStorageDirectory(); -AirtimeInstall::ChangeDirOwnerToWebserver($CC_CONFIG["storageDir"]); +AirtimeInstall::ChangeDirOwnerToWebserver($CC_CONFIG['baseFilesDir']."/stor"); AirtimeInstall::CreateSymlinksToUtils(); diff --git a/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py b/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py index 562dcedfb..1ade79d67 100644 --- a/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py +++ b/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py @@ -104,7 +104,7 @@ class AirtimeProcessEvent(ProcessEvent): try: omask = os.umask(0) - uid = pwd.getpwnam('pypo')[2] + uid = pwd.getpwnam('www-data')[2] gid = grp.getgrnam('www-data')[2] os.chown(item, uid, gid) diff --git a/utils/airtime-clean-storage b/utils/airtime-clean-storage deleted file mode 100755 index 26625d89d..000000000 --- a/utils/airtime-clean-storage +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------------------- -# Copyright (c) 2010 Sourcefabric O.P.S. -# -# This file is part of the Airtime project. -# http://airtime.sourcefabric.org/ -# -# Airtime 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. -# -# Airtime 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 Airtime; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#------------------------------------------------------------------------------- -#------------------------------------------------------------------------------- -# This script cleans audio files in Airtime. -# -# Absolute path to this script -SCRIPT=`readlink -f $0` -# Absolute directory this script is in -SCRIPTPATH=`dirname $SCRIPT` - -invokePwd=$PWD -cd $SCRIPTPATH - -php -q airtime-clean-storage.php "$@" || exit 1 diff --git a/utils/airtime-clean-storage.php b/utils/airtime-clean-storage.php deleted file mode 100644 index 11eee7f40..000000000 --- a/utils/airtime-clean-storage.php +++ /dev/null @@ -1,132 +0,0 @@ -query($sql); - - echo " * Clearing playlist table...".PHP_EOL; - Playlist::deleteAll(); - - echo " * Clearing files table...".PHP_EOL; - $result = StoredFile::deleteAll(); - if (PEAR::isError($result)) { - echo $result->getMessage().PHP_EOL; - } -} - - -global $CC_CONFIG; - -require_once('Zend/Loader/Autoloader.php'); -$autoloader = Zend_Loader_Autoloader::getInstance(); - -try { - $opts = new Zend_Console_Getopt( - array( - 'help|h' => 'Displays usage information.', - 'clean|c' => 'Removes all audio file metadata from the database that does not have a matching file in the filesystem.', - 'empty|e' => 'Removes all files and playlists from Airtime.' - ) - ); - $opts->parse(); -} catch (Zend_Console_Getopt_Exception $e) { - exit($e->getMessage() .PHP_EOL. $e->getUsageMessage()); -} - -if (isset($opts->h)) { - echo PHP_EOL; - echo $opts->getUsageMessage(); - echo "Storage directory: ". realpath($CC_CONFIG["storageDir"]).PHP_EOL.PHP_EOL; - exit; -} - -// Need to check that we are superuser before running this. -if (exec("whoami") != "root") { - echo PHP_EOL."You must be root to use this script.".PHP_EOL.PHP_EOL; - exit(1); -} - -$CC_DBC = DB::connect($CC_CONFIG['dsn'], TRUE); -$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC); - -if (isset($opts->e)) { - echo PHP_EOL; - airtime_empty_db($CC_DBC); - echo "Done.".PHP_EOL.PHP_EOL; -} elseif (isset($opts->c)) { - $count = airtime_clean_files($CC_CONFIG['storageDir']); - if ($count == 0) { - echo PHP_EOL."All file metadata in the database is linked to a real file. Nothing to be done.".PHP_EOL.PHP_EOL; - } else { - echo PHP_EOL."Total rows removed: $count".PHP_EOL; - } -} else { - echo PHP_EOL; - echo $opts->getUsageMessage(); - echo "Storage directory: ". realpath($CC_CONFIG["storageDir"]).PHP_EOL.PHP_EOL; -} diff --git a/utils/airtime-import b/utils/airtime-import deleted file mode 100755 index 3480bb0fd..000000000 --- a/utils/airtime-import +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------------------- -# Copyright (c) 2010 Sourcefabric O.P.S. -# -# This file is part of the Airtime project. -# http://airtime.sourcefabric.org/ -# -# Airtime 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. -# -# Airtime 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 Airtime; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#------------------------------------------------------------------------------- -#------------------------------------------------------------------------------- -# This script imports audio files into Airtime. -# -# To get usage help, try the -h option -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Determine directories, files -#------------------------------------------------------------------------------- - -# Absolute path to this script -SCRIPT=`readlink -f $0` -# Absolute directory this script is in -SCRIPTPATH=`dirname $SCRIPT` - -#------------------------------------------------------------------------------- -# Do import -#------------------------------------------------------------------------------- -invokePwd=$PWD -cd $SCRIPTPATH - -php -q airtime-import.php --dir "$invokePwd" "$@" || exit 1 diff --git a/utils/airtime-import.php b/utils/airtime-import.php deleted file mode 100644 index 9fd4b843f..000000000 --- a/utils/airtime-import.php +++ /dev/null @@ -1,393 +0,0 @@ -getMessage()." ".$p_pearErrorObj->getUserInfo(); - } - echo "\nERROR: $msg\n"; - if (!empty($txt)) { - echo "ERROR: $txt\n"; - } - $g_errors++; -} - -/** - * Import a file or directory into the storage database. - * If it is a directory, files will be imported recursively. - * - * @param string $p_filepath - * You can pass in a directory or file name. - * This must be the full absolute path to the file, not relative. - * @param string $p_importMode - * @param boolean $p_testOnly - * - * @return int - */ -function import_audio_file($p_filepath, $p_importMode = null, $p_testOnly = false) -{ - global $STORAGE_SERVER_PATH; - global $g_fileCount; - global $g_duplicates; - global $g_replaced; - - // Check parameters - $p_importMode = strtolower($p_importMode); - if (!in_array($p_importMode, array("copy", "link"))) { - return; - } - - $fileCount = 0; - $duplicates = 0; - - if (!file_exists($p_filepath)) { - echo " * WARNING: File does not exist: $p_filepath\n"; - return; - } - - //echo "Memory usage:".memory_get_usage()."\n"; - - // If we are given a directory, get all the files recursively and - // call this function for each file. - if (is_dir($p_filepath)) { - // NOTE: this method of using opendir() is used over other - // techniques because of its low memory usage. Both PEAR's - // File_Find and PHP5's built-in RecursiveDirectoryIterator - // use about 5500 bytes per file, while this method uses - // about 1100 bytes per file. - $d = opendir($p_filepath); - while (false !== ($file = readdir($d))) { - if ($file != "." && $file != "..") { - $path = "$p_filepath/$file"; - import_audio_file($path, $p_importMode, $p_testOnly); - } - } - closedir($d); - return; - } - - // Check for non-supported file type - if (!preg_match('/\.(ogg|mp3)$/i', $p_filepath, $var)) { - echo "IGNORED: [xxxxx] $p_filepath\n"; - //echo " * WARNING: File extension not supported - skipping file: $p_filepath\n"; - return; - } - - // Set the file permissions to be world-readable - if ($p_importMode == "link") { - // Check current file permissions - $fileperms = fileperms($p_filepath); - // Explaination of 0x0124: - // 1 => owner readable - // 2 => group readable - // 4 => world readable - // (see: http://php.net/manual/en/function.fileperms.php) - $readableByAll = !(($fileperms & 0x0124) ^ 0x0124); - if (!$readableByAll) { - $permError = false; - // Check if we have the ability to change the perms - if (is_writable($p_filepath)) { - // Change the file perms - $fileperms = $fileperms | 0x0124; - chmod($p_filepath, $fileperms); - - // Check that file perms were changed - clearstatcache(); - $fileperms = fileperms($p_filepath); - $readableByAll = !(($fileperms & 0x0124) ^ 0x124); - if (!$readableByAll) { - $permError = true; - } - } else { - $permError = true; - } - if ($permError) { - global $g_errors; - $g_errors++; - echo "ERROR: $p_filepath\n" - ." When importing with the '--link' option, files must be set\n" - ." world-readable. The file permissions for the file cannot be\n" - ." changed. Check that you are not trying to import from a FAT32\n" - ." drive. Otherwise, this problem might be fixed by running this \n" - ." script with 'sudo'.\n"; - return; - } - } - } - - // $timeBegin = microtime(true); - $md5sum = md5_file($p_filepath); - // $timeEnd = microtime(true); - // echo " * MD5 time: ".($timeEnd-$timeBegin)."\n"; - - // Look up md5sum in database - $duplicate = StoredFile::RecallByMd5($md5sum); - if (PEAR::isError($duplicate)) { - echo $duplicate->getMessage(); - echo "\n"; - } - - //row exists in database - if (isset($duplicate)) { - if (file_exists($duplicate->getRealFilePath())) { - echo "DUPLICATE: $p_filepath\n"; - $g_duplicates++; - } - else{ - if ($p_importMode == "copy") { - $doCopyFiles = true; - } - else if ($p_importMode == "link") { - $doCopyFiles = false; - } - $res = $duplicate->replaceFile($p_filepath, $doCopyFiles); - if (PEAR::isError($res)) { - echo $res->getMessage(); - echo "\n"; - return; - } - $g_replaced++; - } - return; - } - - echo "Importing: [".sprintf("%05d",$g_fileCount+1)."] $p_filepath\n"; - - if (!$p_testOnly) { - if ($p_importMode == "copy") { - $doCopyFiles = true; - } elseif ($p_importMode == "link") { - $doCopyFiles = false; - } - $values = array( - "filepath" => $p_filepath, - "md5" => $md5sum, - ); - $storedFile = StoredFile::Insert($values, $doCopyFiles); - if (PEAR::isError($storedFile)) { - import_err($storedFile, "Error in StoredFile::Insert()"); - echo var_export($metadata)."\n"; - return; - } - } else { - echo "==========================================================================\n"; - echo "METADATA\n"; - var_dump($metadata); - } - - $g_fileCount++; - return; -} - -$DEBUG_IMPORT = false; - -echo "========================\n"; -echo "Airtime Import Script\n"; -echo "========================\n"; -$g_errors = 0; -//print_r($argv); -$start = intval(date('U')); - -if ($DEBUG_IMPORT) { - $testonly = false; - $importMode = "link"; - $files = array("/path/to/your/test/file.mp3"); - $dsn = $CC_CONFIG['dsn']; -} else { - $dsn = $CC_CONFIG['dsn']; -} -//PEAR::setErrorHandling(PEAR_ERROR_RETURN); -PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, "import_error_handler"); -$CC_DBC = DB::connect($dsn, TRUE); -if (PEAR::isError($CC_DBC)) { - echo "ERROR: ".$CC_DBC->getMessage()." ".$CC_DBC->getUserInfo()."\n"; - exit(1); -} -$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC); - -if (!$DEBUG_IMPORT) { - $parsedCommandLine = Console_Getopt::getopt($argv, "thcld", array("test", "help", "copy", "link", "dir=")); - //print_r($parsedCommandLine); - if (PEAR::isError($parsedCommandLine)) { - printUsage(); - exit(1); - } - $cmdLineOptions = $parsedCommandLine[0]; - if (count($parsedCommandLine[1]) == 0) { - printUsage(); - exit; - } - - $files = $parsedCommandLine[1]; - - $testonly = FALSE; - $importMode = null; - $currentDir = null; - foreach ($cmdLineOptions as $tmpValue) { - $optionName = $tmpValue[0]; - $optionValue = $tmpValue[1]; - switch ($optionName) { - case "h": - case '--help': - printUsage(); - exit; - case "c": - case "--copy": - $importMode = "copy"; - break; - case 'l': - case '--link': - $importMode = "link"; - break; - case '--dir': - $currentDir = $optionValue; - break; - case "t": - case "--test": - $testonly = TRUE; - break; - } - } -} - -if (is_null($importMode)) { - printUsage(); - exit(0); -} - -global $CC_CONFIG; - -if ( ($importMode == "copy") && !is_writable($CC_CONFIG["storageDir"])) { - echo "ERROR: You do not have write permissions to the directory you are trying to import to:\n " . $CC_CONFIG["storageDir"] . "\n\n"; - exit; -} - -global $g_fileCount; -global $g_duplicates; -global $g_replaced; -$g_fileCount = 0; -$g_duplicates = 0; -$g_replaced = 0; -if (is_array($files)) { - foreach ($files as $filepath) { - // absolute path - if (($filepath[0] == "/") || ($filepath[0] == "~")) { - $fullPath = realpath($filepath); - } elseif (!is_null($currentDir)) { - $fullPath = realpath("$currentDir/$filepath"); - } else { - $fullPath = null; - } - - if (empty($fullPath)) { - echo "ERROR: I cant find the given file: $filepath\n\n"; - exit; - } - import_audio_file($fullPath, $importMode, $testonly); - } -} -$end = intval(date('U')); -$time = $end - $start; -if ($time > 0) { - $speed = round(($g_fileCount+$g_duplicates)/$time, 1); -} else { - $speed = ($g_fileCount+$g_duplicates); -} - -echo "==========================================================================\n"; -echo " *** Import mode: $importMode\n"; -if ($importMode == "copy") { - echo " *** Destination folder: ".$CC_CONFIG['storageDir']."\n"; -} -echo " *** Files imported: $g_fileCount\n"; -echo " *** Files restored: $g_replaced\n"; -echo " *** Duplicate files (not imported): $g_duplicates\n"; -if ($g_errors > 0) { - echo " *** Errors: $g_errors\n"; -} -echo " *** Total: ".($g_fileCount+$g_duplicates)." files in $time seconds = $speed files/second.\n"; -echo "==========================================================================\n"; - diff --git a/utils/phone_home_stat.php b/utils/phone_home_stat.php index ff42cde0a..89b3df90a 100644 --- a/utils/phone_home_stat.php +++ b/utils/phone_home_stat.php @@ -11,8 +11,6 @@ $CC_CONFIG['baseUrl'] = $values['general']['base_url']; $CC_CONFIG['basePort'] = $values['general']['base_port']; $CC_CONFIG['baseFilesDir'] = $values['general']['base_files_dir']; -// main directory for storing binary media files -$CC_CONFIG['storageDir'] = $values['general']['base_files_dir']."/stor"; // Database config $CC_CONFIG['dsn']['username'] = $values['database']['dbuser'];