diff --git a/gosa-core/update-gosa b/gosa-core/update-gosa
index 94249c47d1edc14b2c7f85b07809e3d867c7ab28..616817d12eeec87b3f9fb5bde381405a22dc6e99 100755 (executable)
--- a/gosa-core/update-gosa
+++ b/gosa-core/update-gosa
}
+function rescan_guide()
+{
+ $master_guide= "doc/guide.xml";
+ echo "Updating Online Help Index...\n";
+ $master_guide_content="<?xml version=\"1.0\"?>\n".
+ "<!--\n".
+ "\tWARNING:\n".
+ "\tThis file is automatically generated by update-online-help.\n".
+ "\tIf you want to add entries, use doc/core/guide.xml or doc/plugins/\"Appropriate Plugin Directory\"/guide.xml.\n".
+ "\tThen execute update-online-help to merge them into this file.\n".
+ "-->\n\n".
+ "<!--\n".
+ "\tThis xml file specifies which class is documented in which help file.\n".
+ "\tIf isset ( \$_SESSION['current_class_for_help'] ) then open the helpfile which is\n".
+ "\tspecified for this class below.\n".
+ "-->\n\n".
+ "<!--\n".
+ "\t<ENTRY NAME='class name' VALUE='displayed text' PATH='path to helpfiles' FILE='path to htmlfile' />\n".
+ "\tLeave blank to display message \"There is no helpfile specified for this class.\"\n".
+ "-->\n".
+ "<ENTRIES>\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.= "</ENTRIES>";
+
+ $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;
/* Update caches */
rescan_classes();
rescan_i18n();
+ rescan_guide();
}
/* Update caches */
rescan_classes();
rescan_i18n();
+ rescan_guide();
}
if ($argc < 2){
rescan_classes();
rescan_i18n();
+ rescan_guide();
exit (0);
}