From e24526fb923846233e75775b6cb12dbd64352d13 Mon Sep 17 00:00:00 2001 From: reliberate Date: Thu, 2 Jul 2015 17:25:41 -0600 Subject: [PATCH 1/8] Upgrade: Converted Advanced > Upgrade to use Git instead of SVN (untested). Misc: Added provisions elsewhere to account for .git/* files, as currently done with .svn/* files. --- app/edit/filelist.php | 9 +- app/provision/resources/classes/provision.php | 5 +- .../default_settings/default_setting_edit.php | 2 +- core/domain_settings/domain_setting_edit.php | 2 +- core/upgrade/app_config.php | 2 +- core/upgrade/app_languages.php | 108 +++++++++--------- core/upgrade/index.php | 45 ++++---- core/upgrade/upgrade.php | 2 +- resources/functions.php | 5 +- resources/install.php | 2 +- .../smarty_internal_cacheresource_file.php | 2 +- .../sysplugins/smarty_internal_utility.php | 7 +- themes/default/template.php | 5 +- 13 files changed, 100 insertions(+), 96 deletions(-) diff --git a/app/edit/filelist.php b/app/edit/filelist.php index 4b9dde2da0..619a17ed5b 100644 --- a/app/edit/filelist.php +++ b/app/edit/filelist.php @@ -55,12 +55,13 @@ else { $htmlfilelist = ''; $dirlist = opendir($dir); $dir_array = array(); - while (false !== ($file = readdir($dirlist))) { + while (false !== ($file = readdir($dirlist))) { if ($file != "." AND $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 } elseif (substr($newpath, -3) == ".db") { //ignore .db files @@ -243,7 +244,7 @@ if ($_SESSION["app"]["edit"]["dir"] == "grammar") { echo recur_dir($_SESSION['switch']['grammar']['dir']); } if ($_SESSION["app"]["edit"]["dir"] == "provision") { - + switch (PHP_OS) { case "Linux": if (file_exists('/etc/fusionpbx/resources/templates/provision')) { diff --git a/app/provision/resources/classes/provision.php b/app/provision/resources/classes/provision.php index cfc27e55e9..cacdc02a71 100644 --- a/app/provision/resources/classes/provision.php +++ b/app/provision/resources/classes/provision.php @@ -793,8 +793,9 @@ include "root.php"; 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 diff --git a/core/default_settings/default_setting_edit.php b/core/default_settings/default_setting_edit.php index 1c6c3be664..c7d6b4b27f 100644 --- a/core/default_settings/default_setting_edit.php +++ b/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) { diff --git a/core/domain_settings/domain_setting_edit.php b/core/domain_settings/domain_setting_edit.php index c89ce615a7..d3d07bbf39 100644 --- a/core/domain_settings/domain_setting_edit.php +++ b/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']) { diff --git a/core/upgrade/app_config.php b/core/upgrade/app_config.php index c244ef1a27..effd5308f4 100644 --- a/core/upgrade/app_config.php +++ b/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++; diff --git a/core/upgrade/app_languages.php b/core/upgrade/app_languages.php index af9ec7ed4e..b7d735eced 100644 --- a/core/upgrade/app_languages.php +++ b/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_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_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_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_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']['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."; diff --git a/core/upgrade/index.php b/core/upgrade/index.php index 2e29760fdc..6f85965814 100644 --- a/core/upgrade/index.php +++ b/core/upgrade/index.php @@ -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,14 +50,14 @@ 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 (sizeof($response_source_update) > 0) { + $_SESSION["response_source_update"] = $response_source_update; + foreach ($response_source_update as $response_line) { if (substr_count($response_line, "Updated to revision") > 0 || substr_count($response_line, "At revision") > 0) { $update_failed = false; } @@ -66,7 +66,7 @@ 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) @@ -77,7 +77,8 @@ if (sizeof($_POST) > 0) { 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, '/.svn') == 0 && + substr_count($file_path_source, '/.git') == 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') { @@ -87,10 +88,10 @@ if (sizeof($_POST) > 0) { } } } - $response_message = $text['message-upgrade_svn_scripts']; + $response_message = $text['message-upgrade_source_scripts']; } else { - $response_message = $text['message-upgrade_svn']; + $response_message = $text['message-upgrade_source']; } } } @@ -153,16 +154,16 @@ echo "

"; echo "
\n"; -if (permission_exists("upgrade_svn") && !is_dir("/usr/share/examples/fusionpbx")) { +if (permission_exists("upgrade_source") && !is_dir("/usr/share/examples/fusionpbx")) { echo "\n"; echo "\n"; echo " \n"; echo " \n"; echo "\n"; @@ -267,16 +268,16 @@ echo "

"; echo "\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 "
"; - echo "".$text['header-svn_update_results'].""; + echo "".$text['header-source_update_results'].""; echo "

"; echo "
";
-	echo implode("\n", $_SESSION["response_svn_update"]);
+	echo implode("\n", $_SESSION["response_source_update"]);
 	echo "
"; echo "

"; - unset($_SESSION["response_svn_update"]); + unset($_SESSION["response_source_update"]); } diff --git a/core/upgrade/upgrade.php b/core/upgrade/upgrade.php index 7ef1f2e8bd..0a882c14c1 100644 --- a/core/upgrade/upgrade.php +++ b/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 { diff --git a/resources/functions.php b/resources/functions.php index 1c34a4ef43..1388857fec 100644 --- a/resources/functions.php +++ b/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 diff --git a/resources/install.php b/resources/install.php index c677a87e7a..e1f17ec155 100644 --- a/resources/install.php +++ b/resources/install.php @@ -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) { diff --git a/resources/templates/engine/smarty/sysplugins/smarty_internal_cacheresource_file.php b/resources/templates/engine/smarty/sysplugins/smarty_internal_cacheresource_file.php index 049cc91b6c..c27a873ae3 100644 --- a/resources/templates/engine/smarty/sysplugins/smarty_internal_cacheresource_file.php +++ b/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()) { diff --git a/resources/templates/engine/smarty/sysplugins/smarty_internal_utility.php b/resources/templates/engine/smarty/sysplugins/smarty_internal_utility.php index 33091eaf0f..5e763b7813 100644 --- a/resources/templates/engine/smarty/sysplugins/smarty_internal_utility.php +++ b/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; diff --git a/themes/default/template.php b/themes/default/template.php index cf908c72db..84990d386d 100644 --- a/themes/default/template.php +++ b/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 From 68b4a6fc9d8fffd25dfbe5cfc296988524aad1e6 Mon Sep 17 00:00:00 2001 From: reliberate Date: Thu, 2 Jul 2015 21:15:43 -0600 Subject: [PATCH 2/8] Upgrade: Remove invalid ampersands. --- core/upgrade/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/upgrade/index.php b/core/upgrade/index.php index 6f85965814..8a977a68d8 100644 --- a/core/upgrade/index.php +++ b/core/upgrade/index.php @@ -78,7 +78,7 @@ if (sizeof($_POST) > 0) { 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 && + substr_count($file_path_source, '/.git') == 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') { From 60e9f57035f3f7e35092291b2f76bff2bd5491d5 Mon Sep 17 00:00:00 2001 From: reliberate Date: Thu, 2 Jul 2015 21:15:43 -0600 Subject: [PATCH 3/8] Upgrade: Better handle Git response. --- core/upgrade/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/upgrade/index.php b/core/upgrade/index.php index 6f85965814..ef760549b8 100644 --- a/core/upgrade/index.php +++ b/core/upgrade/index.php @@ -58,7 +58,7 @@ if (sizeof($_POST) > 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, "Updated to revision") > 0 || substr_count($response_line, "At revision") > 0) { + if (substr_count($response_line, "Updating ") > 0 || substr_count($response_line, "Already up-to-date.") > 0) { $update_failed = false; } } @@ -78,7 +78,7 @@ if (sizeof($_POST) > 0) { 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 && + substr_count($file_path_source, '/.git') == 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') { From d8ab2cf367cda5a66d367dcfb5e22ae8098eb4ae Mon Sep 17 00:00:00 2001 From: reliberate Date: Thu, 2 Jul 2015 21:47:59 -0600 Subject: [PATCH 4/8] Test: Commit change to test Advanced > Upgrade changes. --- root.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/root.php b/root.php index 7b882438ea..1d384eeca4 100644 --- a/root.php +++ b/root.php @@ -47,4 +47,6 @@ set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); } +// test + ?> \ No newline at end of file From d6738f2f1651025a0db2e4e5f16f32862829dd79 Mon Sep 17 00:00:00 2001 From: reliberate Date: Thu, 2 Jul 2015 22:17:02 -0600 Subject: [PATCH 5/8] Upgrade: Undo test commit. --- root.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/root.php b/root.php index 1d384eeca4..7b882438ea 100644 --- a/root.php +++ b/root.php @@ -47,6 +47,4 @@ set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); } -// test - ?> \ No newline at end of file From 817b11a3c48dbdcce98abf3721c0e563d43764cf Mon Sep 17 00:00:00 2001 From: Rich Breton Date: Fri, 3 Jul 2015 08:54:10 -0600 Subject: [PATCH 6/8] Update README.md Updating the readme to put in some more info to help people understand the project and get going --- README.md | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 05f5e08ca2..96fa31269c 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,41 @@ -[FusionPBX](http://fusionpbx.com/) — A Full-Featured Multi-Tenant GUI for [FreeSwitch](http://freeswitch.org) -================================================== - -FusionPBX Guides +What is [FusionPBX](http://fusionpbx.com/)? -------------------------------------- +[FusionPBX](http://fusionpbx.com/) is a flexible, customizable administration web GUI that takes [FreeSwitch](http://freeswitch.org) and converts it into a single- or multi-tenant gateway or PBX system out of the box. +It can be run on any operating system and x86-based hardware of your choice. +It provides the functionality your business needs and brings corporate-level phone system features to small, medium, and large businesses. Read more at [FusionPBX](http://fusionpbx.com/). -Our move to git is very much a work in progress but we are working hard to complete everything. +In addition to providing all of the usual PBX functionality, FusionPBX allows you to configure: -1. [Documentation](http://fusionpbx-docs.readthedocs.org/en/latest/) COMING SOON -2. [How to Contribute](http://fusionpbx.com) COMING SOON +- Multi-Tenancy +- Unlimited Extensions +- Voicemail-to-Email +- Music on Hold +- Call Parking +- Automatic Call Distribution +- Interactive Voice Response +- Ring Groups +- Find Me / Follow Me +- Dialplan Features that can be endlessly combined for your preferences +- [Many other Features](http://wiki.fusionpbx.com/index.php?title=Features) +Free Support +-------------------------------------- +We provide several avenues for you to get your system up and running on your own and learn the basics of the system. + +1. [Current Documentation](http://wiki.fusionpbx.com/index.php?title=Main_Page) +2. [New Documentation](http://fusionpbx-docs.readthedocs.org/en/latest/) COMING SOON +3. [How to Contribute](http://fusionpbx.com) COMING SOON +4. [IRC](http://webchat.freenode.net/) in the fusionpbx channel + +Commercial Support +-------------------------------------- +These options support the project and cover any kind of help you might need from architecture, installation, best practices, troubleshooting, custom feature programming, and training. + +1. [Commercial Paid Support](http://fusionpbx.com/support.php) +2. [Custom Feature Development](http://fusionpbx.com/support.php) +3. [Admin Training](http://fusionpbx.com) +4. [Advanced Training](http://fusionpbx.com) +5. [Developer Training](http://fusionpbx.com) Software Requirements -------------------------------------- @@ -48,5 +75,5 @@ chmod 755 install_fusionpbx.sh ``` Installation Questions: -- During the install it will ask you to press continue after verifying that the command ran successfully this is usually the case so you can simply tell it to continue. The install also asks several questions. -- Unless you have a reason to choose otherwise PostgreSQL and Nginx is probably your best path and is recommended by the developers of FusionPBX +- During the install it will ask you to press continue after verifying that the command ran successfully. This is usually the case, so you can simply tell it to continue. The install also asks several questions. +- Unless you have a reason to choose otherwise, PostgreSQL and Nginx is probably your best path and is recommended by the developers of FusionPBX From fff49001ada90265d93c119eb940e095259e1efb Mon Sep 17 00:00:00 2001 From: Rich Breton Date: Fri, 3 Jul 2015 09:35:30 -0600 Subject: [PATCH 7/8] Update README.md Added contributing section to explain why we require a CLA --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 96fa31269c..245664336d 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,6 @@ These options support the project and cover any kind of help you might need from Software Requirements -------------------------------------- - - [Debian Jessie](http://cdimage.debian.org/debian-cd/8.1.0/amd64/iso-cd/debian-8.1.0-amd64-netinst.iso) - Recommended This is the distribution recommended by the FreeSwitch team - Fusion will also install on Debian Wheezy, Ubuntu 10.10 LTS and is known to work on FreeBSD @@ -48,15 +47,21 @@ This is the distribution recommended by the FreeSwitch team Community -------------------------------------- - We have a pretty thriving community if you know how to get to us: - [IRC](http://webchat.freenode.net/) in the fusionpbx channel - [Twitter](http://twitter.com/fusionpbx) - [Website](http://fusionpbx.com) +Contributing +--------------------------------------- +It's easy to contribute to FusionPBX the only thing we ask before accepting your pull request is that you sign a Contributor License Agreement. +We ask that you sign the Contributor License Agreement for the following reasons: +1. It protects FusionPBX by you gauranteeing that your contributions are yours to contribute and not the property of an employer or something found on the web. +2. It protects you from using code that belongs to others that is subject unfriendly licensing. -###How to Install FusionPBX COMING SOON + +How to Install FusionPBX COMING SOON ---------------------------- ```bash cd /usr/src From 8821b86f7bb3db2b5f7ddf7d25d777196d3be8fb Mon Sep 17 00:00:00 2001 From: Rich Breton Date: Fri, 3 Jul 2015 09:36:17 -0600 Subject: [PATCH 8/8] Update README.md Added formatting to the Contributing section --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 245664336d..5b6f653d5c 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ Contributing --------------------------------------- It's easy to contribute to FusionPBX the only thing we ask before accepting your pull request is that you sign a Contributor License Agreement. We ask that you sign the Contributor License Agreement for the following reasons: + 1. It protects FusionPBX by you gauranteeing that your contributions are yours to contribute and not the property of an employer or something found on the web. 2. It protects you from using code that belongs to others that is subject unfriendly licensing.
\n"; - echo " ".$text['label-upgrade_svn']; + echo " ".$text['label-upgrade_source']; echo " \n"; - echo "