• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Pkg_edit bug?

Scheduled Pinned Locked Moved Development
5 Posts 3 Posters 3.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    dvserg
    last edited by Mar 28, 2007, 12:26 PM

    Default url for pkg_edit contains
    /pkg_edit.php?xml=package_name.xml&id=0

    Example from package.xml

    
     <tab><text>Package text</text>
        <url>/pkg_edit.php?xml=package_name.xml&id=0</url></tab> 
    
    

    But if  '&id=0' is absent ('<url>/pkg_edit.php?xml=package_name.xml</url>'),
    then in config.xml for this package builds multiple 'config' sections

     <packagename><config>...</config> 
     <config>...</config></packagename> 
    

    Really must be one section

    May be need correct this part?
    pkg_edit.php line 69

    
    $id = $_GET['id'];
    if (isset($_POST['id']))
    	$id = $_POST['id'];
    
    

    to this (or near) - define $id=0 as default, if them not in url

    
    $id = $_GET['id'];
    if (isset($_POST['id']))
    	$id = $_POST['id'];
    else
                 $id=0; // or $id='0'; ??
    
    

    SquidGuardDoc EN  RU Tutorial
    Localization ru_PFSense

    1 Reply Last reply Reply Quote 0
    • F
      fernandotcl
      last edited by Mar 28, 2007, 5:43 PM

      That's not a bug, it's a feature. ;-)

      No really, it's on purpose. When you click in a "+" icon in a pkg.php page, you'll be redirected to pkg_edit.php without id=X, which means exactly "add a new config item". It's not pretty, but then new XML stuff should use cg2 instead anyways.

      1 Reply Last reply Reply Quote 0
      • D
        dvserg
        last edited by Mar 28, 2007, 6:16 PM

        @fernandotcl:

        That's not a bug, it's a feature. ;-)

        No really, it's on purpose. When you click in a "+" icon in a pkg.php page, you'll be redirected to pkg_edit.php without id=X, which means exactly "add a new config item". It's not pretty, but then new XML stuff should use cg2 instead anyways.

        About pkg.php i know  ::)
        What this - cg2? This mean php module for package in next version pfSense? I right understand?

        SquidGuardDoc EN  RU Tutorial
        Localization ru_PFSense

        1 Reply Last reply Reply Quote 0
        • S
          sullrich
          last edited by Mar 28, 2007, 6:30 PM

          http://wiki.pfsense.com/wikka.php?wakka=CoreGUI2Introduction

          1 Reply Last reply Reply Quote 0
          • D
            dvserg
            last edited by Mar 28, 2007, 6:34 PM

            Ohm..  :D
            Thx.

            SquidGuardDoc EN  RU Tutorial
            Localization ru_PFSense

            1 Reply Last reply Reply Quote 0
            5 out of 5
            • First post
              5/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received