/[smecontribs]/rpms/smeserver-openoffice-portable/contribs7/smeserver-openoffice-portable-2.3.1-DeleteHistoryScript.patch
ViewVC logotype

Annotation of /rpms/smeserver-openoffice-portable/contribs7/smeserver-openoffice-portable-2.3.1-DeleteHistoryScript.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Mon Apr 21 14:20:17 2008 UTC (16 years, 1 month ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Version update

1 mweinber 1.1 --- smeserver-openoffice-portable-2.3.1/root/sbin/e-smith/openoffice-delete-history.DeleteHistoryScript 2008-03-16 14:45:29.000000000 +0100
2     +++ smeserver-openoffice-portable-2.3.1/root/sbin/e-smith/openoffice-delete-history 2008-03-16 14:46:35.000000000 +0100
3     @@ -0,0 +1,23 @@
4     +#!/usr/bin/perl -w
5     +
6     +# Michael Weinberger, (C) 2008
7     +
8     +use strict;
9     +use XML::Twig;
10     +
11     +my $account=$ARGV[0]||'';
12     +if( not $account )
13     + {
14     + print "Usage: openoffice-delete-history ACCOUNT\n";
15     + exit -1;
16     + }
17     +my $Common_xcu="/home/e-smith/files/ooSettings/$account/user/registry/data/org/openoffice/Office/Common.xcu";
18     +return unless -f $Common_xcu;
19     +my $twig= XML::Twig->new( PrettyPrint => "indented");
20     +$twig->parsefile($Common_xcu) or die "Parse error";
21     +my $root = $twig->root();
22     +for my $node ($root->children('node'))
23     + {
24     + $node->delete() if $node->att('oor:name') =~ /^(History|Cache|Help)$/;
25     + }
26     +$root->XML::Twig::print_to_file("$Common_xcu");
27     --- smeserver-openoffice-portable-2.3.1/root/etc/e-smith/events/actions/openoffice-usersettings.DeleteHistoryScript 2008-03-16 14:51:47.000000000 +0100
28     +++ smeserver-openoffice-portable-2.3.1/root/etc/e-smith/events/actions/openoffice-usersettings 2008-03-16 14:52:12.000000000 +0100
29     @@ -13,7 +13,6 @@
30     sub create_profiledir($);
31     sub replace_value($$$$%);
32     sub patch_xcu_file($$$%);
33     -sub delete_history($);
34    
35     (my $self=$0)=~s/.*\///;
36     my $event=$ARGV[0]||'';
37     @@ -61,11 +60,6 @@
38     my $OOP_ini ="/opt/openoffice/OpenOfficePortable/OpenOfficePortable.ini";
39     system("/bin/cp -a $OOP_ini.contrib $OOP_ini") if not -f $OOP_ini;
40     }
41     -elsif( $self eq "openoffice-delete-history" )
42     - {
43     - # delete History, like recent file list
44     - delete_history($event);
45     - }
46     elsif( $self eq "openoffice-assoc-oo" )
47     {
48     # Add file assocations for OO native files to netlogon.bat
49     @@ -233,18 +227,3 @@
50     }
51     return $root;
52     }
53     -
54     -sub delete_history($)
55     - {
56     - my $username=shift;
57     - my $Common_xcu="/home/e-smith/files/ooSettings/$username/user/registry/data/org/openoffice/Office/Common.xcu";
58     - return unless -f $Common_xcu;
59     - my $twig= XML::Twig->new( PrettyPrint => "indented");
60     - $twig->parsefile($Common_xcu) or die "Parse error";
61     - my $root = $twig->root();
62     - for my $node ($root->children('node'))
63     - {
64     - $node->delete() if $node->att('oor:name') =~ /^(History|Cache|Help)$/;
65     - }
66     - $root->XML::Twig::print_to_file("$Common_xcu");
67     - }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed