[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Savannah-dev] 0.9.13 unified patches + debian packages
From: |
Loic Dachary |
Subject: |
[Savannah-dev] 0.9.13 unified patches + debian packages |
Date: |
Tue, 9 Oct 2001 18:22:27 +0200 |
Hi,
The patch (relative to today's CVS tree state) avaiable at
http://sourceforge.net/tracker/index.php?func=detail&aid=469577&group_id=7305&atid=307305
obsoletes the patches #468799 #468610 #468561 and #467991.
In short it fixes the following:
- php3 compatibility bug introduced in the
phpgwapi/setup/tables_current.inc.php
phpgwapi/setup/tables_update.inc.php
a few days ago
- fixes two critical bugs preventing xmlrpc to work properly
phpgwapi/inc/xml_functions.inc.php
phpgwapi/inc/functions.inc.php
- implements add_user thru xmlrpc in
admin/inc/class.boaccounts.inc.php
admin/inc/class.soaccounts.inc.php
- fixes a constructor argument problem preventing xmlrpc
implementation of boaccounts functions (kill the $this->ui variable)
admin/inc/class.boaccounts.inc.php
- implements setting preferences thru xmlrpc
admin/inc/class.boconfig.inc.php
In addition I attach the curl/xmlrpc based script I'm using
to postconfigure the phpgroupware installation in the debian packages
available at http://france.fsfeurope.org/debian.
Enjoy,
---
url=$domain/phpgroupware
curl_context="-f -s -S -d oldversion=new -b
ConfigLang=en;ConfigDomain=default;ConfigPW=$config_password;HeaderPW=deleted"
# Install
curl $curl_context -d action='Install' -d label='Install'
http://$url/setup/index.php > /dev/null
# Set the server URL
curl --fail $curl_context -d
"newsettings[webserver_url]=http://$domain/phpgroupware" -d submit=1 -d
'newsettings[auth_type]=sql' http://$url/setup/config.php > /dev/null
# Set language to english
curl --fail $curl_context -d 'lang_selected[]=en' -d
upgrademethod=addonlynew -d submit=Install http://$url/setup/lang.php >
/dev/null
# Create admin account
curl --fail $curl_context -d username=admin -d fname=A -d
lname=Dmin -d passwd=$config_password -d passwd2=$config_password -d
submit=Submit http://$url/setup/setup_demo.php > /dev/null
#### From here we are able to use the xmlrpc interface
perl - $url $config_password <<'EOF'
use strict;
use Frontier::Client;
use Data::Dumper;
my($verbose) = 0;
my($url, $password) = @ARGV;
my($result);
my($server_url) = "http://$url/xmlrpc.php";
my($server) = Frontier::Client->new(url => $server_url);
#
# First argument is the expected member of the returned hash
# or undefined if no hash is expected.
#
sub xmlrpc {
my($expect, @query) = @_;
my($result) = $server->call(@query);
if(defined($expect)) {
my($good);
eval("\$good = $expect");
if(!$good) {
die "phpgw-xmlrpc: failed " . Dumper(@query) . "(error: " .
Dumper($result) . ")";
}
}
print Dumper($result) if($verbose);
return $result;
}
#
# Login
#
my($session) = xmlrpc('exists($result->{"sessionid"})', 'system.login', {
'username' => 'admin',
'password' => $password
});
#
# Set session key as basic authentication information
#
$server_url =
"http://$session->{'sessionid'}:$session->{'kp3'address@hidden/xmlrpc.php";
$server->{'rq'}->uri($server_url);
#
# Application: registration
#
{
#
# Create anonymous user
#
$result = xmlrpc('exists($result->{"0"}) && !ref($result->{"0"})',
'admin.boaccounts.rpc_add_user', {
'account_type' => 'u',
'status' => 'A',
'account_status' => 'A',
'account_lid' => 'anonymous',
'account_firstname' => 'A',
'account_lastname' => 'Nonymous',
'account_passwd' => $password,
'account_passwd_2' => $password,
'account_permissions' => [ 'preferences' ]
});
# my($uid) = $result->{'0'};
xmlrpc('$result->{"0"} == 1', 'admin.boconfig.rpc_values', {
'appname' => 'registration',
'newsettings' => {
'anonymous_user' => 'anonymous',
'anonymous_pass' => $password,
}
});
}
#
# Application: phpgwapi
#
{
my($hostname) = `hostname`;
chop($hostname);
xmlrpc('$result->{"0"} == 1', 'admin.boconfig.rpc_values', {
'appname' => 'phpgwapi',
'newsettings' => {
'smtp_server' => 'localhost',
'smtp_port' => '25',
'hostname' => $hostname,
}
});
}
#
# Logout so that there is no stale session information left in the database
#
xmlrpc('exists($result->{"GOODBYE"})', 'system.logout', $session);
EOF
--
Loic Dachary http://www.dachary.org/ address@hidden
24 av Secretan http://www.senga.org/ address@hidden
75019 Paris Tel: 33 1 42 45 09 16 address@hidden
GPG Public Key: http://www.dachary.org/loic/gpg.txt
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Savannah-dev] 0.9.13 unified patches + debian packages,
Loic Dachary <=