From ceeec2d9703f506eb4aecbb3d18b99006af74b5a Mon Sep 17 00:00:00 2001 From: janw Date: Wed, 2 Apr 2008 09:17:56 +0000 Subject: [PATCH] Update gosa regenerates guide.xml Updated header in master guide.xml git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10106 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/update-gosa | 53 ++++++++++++++++++++++++++++++++++++ gosa-core/update-online-help | 3 +- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/gosa-core/update-gosa b/gosa-core/update-gosa index 94249c47d..616817d12 100755 --- a/gosa-core/update-gosa +++ b/gosa-core/update-gosa @@ -191,6 +191,56 @@ function rescan_i18n() } +function rescan_guide() +{ + $master_guide= "doc/guide.xml"; + echo "Updating Online Help Index...\n"; + $master_guide_content="\n". + "\n\n". + "\n\n". + "\n". + "\n"; + + $guide= 'doc/core/guide.xml'; + if(file_exists($guide) && is_readable($guide)) { + $master_guide_content.= file_get_contents($guide); + } + + $plugins= scandir('doc/plugins'); + foreach($plugins as $key => $plugin) { + if($plugin != '.' && $plugin != '..') { + if(is_dir('doc/plugins/'.$plugin)) { + $guide= 'doc/plugins/'.$plugin.'/guide.xml'; + if(file_exists($guide) && is_readable($guide)) { + $master_guide_content.= file_get_contents($guide); + } + } + } + } + + $master_guide_content.= ""; + + $master_guide_content= preg_replace("/[ \t][ \t]*/", " ", $master_guide_content); + + if(is_writable($master_guide)) { + file_put_contents($master_guide, $master_guide_content); + } + +} + + function parse_ini($file) { global $description, $provides, $depends, $versions, $conflicts; @@ -401,6 +451,7 @@ function install_plugin($file) /* Update caches */ rescan_classes(); rescan_i18n(); + rescan_guide(); } @@ -458,6 +509,7 @@ function remove_plugin($name) /* Update caches */ rescan_classes(); rescan_i18n(); + rescan_guide(); } @@ -469,6 +521,7 @@ $description= $provides= $depends= $versions= $conflicts= array(); if ($argc < 2){ rescan_classes(); rescan_i18n(); + rescan_guide(); exit (0); } diff --git a/gosa-core/update-online-help b/gosa-core/update-online-help index 7f7cfee9f..cb3fd98ac 100755 --- a/gosa-core/update-online-help +++ b/gosa-core/update-online-help @@ -35,7 +35,8 @@ cat << EOF > doc/guide.xml specified for this class below. --> - -- 2.30.2