<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0">
<package version="1.0">
  <name>DB_NestedSet</name>
  <summary>API to build and query nested sets</summary>
  <description>DB_NestedSet let's you create trees with infinite depth
inside a relational database.
The package provides a way to
o create/update/delete nodes
o query nodes, trees and subtrees
o copy (clone) nodes, trees and subtrees
o move nodes, trees and subtrees
o call event handlers on specific events like
  on node deletion
o output the tree with
  - PEAR::HTML_TreeMenu
  - TigraMenu (http://www.softcomplex.com/products/tigra_menu/)
o It also features caching of SQL queries using PEAR::Cache</description>
  <maintainers>
    <maintainer>
      <user>datenpunk</user>
      <name>Daniel Khan</name>
      <email>dk@webcluster.at</email>
      <role>lead</role>
    </maintainer>
    <maintainer>
      <user>jrust</user>
      <name>Jason Rust</name>
      <email>jrust@rustyparts.com</email>
      <role>developer</role>
    </maintainer>
  </maintainers>
  <release>
    <version>1.3</version>
    <date>2003-10-07</date>
    <license>PHP License</license>
    <state>beta</state>
    <notes>This release includes many internal changes and some (long demanded) feature additions.
The API and database structure should be fully backward compatible.
Please test this release as much as possible, so that any remaining issues can be
uncovered and resolved prior to the final release.
o Notes:
If you want to use new features like preorder sorting you will
have to convert the tree to meet the new db model.
See docs/migrateDB.txt on how to migrate your existing tree.
o Fixes:
* MDB support is back again.
* Fixed a problem with some move operations where the moving tree gets changed during
  the move operation.
* Many small internal fixes.
o New features:
* Added a method setSortMode($mode) where $mode is NESE_SORT_LEVEL or NESE_SORT_PREORDER.
  This will change the way the query methods return the tree.
  NESE_SORT_LEVEL is the default.
  NESE_SORT_PREORDER returns the tree preorder sorted. This sorting method
  was often demanded as it's the way one would usually expect the tree to be returned.
  Preorder sorting will also work with the property $secondarySort.
  So it's possible to get the siblings of one level sorted alphabetically by name.
  Note that you will have to switch back to NESE_SORT_LEVEL if you want to display
  a tree with the output drivers.
* Added method getParent() to get the immediate parent of a node
* Added method getSiblings() to get all siblings of a node + the node itself
* Added method createLeftNode() to create a node before a node given by it's node id.
* Added method apiVersion() which obviously returns the current API version
* Added convertTreeModel() to convert a tree into the new tree model
* Added magic parent db field. If a column with the field mapping 'parent' is present
  the parent id of a node is stored inside this column.
  This doesn't exactly meet the nested sets theory and will only be used by some
  methods like getParent(). It's recommended to use this column for new installations
  or converted trees.
* Now values passed to creation methods are verfified so that a script can't set
  params like the parent id by itself
* Added listbox_toHTML() and tree_toHTML() methods to the TreeMenu output driver.
  Thanks to Emanuel Zueger for this additions.
* Added regression tests for all public methods and common options
  The regression test setup isn't very userfriendly for now.
  The db schema can be found under docs and you will have to customize tests/UnitTest.php
  to set your database connection params.
* The main class now uses the array representation of the tree for internal operations.
  This should gain some performance.
o Notes on next major version (1.3):
* The API will change.
* The class won't return objects anymore. It will act as if $keepAsArray is set to true
  when calling the query methods.
  It's a good idea to switch to set this param to be mostly compatible.
* Callback handlers will be removed - I don't even know if someone uses them.
  Please mail me at dk@webcluster.at if you really see a use.
  -- To be continued --</notes>
    <provides type="class" name="DB_NestedSet" />
    <provides type="class" name="DB_NestedSet_Node" />
    <provides type="function" name="DB_NestedSet::factory" />
    <provides type="function" name="DB_NestedSet::getAllNodes" />
    <provides type="function" name="DB_NestedSet::getRootNodes" />
    <provides type="function" name="DB_NestedSet::getBranch" />
    <provides type="function" name="DB_NestedSet::getParents" />
    <provides type="function" name="DB_NestedSet::getParent" />
    <provides type="function" name="DB_NestedSet::getSiblings" />
    <provides type="function" name="DB_NestedSet::getChildren" />
    <provides type="function" name="DB_NestedSet::getSubBranch" />
    <provides type="function" name="DB_NestedSet::pickNode" />
    <provides type="function" name="DB_NestedSet::isParent" />
    <provides type="function" name="DB_NestedSet::createRootNode" />
    <provides type="function" name="DB_NestedSet::createSubNode" />
    <provides type="function" name="DB_NestedSet::createLeftNode" />
    <provides type="function" name="DB_NestedSet::createRightNode" />
    <provides type="function" name="DB_NestedSet::deleteNode" />
    <provides type="function" name="DB_NestedSet::updateNode" />
    <provides type="function" name="DB_NestedSet::moveTree" />
    <provides type="function" name="DB_NestedSet::addListener" />
    <provides type="function" name="DB_NestedSet::removeListener" />
    <provides type="function" name="DB_NestedSet::triggerEvent" />
    <provides type="function" name="DB_NestedSet::apiVersion" />
    <provides type="function" name="DB_NestedSet::setAttr" />
    <provides type="function" name="DB_NestedSet::setsortMode" />
    <provides type="function" name="DB_NestedSet::setDbOption" />
    <provides type="function" name="DB_NestedSet::testLock" />
    <provides type="function" name="DB_NestedSet::convertTreeModel" />
    <provides type="function" name="DB_NestedSet_Node::setAttr" />
    <provides type="class" name="DB_NestedSet_DB" extends="DB_NestedSet" />
    <provides type="class" name="DB_NestedSet_MDB" extends="DB_NestedSet" />
    <provides type="class" name="DB_NestedSetEvent" extends="PEAR" />
    <provides type="function" name="DB_NestedSetEvent::callEvent" />
    <provides type="class" name="DB_NestedSet_Output" />
    <provides type="function" name="DB_NestedSet_Output::factory" />
    <provides type="function" name="DB_NestedSet_Output::setOptions" />
    <provides type="function" name="DB_NestedSet_Output::printTree" />
    <provides type="function" name="DB_NestedSet_Output::printListbox" />
    <provides type="function" name="DB_NestedSet_Output::tree_toHTML" />
    <provides type="function" name="DB_NestedSet_Output::listbox_toHTML" />
    <provides type="class" name="DB_NestedSet_TreeMenu" extends="DB_NestedSet_Output" />
    <provides type="function" name="DB_NestedSet_TreeMenu::printTree" />
    <provides type="function" name="DB_NestedSet_TreeMenu::printListbox" />
    <provides type="function" name="DB_NestedSet_TreeMenu::tree_toHTML" />
    <provides type="function" name="DB_NestedSet_TreeMenu::listbox_toHTML" />
    <provides type="class" name="DB_NestedSet_TigraMenu" extends="DB_NestedSet_Output" />
    <provides type="function" name="DB_NestedSet_TigraMenu::printTree" />
    <filelist>
      <file role="php" baseinstalldir="DB" md5sum="12f3a7cf3f11cbc25217aa11ae286818" name="NestedSet.php"/>
      <file role="php" baseinstalldir="DB" md5sum="8c157a3b39cafc8dbcea124cfe36cad1" name="NestedSet/DB.php"/>
      <file role="php" baseinstalldir="DB" md5sum="9f576891d44da34af7e7d9040f451934" name="NestedSet/MDB.php"/>
      <file role="php" baseinstalldir="DB" md5sum="a88e156e6e87ee7bf045baae210d7e01" name="NestedSet/Event.php"/>
      <file role="php" baseinstalldir="DB" md5sum="d432fd179be2298274c0e3d4fadd240a" name="NestedSet/Output.php"/>
      <file role="php" baseinstalldir="DB" md5sum="223c90ed8f07c1dcabd2820bbf243f3e" name="NestedSet/TreeMenu.php"/>
      <file role="php" baseinstalldir="DB" md5sum="e886959b0d37c95fd6b35c691e102239" name="NestedSet/TigraMenu.php"/>
      <file role="doc" baseinstalldir="DB" md5sum="4b84273aa853ef23ab5b90c8f089fc15" name="docs/README"/>
      <file role="doc" baseinstalldir="DB" md5sum="ec3ac13ca037e67740f529fa0a009fc2" name="docs/mysql.sql"/>
      <file role="doc" baseinstalldir="DB" md5sum="54fec918a88e576ad93e82792e227eb8" name="docs/migrateDB.txt"/>
      <file role="doc" baseinstalldir="DB" md5sum="94774a63c5d47598202ee170ef2c5577" name="docs/testdb_mysql.sql"/>
      <file role="doc" baseinstalldir="DB" md5sum="da480626ceb872a9fd24c8d66fe39da7" name="docs/TreeMenu_example.php"/>
      <file role="doc" baseinstalldir="DB" md5sum="815accfb61b4dffa82a1f1850bbc86d9" name="docs/TigraMenu_example.php"/>
      <file role="test" baseinstalldir="DB" md5sum="788fd82695a02167a1bd3076bad8c3dc" name="tests/index.php"/>
      <file role="test" baseinstalldir="DB" md5sum="90001b63d1622c390a29b1a474a10048" name="tests/TestBase.php"/>
      <file role="test" baseinstalldir="DB" md5sum="047426d0894e188a8ab218f35db49085" name="tests/UnitTest.php"/>
      <file role="test" baseinstalldir="DB" md5sum="c52006a2d096ae1dd559265998430e5b" name="tests/NestedSet/api.php"/>
      <file role="test" baseinstalldir="DB" md5sum="6e552648a324a0e89873249d50f1be93" name="tests/NestedSet/creation.php"/>
      <file role="test" baseinstalldir="DB" md5sum="1e6c0d67d5342669d91834a7913c9750" name="tests/NestedSet/manipulation.php"/>
      <file role="test" baseinstalldir="DB" md5sum="925c9f90b42054e8e3502868661376f8" name="tests/NestedSet/query.php"/>
    </filelist>
  </release>
  <changelog>
    <release>
      <version>1.2.4</version>
      <date>2003-08-13</date>
      <state>stable</state>
      <notes>o Fixed a problem in re-sorting after node deletion
o Added an example for building a JavaScript tree with TreeMenu
</notes>
    </release>
    <release>
      <version>1.2.3</version>
      <date>2003-07-16</date>
      <state>stable</state>
      <notes>o Fixes a typo in _addSQL()
  Thanks to Rense Klinkenberg for sending patch
</notes>
    </release>
    <release>
      <version>1.2.2</version>
      <date>2003-07-15</date>
      <state>stable</state>
      <notes>This release fixes some bugs which occured since 1.2.1
We will now move towards 2.0 which will include big improvements
but also some BC breaks.
FIXES
 o Fixed a bug which leads to wrong results when copying nodes
 o Fixed a node ordering bug in createRightNode (Thanks to Stefan Wimmer)
 o Fixed bug that had crept in so that $aliasFields was not working
 o Doc and style fixes

</notes>
    </release>
    <release>
      <version>1.2.1</version>
      <date>2003-05-25</date>
      <state>stable</state>
      <notes>- NEW FEATURES
o Now $NeSe-&gt;setAttr() allows a PEAR function cache object to be passed using
  $NeSe-&gt;setAttr(array('cache'=&gt;$cache_object));
  if this object is set, the class will use it to cache database queries.
  It will also flush this cache if the structure changes.
o All tree query methods now support an additional array named $addSQL.
  This can be used to pass additional params to a query.
  Means: You may now use joins to other tables.
- FIXES
o createRightNode() returned the node object instead of the new node id, which
  caused problems whith some internal method calls.
o TreeMenu and TigraMenu output drivers contained a bug which made them not
  create the whole tree under certain circumstances
  Thanks to Alain Petignat for reporting this
o Some minor E_ALL fixes (The package shouldn't produce notices/warnings with
  E_ALL set)
o Added TigraMenu.php to the package which was missing in the last release
</notes>
    </release>
    <release>
      <version>1.2pl1</version>
      <date>2003-05-08</date>
      <state>stable</state>
      <notes>- Fixed a bug which leads to the deletion of a node or subtree if a node
  is moved into _itself_.
  Thanks to Christian Reininger for catching this!
- Now a proper PEAR::Error object is returned in case of recursion instead of
  returning false.
</notes>
    </release>
    <release>
      <version>1.2</version>
      <date>2003-05-05</date>
      <state>stable</state>
      <notes>The core package is now stable.
You should be able to manipulate a nested set without problems.
The output driver development will always be in progress and there
may always be drivers in beta state.
This package introduces an output driver for TigraMenu
(http://www.softcomplex.com/products/tigra_menu/)
and examples on using the output drivers.
 * Fixed bug in triggerEvent() which produced an error on node move (Daniel Khan)
 * Added isParent() which provides a simple way to query if a given node is parent of another given node. (Daniel Khan)
 * Added a variable to pickNode() which can be used to get a node by another value than id (Daniel Khan)
 * TreeMenu: Fixed bug where two sub nodes that both have children were not being processed correctly (Jason Rust)
 * TreeMenu: Took off example usage since there is now an example page in docs/ (Jason Rust)
 * TigraMenu: Initial import of TigraMenu output driver
</notes>
    </release>
    <release>
      <version>1.1-beta</version>
      <date>2003-04-29</date>
      <state>beta</state>
      <notes>- Added a unified API to access other output drivers
- Added a output driver for HTML_TreeMenu (Jason Rust)
- Added a variable '$idfield' to pickNode() which can be used to get a node by another value than id (Daniel Khan)
- Made getChildren() consistent with how the other methods work in terms of the secondarySort property (Jason Rust)
- Added new attribute: secondarySort. Normally it is the order field, but can be set to another field
  in the table such as name so that the tree can be displayed alphabetically. (Jason Rust)
- Improved the error handling so that nasty fatal errors no longer occur if invalid ids are specified (Jason Rust)
- Now using the NESE_MOVE_* constants instead of AF, BE, and SUB (Jason Rust)
- Added vim folds (Jason Rust)
- Several style fixes to be compliant with PEAR style (Jason Rust)
- Several E_ALL fixes (Jason Rust)
- Avoid repetitive setting of variables by using sprintf to form the SQL queries in many of the _doget* methods (Jason Rust)
- db-&gt;quote() is now used to quote strings to be compliant with other databases (Jason Rust)
- Added new property: sequence_table so that it can be configurable (Jason Rust)
- Added new method: setDbOption in order to be able to set database options (Jason Rust)
- Added new method to NestedSet_Node: getData() to obtain the data from the node in an array (Jason Rust)
- NestedSet_Node no longer extends PEAR since it doesn't need to (Jason Rust)
- Fixed a bug for when moving a node within its level (Jason Rust)
- Locking does not produce DB &quot;database not set&quot; errors any longer since the database destructor calls the parent destructor first (Jason Rust)
- Fixed a bug in _dogetParents() which made it return also return the parent's sibblings (Daniel Khan)

</notes>
    </release>
  </changelog>
</package>
