Current time: 12-24-2024, 09:22 AM Hello There, Guest! (LoginRegister)


Post Reply 
Domain alias forward edition
Author Message
greg Offline
Junior Member
*

Posts: 27
Joined: Apr 2007
Reputation: 1
Post: #1
Domain alias forward edition
I don't like the actual form that show domains alias and the system for enable/disable the forward.

The main problem is that the domain alias list don't show the forward url ! We can only see if a forward is set or not with the enable/disable switch (and it's not very clear to understand). But if a forward exist, the redirect url can't be see...

Worst of all, if you click on disable, then the forward is deleted, and you never see the url... no confirmation about this action, and you can only enable the forward again... if you know what the mystery url must be !

I have two little modifications to propose (i'm working with the last nightly) :
Code:
file /var/www/ispcp/gui/reseller/edit_alias.php, line 65 :
//    check_for_disable($_GET['edit_id']);

file /var/www/ispcp/gui/reseller/domain_alias.php, line 346 :
//              $als_fwd = ($als_fwd == 'no') ? tr('disabled') : tr('enabled');

I just comment this two lines to avoid the auto-deletion of existing alias (then you can edit it, and set it to 'no' to disable) and to show the forward url instead of 'disable'/'enable'

Of course the same things would be made into the custumer interface, maybe like this :

file /var/www/ispcp/gui/client/manage_domains.php :
Code:
function gen_user_als_forward($als_id, $als_status, $url_forward)
{
  global $cfg;

  if ($url_forward === 'no') {
    if ($als_status === 'ok') {
//      return array(tr('Enable'), "enable_als_fwd.php?id=$als_id");
      return array(tr('None'), "enable_als_fwd.php?id=$als_id");
    } else {
      return array(tr('N/A'), '#');
    }
  } else {
    if ($als_status === 'ok') {
//    return array(tr('Disable'), "disable_als_fwd.php?id=$als_id");
      return array($url_forward, "enable_als_fwd.php?id=$als_id");
    } else {
      return array(tr('N/A'), '#');
    }
  }
}

What do you think about it ?
07-11-2007 03:04 PM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #2
RE: Domain alias forward edition
This is a good idea!
Can you please create a Diff, open a Ticket and put all in ?
Makes the developmet easier.

Thx & Greez
BeNe
07-11-2007 03:39 PM
Visit this user's website Find all posts by this user Quote this message in a reply
xister Offline
Member
*
Beta Team

Posts: 405
Joined: Oct 2006
Reputation: 6
Post: #3
RE: Domain alias forward edition
Very good idea Smile
07-11-2007 03:48 PM
Find all posts by this user Quote this message in a reply
greg Offline
Junior Member
*

Posts: 27
Joined: Apr 2007
Reputation: 1
Post: #4
RE: Domain alias forward edition
I have created a new ticket : http://www.isp-control.net/ispcp/ticket/475
(it's a funny enhancement as my modifications are mainly remove of actual code)

But when I try to upload my diff file as an attachment, I have a Trac error :
Code:
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/trac/attachment.py", line 361, in process_request
    self._do_save(req, attachment)
  File "/usr/lib/python2.4/site-packages/trac/attachment.py", line 496, in _do_save
    attachment.insert(filename, upload.file, size)
  File "/usr/lib/python2.4/site-packages/trac/attachment.py", line 180, in insert
    os.makedirs(self.path)
  File "os.py", line 159, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/www/virtual/inetcentral.de/trac/htdocs/ispcp/attachments/ticket/475'

So I put my diff file in this post !


Attached File(s)
.txt  aliasforwardedit.diff.txt (Size: 1.04 KB / Downloads: 7)
07-11-2007 04:20 PM
Find all posts by this user Quote this message in a reply
Zothos Offline
Release Manager
*****
Dev Team

Posts: 1,262
Joined: Feb 2007
Reputation: 10
Post: #5
RE: Domain alias forward edition
very nice Smile

+1 for getting this into the trunk Tongue
07-11-2007 07:12 PM
Find all posts by this user Quote this message in a reply
raphael Offline
Member
***

Posts: 474
Joined: Apr 2007
Reputation: 8
Post: #6
RE: Domain alias forward edition
Quote:114c114,115
< return array(tr('Enable'), "enable_als_fwd.php?id=$als_id");
---
> // return array(tr('Enable'), "enable_als_fwd.php?id=$als_id");
> return array(tr('None'), "enable_als_fwd.php?id=$als_id");
Is there any reason for this change?

same for this one:
Quote:< $als_fwd = ($als_fwd == 'no') ? tr('disabled') : tr('enabled');
---
> // $als_fwd = ($als_fwd == 'no') ? tr('disabled') : tr('enabled');

I will review the modifications further this afternoon
07-12-2007 06:29 AM
Visit this user's website Find all posts by this user Quote this message in a reply
greg Offline
Junior Member
*

Posts: 27
Joined: Apr 2007
Reputation: 1
Post: #7
RE: Domain alias forward edition
For this one :
Code:
<                 $als_fwd = ($als_fwd == 'no') ? tr('disabled') : tr('enabled');
---
> //                $als_fwd = ($als_fwd == 'no') ? tr('disabled') : tr('enabled');

It's because I prefer to have the url of the forward directly in the domain alias list instead of 'disable' / 'enable'. I think it's more useful to have 'http://forward-domain.tld' / 'no'

So I try to make the same thing into the customer GUI :
Code:
<       return array(tr('Enable'), "enable_als_fwd.php?id=$als_id");
---
> //      return array(tr('Enable'), "enable_als_fwd.php?id=$als_id");
>       return array(tr('None'), "enable_als_fwd.php?id=$als_id");

As I replace 'Disable' by the forward url, I think it's better to have 'None' instead of 'Enable'
07-12-2007 07:11 AM
Find all posts by this user Quote this message in a reply
raphael Offline
Member
***

Posts: 474
Joined: Apr 2007
Reputation: 8
Post: #8
RE: Domain alias forward edition
greg Wrote:For this one :
Code:
<                 $als_fwd = ($als_fwd == 'no') ? tr('disabled') : tr('enabled');
---
> //                $als_fwd = ($als_fwd == 'no') ? tr('disabled') : tr('enabled');

It's because I prefer to have the url of the forward directly in the domain alias list instead of 'disable' / 'enable'. I think it's more useful to have 'http://forward-domain.tld' / 'no'

Don't you think this would be better?:
Code:
<                 $als_fwd = ($als_fwd == 'no') ? tr('disabled') : tr('enabled');
---
>                $als_fwd = ($als_fwd == 'no') ? tr('disabled') : $als_fwd;

resulting in this change to be useless:
Code:
<       return array(tr('Enable'), "enable_als_fwd.php?id=$als_id");
---
> //      return array(tr('Enable'), "enable_als_fwd.php?id=$als_id");
>       return array(tr('None'), "enable_als_fwd.php?id=$als_id");
07-12-2007 07:20 AM
Visit this user's website Find all posts by this user Quote this message in a reply
greg Offline
Junior Member
*

Posts: 27
Joined: Apr 2007
Reputation: 1
Post: #9
RE: Domain alias forward edition
raphael Wrote:Don't you think this would be better?:
Code:
<                 $als_fwd = ($als_fwd == 'no') ? tr('disabled') : tr('enabled');
---
>                $als_fwd = ($als_fwd == 'no') ? tr('disabled') : $als_fwd;
Yes you could only replace the 'no' by 'disabled', this is okay for me.

raphael Wrote:resulting in this change to be useless:
Code:
<       return array(tr('Enable'), "enable_als_fwd.php?id=$als_id");
---
> //      return array(tr('Enable'), "enable_als_fwd.php?id=$als_id");
>       return array(tr('None'), "enable_als_fwd.php?id=$als_id");
In this case, I think this is better to change like this (to use the same logic) :
Code:
<       return array(tr('Enable'), "enable_als_fwd.php?id=$als_id");
---
>       return array(tr('Disabled'), "enable_als_fwd.php?id=$als_id");
07-12-2007 08:49 AM
Find all posts by this user Quote this message in a reply
raphael Offline
Member
***

Posts: 474
Joined: Apr 2007
Reputation: 8
Post: #10
RE: Domain alias forward edition
sounds good
07-12-2007 09:56 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: 4 Guest(s)