The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Forwarders and Domain Forwarders in applist

Discussion in 'cPanel Developers' started by intrwrks, Jun 30, 2009.

  1. intrwrks

    intrwrks Registered

    Joined:
    Aug 9, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I am calling the CPanel Branding::applist function through the xmlapi to determine which features can be utilized in my program. The application requires that Forwarders and Domain Forwarders be on separate screens, but in the xml returned it will always return the forwarders feature as long as one of the two are still selected as an allowed feature in the package.

    Code:
    <items>
      <description>$LANG{'TForwarders'}</description> 
      <feature>forwarders || emaildomainfwd</feature> 
      <file>forwardersemail</file> 
      <group>mail</group> 
      <height>32</height>
      <imgtype>icon</imgtype> 
      <itemdesc>$LANG{'NavForwarders'}</itemdesc> 
      <itemorder>5</itemorder> 
      <origin>x3 (System)</origin> 
      <searchtext>$LANG{'forwarders-searchtxt'}</searchtext> 
      <subtype>img</subtype> 
      <type>image</type> 
      <url>mail/fwds.html</url> 
      <width>32</width>
    </items>
    
    The code above shows the section of xml I am referring. The feature tag will always show both even if you have one or the other unselected.

    Is there any way to determine if one or the other is not selected in the feature package through the CPanel api?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    At this time, there's no equivalent to the <cpanelfeature ...> tag that is available in our XML API.

    If you have root access to the server and the script is running server-side, what you could do is fetch the package associated with that account, then list packages to see which feature list is associated with that package. Then you can compare that with the contents of the file (which has the same name as the name of the feature list) in /var/cpanel/features/ to see if that feature is enabled.
     
Loading...

Share This Page