Ver Fonte

Merge branch 'master' into number_alias_as_vm_id

Conflicts:
	app/hot_desking/extension_edit.php
Alexey Melnichuk há 10 anos atrás
pai
commit
66be6c6e68

+ 64 - 65
core/databases/app_defaults.php

@@ -101,49 +101,54 @@ if ($domains_processed == 1) {
 			}
 
 		//config.lua
-			if (strlen($db_type) > 0) {
-				if (is_dir("/etc/fusionpbx")){
-					$config = "/etc/fusionpbx/config.lua";
-				} elseif (is_dir("/usr/local/etc/fusionpbx")){
-					$config = "/usr/local/etc/fusionpbx/config.lua";
-				}
-				else {
-					$config = $_SESSION['switch']['scripts']['dir']."/resources/config.lua";
-				}
-				$fout = fopen($config,"w");
-				$tmp = "\n";
-				$tmp .= "--set the variables\n";
-				if (strlen($_SESSION['switch']['sounds']['dir']) > 0) {
-					$tmp .= "	sounds_dir = \"".$_SESSION['switch']['sounds']['dir']."\";\n";
-				}
-				if (strlen($_SESSION['switch']['db']['dir']) > 0) {
-					$tmp .= "	database_dir = \"".$_SESSION['switch']['db']['dir']."\";\n";
-				}
-				if (strlen($_SESSION['switch']['recordings']['dir']) > 0) {
-					$tmp .= "	recordings_dir = \"".$recordings_dir."\";\n";
-				}
-				if (strlen($_SESSION['switch']['storage']['dir']) > 0) {
-					$tmp .= "	storage_dir = \"".$_SESSION['switch']['storage']['dir']."\";\n";
-				}
-				if (strlen($_SESSION['switch']['voicemail']['dir']) > 0) {
-					$tmp .= "	voicemail_dir = \"".$_SESSION['switch']['voicemail']['dir']."\";\n";
-				}
-				$tmp .= "	php_dir = \"".PHP_BINDIR."\";\n";
-				if (substr(strtoupper(PHP_OS), 0, 3) == "WIN") {
-					$tmp .= "	php_bin = \"php.exe\";\n";
-				}
-				else {
-					$tmp .= "	php_bin = \"php\";\n";
-				}
-				$tmp .= "	document_root = \"".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."\";\n";
-				$tmp .= "\n";
+			if (is_dir("/etc/fusionpbx")){
+				$config = "/etc/fusionpbx/config.lua";
+			} elseif (is_dir("/usr/local/etc/fusionpbx")){
+				$config = "/usr/local/etc/fusionpbx/config.lua";
+			}
+			else {
+				$config = $_SESSION['switch']['scripts']['dir']."/resources/config.lua";
+			}
+			$fout = fopen($config,"w");
+			$tmp = "\n";
+			$tmp .= "--set the variables\n";
+			if (strlen($_SESSION['switch']['sounds']['dir']) > 0) {
+				$tmp .= "	sounds_dir = [[".$_SESSION['switch']['sounds']['dir']."]];\n";
+			}
+			if (strlen($_SESSION['switch']['db']['dir']) > 0) {
+				$tmp .= "	database_dir = [[".$_SESSION['switch']['db']['dir']."]];\n";
+			}
+			if (strlen($_SESSION['switch']['recordings']['dir']) > 0) {
+				$tmp .= "	recordings_dir = [[".$recordings_dir."]];\n";
+			}
+			if (strlen($_SESSION['switch']['storage']['dir']) > 0) {
+				$tmp .= "	storage_dir = [[".$_SESSION['switch']['storage']['dir']."]];\n";
+			}
+			if (strlen($_SESSION['switch']['voicemail']['dir']) > 0) {
+				$tmp .= "	voicemail_dir = [[".$_SESSION['switch']['voicemail']['dir']."]];\n";
+			}
+			$tmp .= "	php_dir = [[".PHP_BINDIR."]];\n";
+			if (substr(strtoupper(PHP_OS), 0, 3) == "WIN") {
+				$tmp .= "	php_bin = \"php.exe\";\n";
+			}
+			else {
+				$tmp .= "	php_bin = \"php\";\n";
+			}
+			$tmp .= "	document_root = [[".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."]];\n";
+			$tmp .= "\n";
+
+			if ((strlen($db_type) > 0) || (strlen($dsn_name) > 0)) {
 				$tmp .= "--database information\n";
 				$tmp .= "	database = {}\n";
 				$tmp .= "	database[\"type\"] = \"".$db_type."\";\n";
 				$tmp .= "	database[\"name\"] = \"".$db_name."\";\n";
 				$tmp .= "	database[\"path\"] = \"".$db_path."\";\n";
 
-				if ($db_type == "pgsql") {
+				if (strlen($dsn_name) > 0) {
+					$tmp .= "	database[\"system\"] = \"odbc://".$dsn_name.":".$dsn_username.":".$dsn_password."\";\n";
+					$tmp .= "	database[\"switch\"] = \"odbc://freeswitch:".$dsn_username.":".$dsn_password."\";\n";
+				}
+				elseif ($db_type == "pgsql") {
 					if ($db_host == "localhost") { $db_host = "127.0.0.1"; }
 					$tmp .= "	database[\"system\"] = \"pgsql://hostaddr=".$db_host." port=".$db_port." dbname=".$db_name." user=".$db_username." password=".$db_password." options='' application_name='".$db_name."'\";\n";
 					$tmp .= "	database[\"switch\"] = \"pgsql://hostaddr=".$db_host." port=".$db_port." dbname=freeswitch user=".$db_username." password=".$db_password." options='' application_name='freeswitch'\";\n";
@@ -153,37 +158,31 @@ if ($domains_processed == 1) {
 					$tmp .= "	database[\"switch\"] = \"sqlite://".$_SESSION['switch']['db']['dir']."\";\n";
 				}
 				elseif ($db_type == "mysql") {
-					if (strlen($dsn_name) > 0) {
-						$tmp .= "	database[\"system\"] = \"odbc://".$dsn_name.":".$dsn_username.":".$dsn_password."\";\n";
-						$tmp .= "	database[\"switch\"] = \"odbc://freeswitch:".$dsn_username.":".$dsn_password."\";\n";
-					}
-					else {
-						$tmp .= "	database[\"system\"] = \"\";\n";
-						$tmp .= "	database[\"switch\"] = \"\";\n";
-					}
-				}
-
-				$tmp .= "\n";
-				$tmp .= "--additional info\n";
-				$tmp .= "	domain_count = ".count($_SESSION["domains"]).";\n";
-				$tmp .= "	temp_dir = \"".$_SESSION['server']['temp']['dir']."\";\n";
-				if (isset($_SESSION['domain']['dial_string']['text'])) {
-					$tmp .= "	dial_string = \"".$_SESSION['domain']['dial_string']['text']."\";\n";
+					$tmp .= "	database[\"system\"] = \"\";\n";
+					$tmp .= "	database[\"switch\"] = \"\";\n";
 				}
 				$tmp .= "\n";
-				$tmp .= "--include local.lua\n";
-				$tmp .= "	dofile(scripts_dir..\"/resources/functions/file_exists.lua\");\n";
-				$tmp .= "	if (file_exists(\"/etc/fusionpbx/local.lua\")) then\n";
-				$tmp .= "		dofile(\"/etc/fusionpbx/local.lua\");\n";
-				$tmp .= "	elseif (file_exists(\"/usr/local/etc/fusionpbx/local.lua\")) then\n";
-				$tmp .= "		dofile(\"/usr/local/etc/fusionpbx/local.lua\");\n";
-				$tmp .= "	elseif (file_exists(scripts_dir..\"/resources/local.lua\")) then\n";
-				$tmp .= "		dofile(scripts_dir..\"/resources/local.lua\");\n";
-				$tmp .= "	end\n";
-				fwrite($fout, $tmp);
-				unset($tmp);
-				fclose($fout);
 			}
+
+			$tmp .= "--additional info\n";
+			$tmp .= "	domain_count = ".count($_SESSION["domains"]).";\n";
+			$tmp .= "	temp_dir = [[".$_SESSION['server']['temp']['dir']."]];\n";
+			if (isset($_SESSION['domain']['dial_string']['text'])) {
+				$tmp .= "	dial_string = \"".$_SESSION['domain']['dial_string']['text']."\";\n";
+			}
+			$tmp .= "\n";
+			$tmp .= "--include local.lua\n";
+			$tmp .= "	dofile(scripts_dir..\"/resources/functions/file_exists.lua\");\n";
+			$tmp .= "	if (file_exists(\"/etc/fusionpbx/local.lua\")) then\n";
+			$tmp .= "		dofile(\"/etc/fusionpbx/local.lua\");\n";
+			$tmp .= "	elseif (file_exists(\"/usr/local/etc/fusionpbx/local.lua\")) then\n";
+			$tmp .= "		dofile(\"/usr/local/etc/fusionpbx/local.lua\");\n";
+			$tmp .= "	elseif (file_exists(scripts_dir..\"/resources/local.lua\")) then\n";
+			$tmp .= "		dofile(scripts_dir..\"/resources/local.lua\");\n";
+			$tmp .= "	end\n";
+			fwrite($fout, $tmp);
+			unset($tmp);
+			fclose($fout);
 	}
 }
 ?>

+ 38 - 0
core/databases/app_languages.php

@@ -9,6 +9,7 @@ $text['title-databases']['pl'] = "Bazy danych";
 $text['title-databases']['sv-se'] = "Databaser";
 $text['title-databases']['uk'] = "Бази даних";
 $text['title-databases']['de-at'] = "Datenbanken";
+$text['title-databases']['ar-eg'] = "قواعد البيانات";
 
 $text['title-database-edit']['en-us'] = "Database Edit";
 $text['title-database-edit']['es-cl'] = "Editar base de datos";
@@ -19,6 +20,7 @@ $text['title-database-edit']['pl'] = "Edytuj bazę danych";
 $text['title-database-edit']['sv-se'] = "Ändra Databas";
 $text['title-database-edit']['uk'] = "Редагування бази даних";
 $text['title-database-edit']['de-at'] = "Datenbank editieren";
+$text['title-database-edit']['ar-eg'] = "تعديل قاعدة البيانات";
 
 $text['title-database-add']['en-us'] = "Database Add";
 $text['title-database-add']['es-cl'] = "Agregar Base de Datos";
@@ -29,6 +31,7 @@ $text['title-database-add']['pl'] = "Dodaj bazę danych";
 $text['title-database-add']['sv-se'] = "Lägg Till Databas";
 $text['title-database-add']['uk'] = "Додавання бази даних";
 $text['title-database-add']['de-at'] = "Datenbank hinzufügen";
+$text['title-database-add']['ar-eg'] = "إضافة قاعدة بيانات";
 
 $text['message-update']['en-us'] = "Update Completed";
 $text['message-update']['es-cl'] = "Actualización Completada";
@@ -39,6 +42,7 @@ $text['message-update']['pl'] = "Zaktualizowano poprawnie";
 $text['message-update']['sv-se'] = "Uppdatering Klar";
 $text['message-update']['uk'] = "Оновлення завершено";
 $text['message-update']['de-at'] = "Aktualisierung durchgeführt";
+$text['message-update']['ar-eg'] = "اكتمال التحديث";
 
 $text['message-required']['en-us'] = "Please provide: ";
 $text['message-required']['es-cl'] = "Por favor indique: ";
@@ -49,6 +53,7 @@ $text['message-required']['pl'] = "Wpisz:";
 $text['message-required']['sv-se'] = "Var god uppge:";
 $text['message-required']['uk'] = "Будь ласка, вкажіть:";
 $text['message-required']['de-at'] = "Bitte geben Sie folgendes an:";
+$text['message-required']['ar-eg'] = "من فضلك أدخل";
 
 $text['message-message']['en-us'] = "Message";
 $text['message-message']['es-cl'] = "Mensaje";
@@ -59,6 +64,7 @@ $text['message-message']['pl'] = "Wiadomość";
 $text['message-message']['sv-se'] = "Meddelande";
 $text['message-message']['uk'] = "Повідомлення";
 $text['message-message']['de-at'] = "Nachricht";
+$text['message-message']['ar-eg'] = "رسالة";
 
 $text['message-delete']['en-us'] = "Delete Completed";
 $text['message-delete']['es-cl'] = "Eliminación Completada";
@@ -69,6 +75,7 @@ $text['message-delete']['pl'] = "Usunięto poprawnie";
 $text['message-delete']['sv-se'] = "Borttagning Klar";
 $text['message-delete']['uk'] = "Видалено";
 $text['message-delete']['de-at'] = "Erfolgreich gelöscht";
+$text['message-delete']['ar-eg'] = "تم المسح";
 
 $text['message-add']['en-us'] = "Add Completed";
 $text['message-add']['es-cl'] = "Agregar Completado";
@@ -79,6 +86,7 @@ $text['message-add']['pl'] = "Dodano poprawnie";
 $text['message-add']['sv-se'] = "Tillagd";
 $text['message-add']['uk'] = "Додано";
 $text['message-add']['de-at'] = "Erfolgreich hinzugefügt";
+$text['message-add']['ar-eg'] = "تمت الأضافة";
 
 $text['label-username']['en-us'] = "Username";
 $text['label-username']['es-cl'] = "Nombre de usuario";
@@ -89,6 +97,7 @@ $text['label-username']['pl'] = "Użytkownik";
 $text['label-username']['sv-se'] = "Användarnamn";
 $text['label-username']['uk'] = "Ім’я користувача";
 $text['label-username']['de-at'] = "Benutzername";
+$text['label-username']['ar-eg'] = "اسم المستخدم";
 
 $text['label-type']['en-us'] = "Type";
 $text['label-type']['es-cl'] = "Tipo";
@@ -99,6 +108,7 @@ $text['label-type']['pl'] = "Typ";
 $text['label-type']['sv-se'] = "Typ";
 $text['label-type']['uk'] = "Тип";
 $text['label-type']['de-at'] = "Typ";
+$text['label-type']['ar-eg'] = "النوع";
 
 $text['label-port']['en-us'] = "Port";
 $text['label-port']['es-cl'] = "Puerto";
@@ -109,6 +119,7 @@ $text['label-port']['pl'] = "Port";
 $text['label-port']['sv-se'] = "Port";
 $text['label-port']['uk'] = "Порт";
 $text['label-port']['de-at'] = "Port";
+$text['label-port']['ar-eg'] = "منفذ";
 
 $text['label-path']['en-us'] = "Path";
 $text['label-path']['es-cl'] = "Ruta";
@@ -119,6 +130,7 @@ $text['label-path']['pl'] = "Ścieżka";
 $text['label-path']['sv-se'] = "Sökväg";
 $text['label-path']['uk'] = "Шлях";
 $text['label-path']['de-at'] = "Pfad";
+$text['label-path']['ar-eg'] = "";
 
 $text['label-password']['en-us'] = "Password";
 $text['label-password']['es-cl'] = "Contreseña";
@@ -129,6 +141,7 @@ $text['label-password']['pl'] = "Hasło";
 $text['label-password']['sv-se'] = "Lösenord";
 $text['label-password']['uk'] = "Пароль";
 $text['label-password']['de-at'] = "Passwort";
+$text['label-password']['ar-eg'] = "كلمة السر";
 
 $text['label-name']['en-us'] = "Name";
 $text['label-name']['es-cl'] = "Nombre";
@@ -139,6 +152,7 @@ $text['label-name']['pl'] = "Nazwa";
 $text['label-name']['sv-se'] = "Namn";
 $text['label-name']['uk'] = "Назва";
 $text['label-name']['de-at'] = "Name";
+$text['label-name']['ar-eg'] = "الأسم";
 
 $text['label-host']['en-us'] = "Host";
 $text['label-host']['es-cl'] = "Host";
@@ -149,6 +163,7 @@ $text['label-host']['pl'] = "Host";
 $text['label-host']['sv-se'] = "Värd";
 $text['label-host']['uk'] = "Хост";
 $text['label-host']['de-at'] = "Host";
+$text['label-host']['ar-eg'] = "مضيف";
 
 $text['label-driver']['en-us'] = "Driver";
 $text['label-driver']['es-cl'] = "Controlador";
@@ -159,6 +174,7 @@ $text['label-driver']['pl'] = "Sterownik";
 $text['label-driver']['sv-se'] = "Drivrutin";
 $text['label-driver']['uk'] = "Драйвер";
 $text['label-driver']['de-at'] = "Treiber";
+$text['label-driver']['ar-eg'] = "";
 
 $text['label-description']['en-us'] = "Description";
 $text['label-description']['es-cl'] = "Descripción";
@@ -169,6 +185,7 @@ $text['label-description']['pl'] = "Opis";
 $text['label-description']['sv-se'] = "Beskrivning";
 $text['label-description']['uk'] = "Опис";
 $text['label-description']['de-at'] = "Beschreibung";
+$text['label-description']['ar-eg'] = "الوصف";
 
 $text['header-databases']['en-us'] = "Databases";
 $text['header-databases']['es-cl'] = "Bases de datos";
@@ -179,6 +196,7 @@ $text['header-databases']['pl'] = "Bazy danych";
 $text['header-databases']['sv-se'] = "Databaser";
 $text['header-databases']['uk'] = "Бази даних";
 $text['header-databases']['de-at'] = "Datenbanken";
+$text['header-databases']['ar-eg'] = "قواعد البيانات";
 
 $text['header-database-edit']['en-us'] = "Database Edit";
 $text['header-database-edit']['es-cl'] = "Editar base de datos";
@@ -189,6 +207,7 @@ $text['header-database-edit']['pl'] = "Edytuj bazę danych";
 $text['header-database-edit']['sv-se'] = "Ändra Databas";
 $text['header-database-edit']['uk'] = "Редагування бази даних";
 $text['header-database-edit']['de-at'] = "Datenbanken bearbeiten";
+$text['header-database-edit']['ar-eg'] = "تعديل قاعدة البيانات";
 
 $text['header-database-add']['en-us'] = "Database Add";
 $text['header-database-add']['es-cl'] = "Agregar Base de Datos";
@@ -199,6 +218,7 @@ $text['header-database-add']['pl'] = "Dodaj bazę danych";
 $text['header-database-add']['sv-se'] = "Lägg Till Databas";
 $text['header-database-add']['uk'] = "Додавання бази даних";
 $text['header-database-add']['de-at'] = "Datenbanken hinzufügen";
+$text['header-database-add']['ar-eg'] = "إضافة قاعدة بيانات";
 
 $text['description-username']['en-us'] = "Enter the database username.";
 $text['description-username']['es-cl'] = "Ingrese el nombre de usuario de la base de datos.";
@@ -209,6 +229,7 @@ $text['description-username']['pl'] = "Wprowadź nazwę użytkownika";
 $text['description-username']['sv-se'] = "Ange databasen användarnamn här.";
 $text['description-username']['uk'] = "Введіть ім’я користувача бази даних";
 $text['description-username']['de-at'] = "Geben Sie den Datenbank Benutzernamen an.";
+$text['description-username']['ar-eg'] = "أدخل اسم المستخدم هنا";
 
 $text['description-type']['en-us'] = "Select the database type.";
 $text['description-type']['es-cl'] = "Seleccione el tipo de base de datos";
@@ -219,6 +240,7 @@ $text['description-type']['pl'] = "Wprowadź rodzaj bazy danych";
 $text['description-type']['sv-se'] = "Välj databastyp";
 $text['description-type']['uk'] = "Виберіть тип бази даних";
 $text['description-type']['de-at'] = "Wählen Sie den Datenbank Typ.";
+$text['description-type']['ar-eg'] = "إختر نوع قاعدة البيانات";
 
 $text['description-port']['en-us'] = "Enter the port number.";
 $text['description-port']['es-cl'] = "Ingrese el número del puerto.";
@@ -229,6 +251,7 @@ $text['description-port']['pl'] = "Wprowadź numer portu";
 $text['description-port']['sv-se'] = "Ange portnummer";
 $text['description-port']['uk'] = "Введіть номер порта";
 $text['description-port']['de-at'] = "Geben Sie die Port Nummer an.";
+$text['description-port']['ar-eg'] = "أدخل رقم المنفذ";
 
 $text['description-path']['en-us'] = "Enter the database file path (SQLite only).";
 $text['description-path']['es-cl'] = "Ingrese la ruta al archivo de datos (solo SQLite).";
@@ -239,6 +262,7 @@ $text['description-path']['pl'] = "Wprowadź ścieżkę do pliku bazy danych (ty
 $text['description-path']['sv-se'] = "Ange databasens sökväg (gäller endast SQLite).";
 $text['description-path']['uk'] = "Вкажіть шлях до файлу бази даних (тільки SQLite).";
 $text['description-path']['de-at'] = "Geben Sie den Datenbank Pfad an (nur für SQLite).";
+$text['description-path']['ar-eg'] = "";
 
 $text['description-password']['en-us'] = "Enter the database password.";
 $text['description-password']['es-cl'] = "Ingrese la contraseña de la base de datos.";
@@ -249,6 +273,7 @@ $text['description-password']['pl'] = "Wpisz hasło";
 $text['description-password']['sv-se'] = "Ange databasens lösenord.";
 $text['description-password']['uk'] = "Введіть пароль бази даних.";
 $text['description-password']['de-at'] = "Geben Sie das Datenbank Passwort ein.";
+$text['description-password']['ar-eg'] = "أدخل الرقم السري الخاص بقاعدة البيانات";
 
 $text['description-name']['en-us'] = "Enter the database name.";
 $text['description-name']['es-cl'] = "Ingrese el nombre de la base de datos.";
@@ -259,6 +284,7 @@ $text['description-name']['pl'] = "Wprowadź nazwę bazy danych.";
 $text['description-name']['sv-se'] = "Ange databasens namn.";
 $text['description-name']['uk'] = "Введіть ім'я бази даних.";
 $text['description-name']['de-at'] = "Geben Sie den Namen der Datenbank an";
+$text['description-name']['ar-eg'] = "أدخل إسم قاعدة البيانات";
 
 $text['description-host']['en-us'] = "Enter the host name.";
 $text['description-host']['es-cl'] = "Ingrese el nombre de host";
@@ -269,6 +295,7 @@ $text['description-host']['pl'] = "Wprowadź nazwę hosta.";
 $text['description-host']['sv-se'] = "Ange värdnamnet";
 $text['description-host']['uk'] = "Введіть ім'я хоста.";
 $text['description-host']['de-at'] = "Geben Sie den Host Namen ein.";
+$text['description-host']['ar-eg'] = "أدخل إسم المضيف";
 
 $text['description-driver']['en-us'] = "Select the database driver.";
 $text['description-driver']['es-cl'] = "Seleccione un controlador de base de datos.";
@@ -279,6 +306,7 @@ $text['description-driver']['pl'] = "Wybierz sterownik bazy danych.";
 $text['description-driver']['sv-se'] = "Välj databas drivrutin.";
 $text['description-driver']['uk'] = "Виберіть драйвер бази даних.";
 $text['description-driver']['de-at'] = "Wählen Sie den Datenbank Treiber.";
+$text['description-driver']['ar-eg'] = "";
 
 $text['description-description']['en-us'] = "Enter a description for this database, if desired.";
 $text['description-description']['es-cl'] = "Ingrese una descripción para esta base de datos, opcional.";
@@ -289,6 +317,7 @@ $text['description-description']['pl'] = "Wprowadź opis  bazy danych (opcjonaln
 $text['description-description']['sv-se'] = "Fyll i en beskrivning för denna databas, om nödvändigt.";
 $text['description-description']['uk'] = "Введіть опис, якщо це необхідно.";
 $text['description-description']['de-at'] = "Falls gewünscht, geben Sie eine Beschreibung an.";
+$text['description-description']['ar-eg'] = "";
 
 $text['description-databases']['en-us'] = "Database information.";
 $text['description-databases']['es-cl'] = "Información de bases de datos.";
@@ -299,6 +328,7 @@ $text['description-databases']['pl'] = "Informacje o bazie danych.";
 $text['description-databases']['sv-se'] = "Databasinformation.";
 $text['description-databases']['uk'] = "Інформація про базу даних.";
 $text['description-databases']['de-at'] = "Datenbank Information.";
+$text['description-databases']['ar-eg'] = "بيانات قاعدة البيانات";
 
 $text['description-database-edit']['en-us'] = "Database connection information.";
 $text['description-database-edit']['es-cl'] = "Información de conexión a base de datos.";
@@ -309,6 +339,7 @@ $text['description-database-edit']['pl'] = "Informacje o połączeniach z bazą
 $text['description-database-edit']['sv-se'] = "Information om Databasanslutning";
 $text['description-database-edit']['uk'] = "інформація про підключення до бази даних.";
 $text['description-database-edit']['de-at'] = "Datenbank Verbindungs Information.";
+$text['description-database-edit']['ar-eg'] = "بيانات الإتصال الخاص بقاعدة البيانات";
 
 $text['description-database-add']['en-us'] = "Database connection information.";
 $text['description-database-add']['es-cl'] = "Información de conexión a base de datos.";
@@ -319,6 +350,7 @@ $text['description-database-add']['pl'] = "Informacje o połączeniach z bazą d
 $text['description-database-add']['sv-se'] = "Information om Databasanslutning";
 $text['description-database-add']['uk'] = "інформація про підключення до бази даних.";
 $text['description-database-add']['de-at'] = "Datenbank Verbindungs Information.";
+$text['description-database-add']['ar-eg'] = "بيانات الإتصال الخاص بقاعدة البيانات";
 
 $text['confirm-delete']['en-us'] = "Do you really want to delete this?";
 $text['confirm-delete']['es-cl'] = "¿Realmente desea eliminar esto?";
@@ -329,6 +361,7 @@ $text['confirm-delete']['pl'] = "Czy na pewno chcesz to usunąć?";
 $text['confirm-delete']['sv-se'] = "Vill du verkligen ta bort detta?";
 $text['confirm-delete']['uk'] = "Ви дійсно бажаєте це видалити?";
 $text['confirm-delete']['de-at'] = "Wollen Sie das wirklich löschen?";
+$text['confirm-delete']['ar-eg'] = "هل تريد حقا مسح هذا؟";
 
 $text['button-save']['en-us'] = "Save";
 $text['button-save']['es-cl'] = "Guardar";
@@ -339,6 +372,7 @@ $text['button-save']['pl'] = "Zachowaj";
 $text['button-save']['sv-se'] = "Spara";
 $text['button-save']['uk'] = "Зберегти";
 $text['button-save']['de-at'] = "Speichern";
+$text['button-save']['ar-eg'] = "حفظ";
 
 $text['button-edit']['en-us'] = "Edit";
 $text['button-edit']['es-cl'] = "Editar";
@@ -349,6 +383,7 @@ $text['button-edit']['pl'] = "Edytuj";
 $text['button-edit']['sv-se'] = "Editera";
 $text['button-edit']['uk'] = "Редагувати";
 $text['button-edit']['de-at'] = "Bearbeiten";
+$text['button-edit']['ar-eg'] = "تعديل";
 
 $text['button-delete']['en-us'] = "Delete";
 $text['button-delete']['es-cl'] = "Eliminar";
@@ -359,6 +394,7 @@ $text['button-delete']['pl'] = "Usuń";
 $text['button-delete']['sv-se'] = "Ta Bort";
 $text['button-delete']['uk'] = "Видалити";
 $text['button-delete']['de-at'] = "Löschen";
+$text['button-delete']['ar-eg'] = "مسح";
 
 $text['button-back']['en-us'] = "Back";
 $text['button-back']['es-cl'] = "Volver";
@@ -369,6 +405,7 @@ $text['button-back']['pl'] = "Wróć";
 $text['button-back']['sv-se'] = "Tillbaka";
 $text['button-back']['uk'] = "Назад";
 $text['button-back']['de-at'] = "Zurück";
+$text['button-back']['ar-eg'] = "رجوع";
 
 $text['button-add']['en-us'] = "Add";
 $text['button-add']['es-cl'] = "Agregar";
@@ -379,5 +416,6 @@ $text['button-add']['pl'] = "Dodaj";
 $text['button-add']['sv-se'] = "Lägg Till";
 $text['button-add']['uk'] = "Додати";
 $text['button-add']['de-at'] = "Hinzufügen";
+$text['button-add']['ar-eg'] = "اضافة";
 
 ?>

+ 1 - 0
core/databases/app_menu.php

@@ -9,6 +9,7 @@ $apps[$x]['menu'][0]['title']['pl'] = "Bazy danych";
 $apps[$x]['menu'][0]['title']['sv-se'] = "Databaser";
 $apps[$x]['menu'][0]['title']['uk'] = "Бази даних";
 $apps[$x]['menu'][0]['title']['de-at'] = "Datenbanken";
+$apps[$x]['menu'][0]['title']['ar-eg'] = "قواعد البيانات";
 $apps[$x]['menu'][0]['uuid'] = "ebbd754d-ca74-d5b1-a77e-9206ba3ecc3f";
 $apps[$x]['menu'][0]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
 $apps[$x]['menu'][0]['category'] = "internal";

+ 1 - 1
core/default_settings/default_setting_edit.php

@@ -297,7 +297,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
 		$theme_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes';
 		if ($handle = opendir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes')) {
 			while (false !== ($dir_name = readdir($handle))) {
-				if ($dir_name != "." && $dir_name != ".." && $dir_name != ".svn" && is_dir($theme_dir.'/'.$dir_name)) {
+				if ($dir_name != "." && $dir_name != ".." && $dir_name != ".svn" && $dir_name != ".git" && is_dir($theme_dir.'/'.$dir_name)) {
 					$dir_label = str_replace('_', ' ', $dir_name);
 					$dir_label = str_replace('-', ' ', $dir_label);
 					if ($dir_name == $default_setting_value) {

+ 1 - 1
core/domain_settings/domain_setting_edit.php

@@ -362,7 +362,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
 		$theme_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes';
 		if ($handle = opendir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes')) {
 			while (false !== ($dir_name = readdir($handle))) {
-				if ($dir_name != "." && $dir_name != ".." && $dir_name != ".svn" && is_dir($theme_dir.'/'.$dir_name)) {
+				if ($dir_name != "." && $dir_name != ".." && $dir_name != ".svn" && $dir_name != ".git" && is_dir($theme_dir.'/'.$dir_name)) {
 					$dir_label = str_replace('_', ' ', $dir_name);
 					$dir_label = str_replace('-', ' ', $dir_label);
 					if ($dir_name == $row['domain_setting_value']) {

+ 1 - 1
core/upgrade/app_config.php

@@ -20,7 +20,7 @@
 
 	//permission details
 		$y = 0;
-		$apps[$x]['permissions'][$y]['name'] = "upgrade_svn";
+		$apps[$x]['permissions'][$y]['name'] = "upgrade_source";
 		$apps[$x]['permissions'][$y]['menu']['uuid'] = "71051909-81ff-4301-9997-52b11206b3a6";
 		$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
 		$y++;

+ 108 - 113
core/upgrade/app_defaults.php

@@ -17,138 +17,133 @@
 
 	The Initial Developer of the Original Code is
 	Mark J Crane <[email protected]>
-	Portions created by the Initial Developer are Copyright (C) 2008-2012
+	Portions created by the Initial Developer are Copyright (C) 2008-2015
 	the Initial Developer. All Rights Reserved.
 
 	Contributor(s):
 	Mark J Crane <[email protected]>
 */
 
-if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
-	if ($domains_processed == 1) {
-		//if the resource scripts resource directory does not exist then create it
-			if (!is_dir($_SESSION['switch']['scripts']['dir']."/resources")) {
+
+if ($domains_processed == 1) {
+	//process if the scripts directory exists
+		if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
+			//if the resource scripts resource directory does not exist then create it
+				if (!is_dir($_SESSION['switch']['scripts']['dir']."/resources")) {
 					mkdir($_SESSION['switch']['scripts']['dir']."/resources",0755,true);
-			}
+				}
 
-		//copy the files and directories from resources/install
-			//require_once "resources/classes/install.php";
-			$install = new install;
-			$install->domain_uuid = $domain_uuid;
-			$install->domain_name = $domain;
-			//$install->switch_conf_dir = $_SESSION['switch']['conf']['dir'];
-			$install->switch_scripts_dir = $_SESSION['switch']['scripts']['dir'];
-			//$install->switch_sounds_dir = $_SESSION['switch']['sounds']['dir'];
-			$install->copy_scripts();
-			//$install->copy_sounds();
-			//print_r($install->result);
+			//copy the files and directories from resources/install
+				$install = new install;
+				$install->domain_uuid = $domain_uuid;
+				$install->switch_scripts_dir = $_SESSION['switch']['scripts']['dir'];
+				$install->copy_scripts();
+		}
 
-		//update the software table
-			$sql = "select count(*) as num_rows from v_software ";
-			$prep_statement = $db->prepare($sql);
-			if ($prep_statement) {
-				$prep_statement->execute();
-				$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
-				if ($row['num_rows'] == 0) {
-					$sql = "insert into v_software ";
-					$sql .= "(";
-					$sql .= "software_uuid, ";
-					$sql .= "software_name, ";
-					$sql .= "software_url, ";
-					$sql .= "software_version ";
-					$sql .= ")";
-					$sql .= "values ";
-					$sql .= "(";
-					$sql .= "'".uuid()."', ";
-					$sql .= "'FusionPBX', ";
-					$sql .= "'www.fusionpbx.com', ";
-					$sql .= "'".software_version()."' ";
-					$sql .= ")";
-					$db->exec(check_sql($sql));
-					unset($sql);
-				}
-				else {
-					$sql = "update v_software ";
-					$sql .= "set software_version = '".software_version()."' ";
-					$db->exec(check_sql($sql));
-					unset($sql);
-				}
-				unset($prep_statement, $row);
+	//update the software table
+		$sql = "select count(*) as num_rows from v_software ";
+		$prep_statement = $db->prepare($sql);
+		if ($prep_statement) {
+			$prep_statement->execute();
+			$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
+			if ($row['num_rows'] == 0) {
+				$sql = "insert into v_software ";
+				$sql .= "(";
+				$sql .= "software_uuid, ";
+				$sql .= "software_name, ";
+				$sql .= "software_url, ";
+				$sql .= "software_version ";
+				$sql .= ")";
+				$sql .= "values ";
+				$sql .= "(";
+				$sql .= "'".uuid()."', ";
+				$sql .= "'FusionPBX', ";
+				$sql .= "'www.fusionpbx.com', ";
+				$sql .= "'".software_version()."' ";
+				$sql .= ")";
+				$db->exec(check_sql($sql));
+				unset($sql);
 			}
+			else {
+				$sql = "update v_software ";
+				$sql .= "set software_version = '".software_version()."' ";
+				$db->exec(check_sql($sql));
+				unset($sql);
+			}
+			unset($prep_statement, $row);
+		}
 
-		//ensure the login message is set, if new message exists
-			$sql = "select count(*) as num_rows from v_default_settings ";
-			$sql .= "where default_setting_category = 'login' ";
-			$sql .= "and default_setting_subcategory = 'message' ";
-			$sql .= "and default_setting_name = 'text' ";
-			$prep_statement = $db->prepare($sql);
-			if ($prep_statement) {
-				$prep_statement->execute();
-				$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
-				unset($prep_statement);
-				if ($row['num_rows'] == 0) {
+	//ensure the login message is set, if new message exists
+		$sql = "select count(*) as num_rows from v_default_settings ";
+		$sql .= "where default_setting_category = 'login' ";
+		$sql .= "and default_setting_subcategory = 'message' ";
+		$sql .= "and default_setting_name = 'text' ";
+		$prep_statement = $db->prepare($sql);
+		if ($prep_statement) {
+			$prep_statement->execute();
+			$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
+			unset($prep_statement);
+			if ($row['num_rows'] == 0) {
 
-					// insert message
-					$sql = "insert into v_default_settings ";
-					$sql .= "(";
-					$sql .= "default_setting_uuid, ";
-					$sql .= "default_setting_category, ";
-					$sql .= "default_setting_subcategory, ";
-					$sql .= "default_setting_name, ";
-					$sql .= "default_setting_value, ";
-					$sql .= "default_setting_enabled, ";
-					$sql .= "default_setting_description ";
-					$sql .= ")";
-					$sql .= "values ";
-					$sql .= "(";
-					$sql .= "'".uuid()."', ";
-					$sql .= "'login', ";
-					$sql .= "'message', ";
-					$sql .= "'text', ";
-					$sql .= "'".$text['login-message_text']."', ";
-					$sql .= "'true', ";
-					$sql .= "'' ";
-					$sql .= ")";
-					$db->exec(check_sql($sql));
-					unset($sql);
+				// insert message
+				$sql = "insert into v_default_settings ";
+				$sql .= "(";
+				$sql .= "default_setting_uuid, ";
+				$sql .= "default_setting_category, ";
+				$sql .= "default_setting_subcategory, ";
+				$sql .= "default_setting_name, ";
+				$sql .= "default_setting_value, ";
+				$sql .= "default_setting_enabled, ";
+				$sql .= "default_setting_description ";
+				$sql .= ")";
+				$sql .= "values ";
+				$sql .= "(";
+				$sql .= "'".uuid()."', ";
+				$sql .= "'login', ";
+				$sql .= "'message', ";
+				$sql .= "'text', ";
+				$sql .= "'".$text['login-message_text']."', ";
+				$sql .= "'true', ";
+				$sql .= "'' ";
+				$sql .= ")";
+				$db->exec(check_sql($sql));
+				unset($sql);
 
-				}
-				else {
+			}
+			else {
 
-					// get current message value
-					$sql = "select default_setting_uuid, default_setting_value ";
-					$sql .= "from v_default_settings ";
-					$sql .= "where default_setting_category = 'login' ";
-					$sql .= "and default_setting_subcategory = 'message' ";
-					$sql .= "and default_setting_name = 'text' ";
-					$prep_statement = $db->prepare($sql);
-					if ($prep_statement) {
-						$prep_statement->execute();
-						$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
-						if (count($result) > 0) {
-							foreach($result as $row) {
-								$current_default_setting_uuid = $row["default_setting_uuid"];
-								$current_default_setting_value = $row["default_setting_value"];
-								break;
-							}
+				// get current message value
+				$sql = "select default_setting_uuid, default_setting_value ";
+				$sql .= "from v_default_settings ";
+				$sql .= "where default_setting_category = 'login' ";
+				$sql .= "and default_setting_subcategory = 'message' ";
+				$sql .= "and default_setting_name = 'text' ";
+				$prep_statement = $db->prepare($sql);
+				if ($prep_statement) {
+					$prep_statement->execute();
+					$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
+					if (count($result) > 0) {
+						foreach($result as $row) {
+							$current_default_setting_uuid = $row["default_setting_uuid"];
+							$current_default_setting_value = $row["default_setting_value"];
+							break;
+						}
 
-							// compare to message in language file, update and enable if different
-							$new_default_setting_value = str_replace("''", "'", $text['login-message_text']);
-							if ($current_default_setting_value != $new_default_setting_value) {
-								$sql = "update v_default_settings set ";
-								$sql .= "default_setting_value = '".$text['login-message_text']."', ";
-								$sql .= "default_setting_enabled = 'true' ";
-								$sql .= "where default_setting_uuid = '".$current_default_setting_uuid."' ";
-								$db->exec(check_sql($sql));
-								unset($sql);
-							}
+						// compare to message in language file, update and enable if different
+						$new_default_setting_value = str_replace("''", "'", $text['login-message_text']);
+						if ($current_default_setting_value != $new_default_setting_value) {
+							$sql = "update v_default_settings set ";
+							$sql .= "default_setting_value = '".$text['login-message_text']."', ";
+							$sql .= "default_setting_enabled = 'true' ";
+							$sql .= "where default_setting_uuid = '".$current_default_setting_uuid."' ";
+							$db->exec(check_sql($sql));
+							unset($sql);
 						}
-						unset($prep_statement, $result);
 					}
+					unset($prep_statement, $result);
 				}
 			}
-
-	}
+		}
 }
 
 ?>

+ 56 - 56
core/upgrade/app_languages.php

@@ -40,35 +40,35 @@ $text['option-false']['sv-se'] = "Falsk";
 $text['option-false']['uk'] = "Ні";
 $text['option-false']['de-at'] = "Aus";
 
-$text['message-upgrade_svn_scripts']['en-us'] = "Source Files and Scripts Updated";
-$text['message-upgrade_svn_scripts']['es-cl'] = "Fuente archivos actualizados";
-$text['message-upgrade_svn_scripts']['pt-pt'] = "Fonte arquivos atualizados";
-$text['message-upgrade_svn_scripts']['fr-fr'] = "Code source et scripts mis à jour";
-$text['message-upgrade_svn_scripts']['pt-br'] = "Fonte de arquivos atualizados";
-$text['message-upgrade_svn_scripts']['pl'] = "Aktualizacja plików źródłowych powiodła się";
-$text['message-upgrade_svn_scripts']['sv-se'] = "Källfiler Uppdaterade";
-$text['message-upgrade_svn_scripts']['uk'] = "Вихідні файли і сценарії оновлено";
-$text['message-upgrade_svn_scripts']['de-at'] = "Quellcode und Scripte aktualisieren";
-
-$text['message-upgrade_svn_failed']['en-us'] = "Source Files Update Failed - Please Run SVN Update Via Console";
-$text['message-upgrade_svn_failed']['es-cl'] = "Fuente actualización de archivos Error - Por favor, ejecuta svn update Vía Consola";
-$text['message-upgrade_svn_failed']['pt-pt'] = "Fonte Arquivos Update Failed - execute o SVN Atualização Via Console";
-$text['message-upgrade_svn_failed']['fr-fr'] = "La mise à jour du code source à échoué, Veuillez exécuter svn update depuis la console";
-$text['message-upgrade_svn_failed']['pt-br'] = "Fonte arquivos atualialização falhou - execute o SVN Atualização Via Console ";
-$text['message-upgrade_svn_failed']['pl'] = "Aktualizacja plików źródłowych nie powiodła się - użyj polecenia 'SVN Update' w konsoli.";
-$text['message-upgrade_svn_failed']['sv-se'] = "Källfiler Uppdatering misslyckades - Vänligen Kör SVN Update Via Console";
-$text['message-upgrade_svn_failed']['uk'] = "Помилка оновлення вихідних файлів - Запустіть оновлення з SVN в консолі";
-$text['message-upgrade_svn_failed']['de-at'] = "Quellcode Aktualisierung fehlgeschlagen - Bitte führen Sie SVN Update in der Konsole aus";
-
-$text['message-upgrade_svn']['en-us'] = "Source Files Updated";
-$text['message-upgrade_svn']['es-cl'] = "Fuente archivos actualizados";
-$text['message-upgrade_svn']['pt-pt'] = "Fonte arquivos atualizados";
-$text['message-upgrade_svn']['fr-fr'] = "Code source mis à jour";
-$text['message-upgrade_svn']['pt-br'] = "Fonte de arquivos atualizados";
-$text['message-upgrade_svn']['pl'] = "Aktualizacja plików źródłowych powiodła się";
-$text['message-upgrade_svn']['sv-se'] = "Källfiler Uppdaterade";
-$text['message-upgrade_svn']['uk'] = "Вихідні файли оновлено";
-$text['message-upgrade_svn']['de-at'] = "Quellcode aktualisiert";
+$text['message-upgrade_source_scripts']['en-us'] = "Source Files and Scripts Updated";
+$text['message-upgrade_source_scripts']['es-cl'] = "Fuente archivos actualizados";
+$text['message-upgrade_source_scripts']['pt-pt'] = "Fonte arquivos atualizados";
+$text['message-upgrade_source_scripts']['fr-fr'] = "Code source et scripts mis à jour";
+$text['message-upgrade_source_scripts']['pt-br'] = "Fonte de arquivos atualizados";
+$text['message-upgrade_source_scripts']['pl'] = "Aktualizacja plików źródłowych powiodła się";
+$text['message-upgrade_source_scripts']['sv-se'] = "Källfiler Uppdaterade";
+$text['message-upgrade_source_scripts']['uk'] = "Вихідні файли і сценарії оновлено";
+$text['message-upgrade_source_scripts']['de-at'] = "Quellcode und Scripte aktualisieren";
+
+$text['message-upgrade_source_failed']['en-us'] = "Source Files Update Failed";
+$text['message-upgrade_source_failed']['es-cl'] = "Fuente actualización de archivos Error";
+$text['message-upgrade_source_failed']['pt-pt'] = "Fonte Arquivos Update Failed";
+$text['message-upgrade_source_failed']['fr-fr'] = "La mise à jour du code source à échoué";
+$text['message-upgrade_source_failed']['pt-br'] = "Fonte arquivos atualialização falhou";
+$text['message-upgrade_source_failed']['pl'] = "Aktualizacja plików źródłowych nie powiodła się.";
+$text['message-upgrade_source_failed']['sv-se'] = "Källfiler Uppdatering misslyckades";
+$text['message-upgrade_source_failed']['uk'] = "Помилка оновлення вихідних файлів";
+$text['message-upgrade_source_failed']['de-at'] = "Quellcode Aktualisierung fehlgeschlagen";
+
+$text['message-upgrade_source']['en-us'] = "Source Files Updated";
+$text['message-upgrade_source']['es-cl'] = "Fuente archivos actualizados";
+$text['message-upgrade_source']['pt-pt'] = "Fonte arquivos atualizados";
+$text['message-upgrade_source']['fr-fr'] = "Code source mis à jour";
+$text['message-upgrade_source']['pt-br'] = "Fonte de arquivos atualizados";
+$text['message-upgrade_source']['pl'] = "Aktualizacja plików źródłowych powiodła się";
+$text['message-upgrade_source']['sv-se'] = "Källfiler Uppdaterade";
+$text['message-upgrade_source']['uk'] = "Вихідні файли оновлено";
+$text['message-upgrade_source']['de-at'] = "Quellcode aktualisiert";
 
 $text['message-upgrade_schema']['en-us'] = "Schema Verified";
 $text['message-upgrade_schema']['es-cl'] = "Esquema Verified";
@@ -120,15 +120,15 @@ $text['login-message_text']['sv-se'] = "Håll dig uppdaterad med de FusionPBX pr
 $text['login-message_text']['uk'] = "Keep up with the FusionPBX project by configuring your preferences in the newly added Notifications section, under the System menu! ";
 $text['login-message_text']['de-at'] = "Halten Sie sich auf dem Laufenden über FusionPBX indem Sie die Benachrichtigungseinstellungen im System Menü setzen.";
 
-$text['label-upgrade_svn']['en-us'] = "Source Code";
-$text['label-upgrade_svn']['es-cl'] = "Código Fuente";
-$text['label-upgrade_svn']['pt-pt'] = "Source Code";
-$text['label-upgrade_svn']['fr-fr'] = "Code Source";
-$text['label-upgrade_svn']['pt-br'] = "Source Code";
-$text['label-upgrade_svn']['pl'] = "Kod źródłowy";
-$text['label-upgrade_svn']['sv-se'] = "Källkod";
-$text['label-upgrade_svn']['uk'] = "Вихідний код";
-$text['label-upgrade_svn']['de-at'] = "Quellcode";
+$text['label-upgrade_source']['en-us'] = "Source Code";
+$text['label-upgrade_source']['es-cl'] = "Código Fuente";
+$text['label-upgrade_source']['pt-pt'] = "Source Code";
+$text['label-upgrade_source']['fr-fr'] = "Code Source";
+$text['label-upgrade_source']['pt-br'] = "Source Code";
+$text['label-upgrade_source']['pl'] = "Kod źródłowy";
+$text['label-upgrade_source']['sv-se'] = "Källkod";
+$text['label-upgrade_source']['uk'] = "Вихідний код";
+$text['label-upgrade_source']['de-at'] = "Quellcode";
 
 $text['label-upgrade_schema']['en-us'] = "Schema";
 $text['label-upgrade_schema']['es-cl'] = "Esquema";
@@ -300,15 +300,15 @@ $text['header-upgrade']['sv-se'] = "Uppgradera";
 $text['header-upgrade']['uk'] = "Оновлення";
 $text['header-upgrade']['de-at'] = "Aktualisieren";
 
-$text['header-svn_update_results']['en-us'] = "SVN Results";
-$text['header-svn_update_results']['es-cl'] = "SVN Respuesta";
-$text['header-svn_update_results']['pt-pt'] = "SVN Response";
-$text['header-svn_update_results']['fr-fr'] = "Résultats SVN";
-$text['header-svn_update_results']['pt-br'] = "Resposta do SVN ";
-$text['header-svn_update_results']['pl'] = "Rezultat SVN";
-$text['header-svn_update_results']['sv-se'] = "SVN Resultat";
-$text['header-svn_update_results']['uk'] = "Результати з SVN";
-$text['header-svn_update_results']['de-at'] = "SVN Ergebnisse";
+$text['header-source_update_results']['en-us'] = "Results";
+$text['header-source_update_results']['es-cl'] = "Respuesta";
+$text['header-source_update_results']['pt-pt'] = "Response";
+$text['header-source_update_results']['fr-fr'] = "Résultats";
+$text['header-source_update_results']['pt-br'] = "Resposta";
+$text['header-source_update_results']['pl'] = "Rezultat";
+$text['header-source_update_results']['sv-se'] = "Resultat";
+$text['header-source_update_results']['uk'] = "Результати";
+$text['header-source_update_results']['de-at'] = "Ergebnisse";
 
 $text['header-message']['en-us'] = "Message";
 $text['header-message']['es-cl'] = "Mensaje";
@@ -330,15 +330,15 @@ $text['header-database_type']['sv-se'] = "Databas Typ";
 $text['header-database_type']['uk'] = "Тип бази даних";
 $text['header-database_type']['de-at'] = "Datenbank Typ";
 
-$text['description-upgrade_svn']['en-us'] = "Updates FusionPBX source files from the respository.";
-$text['description-upgrade_svn']['es-cl'] = "Archivos de origen Actualizaciones FusionPBX del repositorio.";
-$text['description-upgrade_svn']['pt-pt'] = "Arquivos de origem Atualizações FusionPBX do repositório.";
-$text['description-upgrade_svn']['fr-fr'] = "Mise à jour du code source de FusionPBX depuis le dépôt.";
-$text['description-upgrade_svn']['pt-br'] = "Arquivos de atualização";
-$text['description-upgrade_svn']['pl'] = "Uaktualnia pliki źródłowe FusionPBX z przechowalni.";
-$text['description-upgrade_svn']['sv-se'] = "Uppdaterar FusionPBX källfiler från respository.";
-$text['description-upgrade_svn']['uk'] = "Оновлення вихідних файлів  FusionPBX з репозиторію Subversion .";
-$text['description-upgrade_svn']['de-at'] = "Aktualisiert den FusionPBX Quellcode aus dem Repository";
+$text['description-upgrade_source']['en-us'] = "Updates FusionPBX source files from the respository.";
+$text['description-upgrade_source']['es-cl'] = "Archivos de origen Actualizaciones FusionPBX del repositorio.";
+$text['description-upgrade_source']['pt-pt'] = "Arquivos de origem Atualizações FusionPBX do repositório.";
+$text['description-upgrade_source']['fr-fr'] = "Mise à jour du code source de FusionPBX depuis le dépôt.";
+$text['description-upgrade_source']['pt-br'] = "Arquivos de atualização";
+$text['description-upgrade_source']['pl'] = "Uaktualnia pliki źródłowe FusionPBX z przechowalni.";
+$text['description-upgrade_source']['sv-se'] = "Uppdaterar FusionPBX källfiler från respository.";
+$text['description-upgrade_source']['uk'] = "Оновлення вихідних файлів  FusionPBX з репозиторію Subversion .";
+$text['description-upgrade_source']['de-at'] = "Aktualisiert den FusionPBX Quellcode aus dem Repository";
 
 $text['description-upgrade_schema']['en-us'] = "Checks to ensure table and field integrity in the database.";
 $text['description-upgrade_schema']['es-cl'] = "Los cheques para asegurar mesa y campo de integridad en la base de datos.";

+ 31 - 40
core/upgrade/index.php

@@ -17,7 +17,7 @@
 
 	The Initial Developer of the Original Code is
 	Mark J Crane <[email protected]>
-	Portions created by the Initial Developer are Copyright (C) 2008-2012
+	Portions created by the Initial Developer are Copyright (C) 2008-2015
 	the Initial Developer. All Rights Reserved.
 
 	Contributor(s):
@@ -32,7 +32,7 @@ require_once "resources/check_auth.php";
 
 //check the permission
 if (
-	!permission_exists('upgrade_svn') &&
+	!permission_exists('upgrade_source') &&
 	!permission_exists('upgrade_schema') &&
 	!permission_exists('upgrade_apps') &&
 	!permission_exists('menu_restore') &&
@@ -50,15 +50,15 @@ if (sizeof($_POST) > 0) {
 
 	$do = $_POST['do'];
 
-	// run svn update
-	if ($do["svn"] && permission_exists("upgrade_svn") && !is_dir("/usr/share/examples/fusionpbx")) {
-		$cmd = "svn up /var/www/fusionpbx";
-		exec($cmd, $response_svn_update);
+	// run source update
+	if ($do["source"] && permission_exists("upgrade_source") && !is_dir("/usr/share/examples/fusionpbx")) {
+		chdir("/var/www/fusionpbx/");
+		exec("git pull", $response_source_update);
 		$update_failed = true;
-		if (sizeof($response_svn_update) > 0) {
-			$_SESSION["response_svn_update"] = $response_svn_update;
-			foreach ($response_svn_update as $response_line) {
-				if (substr_count($response_line, "Updated to revision") > 0 || substr_count($response_line, "At revision") > 0) {
+		if (sizeof($response_source_update) > 0) {
+			$_SESSION["response_source_update"] = $response_source_update;
+			foreach ($response_source_update as $response_line) {
+				if (substr_count($response_line, "Updating ") > 0 || substr_count($response_line, "Already up-to-date.") > 0) {
 					$update_failed = false;
 				}
 			}
@@ -66,31 +66,22 @@ if (sizeof($_POST) > 0) {
 		if ($update_failed) {
 			$_SESSION["message_delay"] = 3500;
 			$_SESSION["message_mood"] = 'negative';
-			$response_message = $text['message-upgrade_svn_failed'];
+			$response_message = $text['message-upgrade_source_failed'];
 		}
 		else {
 			//update scripts folder, if allowed (default)
-				if ($_SESSION['switch']['scripts_update']['boolean'] != 'false' && $_SESSION['switch']['scripts']['dir'] != '') {
-					$scripts_dir_target = $_SESSION['switch']['scripts']['dir'];
-					$scripts_dir_source = realpath($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/install/scripts');
-					foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($scripts_dir_source)) as $file_path_source) {
-						if (
-							substr_count($file_path_source, '/..') == 0 &&
-							substr_count($file_path_source, '/.') == 0 &&
-							substr_count($file_path_source, '/.svn') == 0
-							) {
-							$file_path_target = str_replace($scripts_dir_source, $scripts_dir_target, $file_path_source);
-							if ($file_path_target != $scripts_dir_target.'/resources/config.lua') {
-								//echo $file_path_source.' ---> '.$file_path_target.'<br>';
-								copy($file_path_source, $file_path_target);
-								chmod($file_path_target, 0755);
-							}
-						}
-					}
-					$response_message = $text['message-upgrade_svn_scripts'];
+				if ($_SESSION['switch']['scripts']['dir'] != '') {
+					//copy the files and directories from resources/install
+						$install = new install;
+						$install->domain_uuid = $domain_uuid;
+						$install->switch_scripts_dir = $_SESSION['switch']['scripts']['dir'];
+						$install->copy_scripts();
+					//set the message
+						$response_message = $text['message-upgrade_source_scripts'];
 				}
 				else {
-					$response_message = $text['message-upgrade_svn'];
+					//set the message
+						$response_message = $text['message-upgrade_source'];
 				}
 		}
 	}
@@ -153,16 +144,16 @@ echo "<br><br>";
 
 echo "<form name='frm' method='post' action=''>\n";
 
-if (permission_exists("upgrade_svn") && !is_dir("/usr/share/examples/fusionpbx")) {
+if (permission_exists("upgrade_source") && !is_dir("/usr/share/examples/fusionpbx")) {
 	echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
 	echo "<tr>\n";
 	echo "	<td width='30%' class='vncell'>\n";
-	echo "		".$text['label-upgrade_svn'];
+	echo "		".$text['label-upgrade_source'];
 	echo "	</td>\n";
 	echo "	<td width='70%' class='vtable' style='height: 50px;'>\n";
-	echo "		<label for='do_svn'>";
-	echo "			<input type='checkbox' class='formfld' name='do[svn]' id='do_svn' value='1'>";
-	echo "			".$text['description-upgrade_svn'];
+	echo "		<label for='do_source'>";
+	echo "			<input type='checkbox' class='formfld' name='do[source]' id='do_source' value='1'>";
+	echo "			".$text['description-upgrade_source'];
 	echo "		</label>\n";
 	echo "	</td>\n";
 	echo "</tr>\n";
@@ -267,16 +258,16 @@ echo "<br><br>";
 echo "</form>\n";
 
 
-// output result of svn update
-if (sizeof($_SESSION["response_svn_update"]) > 0) {
+// output result of source update
+if (sizeof($_SESSION["response_source_update"]) > 0) {
 	echo "<br />";
-	echo "<b>".$text['header-svn_update_results']."</b>";
+	echo "<b>".$text['header-source_update_results']."</b>";
 	echo "<br /><br />";
 	echo "<pre>";
-	echo implode("\n", $_SESSION["response_svn_update"]);
+	echo implode("\n", $_SESSION["response_source_update"]);
 	echo "</pre>";
 	echo "<br /><br />";
-	unset($_SESSION["response_svn_update"]);
+	unset($_SESSION["response_source_update"]);
 }
 
 

+ 1 - 1
core/upgrade/upgrade.php

@@ -38,7 +38,7 @@
 		include "root.php";
 		require_once "resources/require.php";
 		require_once "resources/check_auth.php";
-		if (permission_exists('upgrade_schema') || permission_exists('upgrade_svn') || if_group("superadmin")) {
+		if (permission_exists('upgrade_schema') || permission_exists('upgrade_source') || if_group("superadmin")) {
 			//echo "access granted";
 		}
 		else {

+ 26 - 9
resources/classes/install.php

@@ -17,7 +17,7 @@
 
 	The Initial Developer of the Original Code is
 	Mark J Crane <[email protected]>
-	Copyright (C) 2010-2014
+	Copyright (C) 2010-2015
 	All Rights Reserved.
 
 	Contributor(s):
@@ -35,16 +35,18 @@ include "root.php";
 		var $switch_scripts_dir;
 		var $switch_sounds_dir;
 
-		//$option '-n' --no-clobber
-		public function recursive_copy($src, $dst, $option = '') {
+		//$options '-n' --no-clobber
+		public function recursive_copy($src, $dst, $options = '') {
 			if (file_exists('/bin/cp')) {
 				if (strtoupper(substr(PHP_OS, 0, 3)) === 'SUN') {
 					//copy -R recursive, preserve attributes for SUN
-					exec ('cp -Rp '.$src.'/* '.$dst);
+					$cmd = 'cp -Rp '.$src.'/* '.$dst;
 				} else {
 					//copy -R recursive, -L follow symbolic links, -p preserve attributes for other Posix systemss
-					exec ('cp -RLp '.$option.' '.$src.'/* '.$dst);
+					$cmd = 'cp -RLp '.$options.' '.$src.'/* '.$dst;
 				}
+				exec ($cmd);
+				//echo $cmd."\n";
 			}
 			else {
 				$dir = opendir($src);
@@ -58,6 +60,23 @@ include "root.php";
 						throw new Exception("recursive_copy() failed to create destination directory '".$dst."'");
 					}
 				}
+				$scripts_dir_target = $_SESSION['switch']['scripts']['dir'];
+				$scripts_dir_source = realpath($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/install/scripts');
+				foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($src)) as $file_path_source) {
+					if (
+					substr_count($file_path_source, '/..') == 0 &&
+					substr_count($file_path_source, '/.') == 0 &&
+					substr_count($file_path_source, '/.svn') == 0 &&
+					substr_count($file_path_source, '/.git') == 0
+					) {
+						if ($dst != $src.'/resources/config.lua') {
+							//echo $file_path_source.' ---> '.$dst.'<br>';
+							copy($file_path_source, $dst);
+							chmod($dst, 0755);
+						}
+					}
+				}
+
 				while(false !== ($file = readdir($dir))) {
 					if (($file != '.') && ($file != '..')) {
 						if (is_dir($src.'/'.$file)) {
@@ -65,7 +84,7 @@ include "root.php";
 						}
 						else {
 							//copy only missing files -n --no-clobber
-								if ($option == '-n') {
+								if (strpos($options,'-n') !== false) {
 									if (!file_exists($dst.'/'.$file)) {
 										copy($src.'/'.$file, $dst.'/'.$file);
 										//echo "copy(".$src."/".$file.", ".$dst."/".$file.");<br />\n";
@@ -126,12 +145,10 @@ include "root.php";
 						}
 					}
 				//copy resources/templates/conf to the freeswitch conf dir
-				// added /examples/ into the string
 					if (file_exists('/usr/share/examples/fusionpbx/resources/templates/conf')){
 						$src_dir = "/usr/share/examples/fusionpbx/resources/templates/conf";
 					}
 					else {
-						
 						$src_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/conf";
 					}
 					$dst_dir = $this->switch_conf_dir;
@@ -152,7 +169,7 @@ include "root.php";
 				}
 				$dst_dir = $this->switch_scripts_dir;
 				if (is_readable($this->switch_scripts_dir)) {
-					$this->recursive_copy($src_dir, $dst_dir, "-n");
+					$this->recursive_copy($src_dir, $dst_dir, $_SESSION['scripts']['options']['text']);
 					unset($src_dir, $dst_dir);
 				}
 				chmod($dst_dir, 0774);

+ 3 - 2
resources/functions.php

@@ -1038,8 +1038,9 @@ function number_pad($number,$n) {
 				if ($file != '.' && $file != '..') {
 					$newpath = $dir.'/'.$file;
 					$level = explode('/',$newpath);
-					if (substr($newpath, -4) == ".svn") {
-						//ignore .svn dir and subdir
+					if (substr($newpath, -4) == ".svn" ||
+						substr($newpath, -4) == ".git") {
+						//ignore .svn and .git dir and subdir
 					}
 					else {
 						if (is_dir($newpath)) { //directories

+ 28 - 14
resources/install.php

@@ -47,17 +47,10 @@ require_once "resources/functions.php";
 //set the default time zone
 	date_default_timezone_set('UTC');
 
-//get the domain
-	$domain_array = explode(":", $_SERVER["HTTP_HOST"]);
-	$domain_name = $domain_array[0];
-
 //if the config file exists then disable the install page
 	$config_exists = false;
 	if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
 		$config_exists = true;
-	} elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
-		//original directory
-		$config_exists = true;
 	} elseif (file_exists("/etc/fusionpbx/config.php")) {
 		//linux
 		$config_exists = true;
@@ -86,6 +79,7 @@ require_once "resources/functions.php";
 	$db_host = $_POST["db_host"];
 	$db_port = $_POST["db_port"];
 	$db_name = $_POST["db_name"];
+	$domain_name = $_POST["domain_name"];
 	$db_username = $_POST["db_username"];
 	$db_password = $_POST["db_password"];
 	$db_create_username = $_POST["db_create_username"];
@@ -98,6 +92,12 @@ require_once "resources/functions.php";
 	$install_default_country = $_POST["install_default_country"];
 	$install_template_name = $_POST["install_template_name"];
 
+	if(!$domain_name){
+	//get the domain
+		$domain_array = explode(":", $_SERVER["HTTP_HOST"]);
+		$domain_name = $domain_array[0];
+	}
+
 //clean up the values
 	if (strlen($install_switch_base_dir) > 0) {
 		$install_switch_base_dir = realpath($install_switch_base_dir);
@@ -813,7 +813,7 @@ if ($_POST["install_step"] == "3" && count($_POST) > 0 && strlen($_POST["persist
 				else {
 					$filename = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/install/sql/mysql.sql';
 				}
-					$file_contents = file_get_contents($filename);
+				$file_contents = file_get_contents($filename);
 
 				//replace \r\n with \n then explode on \n
 					$file_contents = str_replace("\r\n", "\n", $file_contents);
@@ -883,7 +883,7 @@ if ($_POST["install_step"] == "3" && count($_POST) > 0 && strlen($_POST["persist
 		$tmp[$x]['subcategory'] = 'time_zone';
 		$tmp[$x]['enabled'] = 'true';
 		$x++;
-                $tmp[$x]['name'] = 'code';
+        $tmp[$x]['name'] = 'code';
 		$tmp[$x]['value'] = 'en-us';
 		$tmp[$x]['category'] = 'domain';
 		$tmp[$x]['subcategory'] = 'language';
@@ -953,19 +953,19 @@ if ($_POST["install_step"] == "3" && count($_POST) > 0 && strlen($_POST["persist
 		$tmp[$x]['value'] = $switch_extensions_dir;
 		$tmp[$x]['category'] = 'switch';
 		$tmp[$x]['subcategory'] = 'extensions';
-		$tmp[$x]['enabled'] = 'true';
+		$tmp[$x]['enabled'] = 'false';
 		$x++;
 		$tmp[$x]['name'] = 'dir';
 		$tmp[$x]['value'] = $switch_sip_profiles_dir;
 		$tmp[$x]['category'] = 'switch';
 		$tmp[$x]['subcategory'] = 'sip_profiles';
-		$tmp[$x]['enabled'] = 'true';
+		$tmp[$x]['enabled'] = 'false';
 		$x++;
 		$tmp[$x]['name'] = 'dir';
 		$tmp[$x]['value'] = $switch_dialplan_dir;
 		$tmp[$x]['category'] = 'switch';
 		$tmp[$x]['subcategory'] = 'dialplan';
-		$tmp[$x]['enabled'] = 'true';
+		$tmp[$x]['enabled'] = 'false';
 		$x++;
 		$tmp[$x]['name'] = 'dir';
 		$tmp[$x]['value'] = $switch_mod_dir;
@@ -1236,7 +1236,7 @@ if ($_POST["install_step"] == "3" && count($_POST) > 0 && strlen($_POST["persist
 		$db->exec(check_sql($sql));
 		unset($sql);
 
-		//add the menu items
+	//add the menu items
 		require_once "resources/classes/menu.php";
 		$menu = new menu;
 		$menu->db = $db;
@@ -1745,7 +1745,7 @@ EOL;
 			$theme_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes';
 			if ($handle = opendir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes')) {
 				while (false !== ($dir_name = readdir($handle))) {
-					if ($dir_name != "." && $dir_name != ".." && $dir_name != ".svn" && is_readable($theme_dir.'/'.$dir_name)) {
+					if ($dir_name != "." && $dir_name != ".." && $dir_name != ".svn" && $dir_name != ".git" && is_readable($theme_dir.'/'.$dir_name)) {
 						$dir_label = str_replace('_', ' ', $dir_name);
 						$dir_label = str_replace('-', ' ', $dir_label);
 						if ($dir_name == $install_template_name) {
@@ -1764,6 +1764,17 @@ EOL;
 		echo "	</td>\n";
 		echo "	</tr>\n";
 
+		echo "<tr>\n";
+		echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
+		echo "		Domain name\n";
+		echo "</td>\n";
+		echo "<td class='vtable' align='left'>\n";
+		echo "		<input class='formfld' type='text' name='domain_name' maxlength='255' value=\"$domain_name\"><br />\n";
+		echo "		Enter the default domain name. \n";
+		echo "\n";
+		echo "</td>\n";
+		echo "</tr>\n";
+
 		echo "	<tr>\n";
 		echo "		<td colspan='2' align='right'>\n";
 		echo "			<input type='hidden' name='install_switch_base_dir' value='$install_switch_base_dir'>\n";
@@ -1816,6 +1827,7 @@ EOL;
 		echo "			<input type='hidden' name='db_type' value='$db_type'>\n";
 		echo "			<input type='hidden' name='admin_username' value='$admin_username'>\n";
 		echo "			<input type='hidden' name='admin_password' value='$admin_password'>\n";
+		echo "			<input type='hidden' name='domain_name' value='$domain_name'>\n";
 		echo "			<input type='hidden' name='install_switch_base_dir' value='$install_switch_base_dir'>\n";
 		echo "			<input type='hidden' name='install_tmp_dir' value='$install_tmp_dir'>\n";
 		echo "			<input type='hidden' name='install_backup_dir' value='$install_backup_dir'>\n";
@@ -1931,6 +1943,7 @@ EOL;
 		echo "			<input type='hidden' name='db_type' value='$db_type'>\n";
 		echo "			<input type='hidden' name='admin_username' value='$admin_username'>\n";
 		echo "			<input type='hidden' name='admin_password' value='$admin_password'>\n";
+		echo "			<input type='hidden' name='domain_name' value='$domain_name'>\n";
 		echo "			<input type='hidden' name='install_switch_base_dir' value='$install_switch_base_dir'>\n";
 		echo "			<input type='hidden' name='install_tmp_dir' value='$install_tmp_dir'>\n";
 		echo "			<input type='hidden' name='install_backup_dir' value='$install_backup_dir'>\n";
@@ -2044,6 +2057,7 @@ EOL;
 		echo "			<input type='hidden' name='db_type' value='$db_type'>\n";
 		echo "			<input type='hidden' name='admin_username' value='$admin_username'>\n";
 		echo "			<input type='hidden' name='admin_password' value='$admin_password'>\n";
+		echo "			<input type='hidden' name='domain_name' value='$domain_name'>\n";
 		echo "			<input type='hidden' name='install_switch_base_dir' value='$install_switch_base_dir'>\n";
 		echo "			<input type='hidden' name='install_tmp_dir' value='$install_tmp_dir'>\n";
 		echo "			<input type='hidden' name='install_backup_dir' value='$install_backup_dir'>\n";

+ 1 - 1
resources/templates/engine/smarty/sysplugins/smarty_internal_cacheresource_file.php

@@ -180,7 +180,7 @@
                 $_cacheDirs = new RecursiveDirectoryIterator($_dir);
                 $_cache = new RecursiveIteratorIterator($_cacheDirs, RecursiveIteratorIterator::CHILD_FIRST);
                 foreach ($_cache as $_file) {
-                    if (substr(basename($_file->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false) continue;
+                    if (substr(basename($_file->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false || strpos($_file, '.git') !== false) continue;
                     // directory ?
                     if ($_file->isDir()) {
                         if (!$_cache->isDot()) {

+ 3 - 4
resources/templates/engine/smarty/sysplugins/smarty_internal_utility.php

@@ -72,7 +72,7 @@ class Smarty_Internal_Utility
             $_compile = new RecursiveIteratorIterator($_compileDirs);
             foreach ($_compile as $_fileinfo) {
                 $_file = $_fileinfo->getFilename();
-                if (substr(basename($_fileinfo->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false) continue;
+                if (substr(basename($_fileinfo->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false || strpos($_file, '.git') !== false) continue;
                 if (!substr_compare($_file, $extension, - strlen($extension)) == 0) continue;
                 if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {
                    $_template_file = $_file;
@@ -136,7 +136,7 @@ class Smarty_Internal_Utility
             $_compile = new RecursiveIteratorIterator($_compileDirs);
             foreach ($_compile as $_fileinfo) {
                 $_file = $_fileinfo->getFilename();
-                if (substr(basename($_fileinfo->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false) continue;
+                if (substr(basename($_fileinfo->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false || strpos($_file, '.git') !== false) continue;
                 if (!substr_compare($_file, $extension, - strlen($extension)) == 0) continue;
                 if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {
                     $_config_file = $_file;
@@ -230,8 +230,7 @@ class Smarty_Internal_Utility
         }
         $_compile = new RecursiveIteratorIterator($_compileDirs, RecursiveIteratorIterator::CHILD_FIRST);
         foreach ($_compile as $_file) {
-            if (substr(basename($_file->getPathname()), 0, 1) == '.' || strpos($_file, '.svn') !== false)
-                continue;
+            if (substr(basename($_file->getPathname()), 0, 1) == '.' || strpos($_file, '.svn') !== false || strpos($_file, '.git') !== false) continue;
 
             $_filepath = (string) $_file;
 

+ 3 - 2
themes/default/template.php

@@ -694,8 +694,9 @@ if (strlen($_SESSION['message']) > 0) {
 			if ($file != "." AND $file != ".."){
 				$new_path = $dir.'/'.$file;
 				$level = explode('/',$new_path);
-				if (substr($new_path, -4) == ".svn") {
-					//ignore .svn dir and subdir
+				if (substr($new_path, -4) == ".svn" ||
+					substr($new_path, -4) == ".git") {
+					//ignore .svn and .git dir and subdir
 				}
 				elseif (substr($new_path, -3) == ".db") {
 					//ignore .db files