Current time: 04-26-2024, 03:21 PM Hello There, Guest! (LoginRegister)


Post Reply 
[Add User] -- insert a control
Author Message
Ryuuku Offline
Junior Member
*

Posts: 55
Joined: Apr 2007
Reputation: 0
Post: #11
RE: [Add User] -- insert a control
Yeah ... I had a new column (domain_egw) in table domain ...
And I have ever the trouble with the yes or no instead of Adr_IP

Basicly ... we have :
- my ($dmn_php, $dmn_cgi) = (@$dmn_data[19], @$dmn_data[20]);
- my $dmn_ip = @$dmn_data[21];


To fix the problem : ( File ispcp-dmn-mngr )

- my ($dmn_php, $dmn_cgi) = (@$dmn_data[19], @$dmn_data[20]); [ The same ]
- my $dmn_egw = @$dmn_data[21]; [ id_column = 21 ]
- my $dmn_ip = @$dmn_data[22]; [ id column +1 : 21 -> 22]

Adding a new user works perfectly ... with no error in site-available/ispcp.conf (adresse IP is well noticed Wink )

Ryu Smile
(This post was last modified: 06-11-2007 10:50 PM by Ryuuku.)
06-11-2007 10:49 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #12
RE: [Add User] -- insert a control
We're working on it...
your fix is for your problem - whenn adding two columns we have a new situation...

So we either select only specified columns (not wildcard) or we need hash based arrays for the results...

I hope I can solve this together with rats...

/Joxi
06-11-2007 11:01 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Ryuuku Offline
Junior Member
*

Posts: 55
Joined: Apr 2007
Reputation: 0
Post: #13
RE: [Add User] -- insert a control
Yep ... it's only fix my pb ...
For every new colums, we have to change values in ispcp-dmn-mngr ..

Is the fix is planned for the Rc3 ?

Ryu !
06-11-2007 11:04 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #14
RE: [Add User] -- insert a control
Ryuuku Wrote:Is the fix is planned for the Rc3 ?

what is a plan?
it's planed to release rc3 on april 30 (2007)...

I don't know when the other tickets are fixed - I hope to get this in some days - so there might be a good chance to have it in rc3 :-)

Cheers
06-11-2007 11:07 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Ryuuku Offline
Junior Member
*

Posts: 55
Joined: Apr 2007
Reputation: 0
Post: #15
RE: [Add User] -- insert a control
Sry for the meaning of plan Tongue

So i hope to having this fix in Rc 3 :=)
06-11-2007 11:26 PM
Find all posts by this user Quote this message in a reply
Ryuuku Offline
Junior Member
*

Posts: 55
Joined: Apr 2007
Reputation: 0
Post: #16
RE: [Add User] -- insert a control
Need Help Tongue

File : ispcp-dmn-mngr

My function :
------------------------------------------------------------------------------------------------------------------------------------------
Code:
## Egroupware Control Checkbox

sub egw_ctrl_dmn {

my ($rs, $rdata) = ('', '');
my ($dmn_data) = @_;
my $dmn_name = @$dmn_data[1];
my $dmn_egw = @$dmn_data[21];

my $sql = "select domain_egw from domain where domain_name = $dmn_name";
($rs, $rdata) = doSQL($sql);

        if ($sql eq 'yes') {
                mkdir ('/tmp/egw_ctrl1',0777) ;
        } elsif ($sql eq 'no') {
                mkdir ('/tmp/egw_ctrl2', 0777) ;
        }

} # Fin Fonction egw_ctrl_dmn
------------------------------------------------------------------------------------------------------------------------------------------
So when i execute ispcp-dmn-mngr ... there is no syntax error ... Smile ( i think )


In call my function in function dmn_mngr_engine like this :
------------------------------------------------------------------------------------------------------------------------------------------
Code:
if ($dmn_status eq 'toadd') {

        $rs = dmn_add_data($entry);
        &egw_ctrl_dmn($entry);   # <<<<<< My Call Function : )

        $timestamp = time();

        if ($rs == 0) {

            $sql = "update domain set domain_status='ok' where domain_id = $dmn_id";
------------------------------------------------------------------------------------------------------------------------------------------

New user is well inserted ...
Status domain turn well on OK
i think my function isn't executed Big Grin ... no dirs are created :/

So .. if somebody sees an error Tongue ... contact me plz Tongue

Ryu !
(This post was last modified: 06-12-2007 11:42 PM by Ryuuku.)
06-12-2007 11:41 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #17
RE: [Add User] -- insert a control
Why not
Code:
$rs = dmn_add_data($entry);
        if ($rs == 0) {
          egw_ctrl_dmn($entry);
        }
or
Code:
$rs = dmn_add_data($entry);
        if ($rs == 0) {
          $rs = egw_ctrl_dmn($entry);
        }
with the possibility to return a error code in your own function....

Regards /J
06-12-2007 11:48 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Ryuuku Offline
Junior Member
*

Posts: 55
Joined: Apr 2007
Reputation: 0
Post: #18
RE: [Add User] -- insert a control
You're so fast ... Big Grin Big Grin ^^
I'm going to test this ; )

Thx Smile
06-13-2007 12:02 AM
Find all posts by this user Quote this message in a reply
Ryuuku Offline
Junior Member
*

Posts: 55
Joined: Apr 2007
Reputation: 0
Post: #19
RE: [Add User] -- insert a control
Humm ... Nothing News ..

New user is always well inserted ...
Status domain always turns well on OK
My function isn't executed yet ... no dirs are created :/
06-13-2007 12:24 AM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #20
RE: [Add User] -- insert a control
ah, maybe you have to change your function...
Code:
my $dmn_egw = @$dmn_data[21];
here you already have your yes/no, so you don't need the new sql... just continue with:
Code:
if ($dmn_egw eq 'yes') {
                mkdir ('/tmp/egw_ctrl1',0777) ;
        } elsif ($dmn_egw eq 'no') {
                mkdir ('/tmp/egw_ctrl2', 0777) ;
        }

if this still does nothing you rather make

Code:
...
my $sql = "select domain_egw from domain where domain_name = $dmn_name";
($rs, $rdata) = doSQL($sql);

        if ($rdata[0][0] eq 'yes') {
                mkdir ('/tmp/egw_ctrl1',0777) ;
        } elsif ($rdata[0][0] eq 'no') {
                mkdir ('/tmp/egw_ctrl2', 0777) ;
        }

$sql will never be 'yes' or 'no' because it's "SELECT..."....
the result $rdata is a array[row][col] each starting at 0...

/J
06-13-2007 01:11 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)