contenido\includes\functions.str.php
Description: Defines the "str" related functions
Requirements:
- Author
- Olaf Niemann
- Con_php_req
- 5.0
- Copyright
- four for business AG
- License
- http://www.contenido.org/license/LIZENZ.txt
- Link
- http://www.4fb.de
- Link
- http://www.contenido.org
- Package
- Contenido Backend includes
- Since
- file available since contenido release <= 4.6 {@internal created 2002-03-02 modified 2008-06-26, Frederic Schneider, add security fix modified 2008-08-29, Murat Purc, add new chain execution modified 2008-09-03, Hotfix recursive call more than 200 times exit script on hosteurope Timo.Trautmann (strRemakeTreeTableFindNext) modified 2008-10-29, delete from cat_tree only for one Cliente OliverL (strRemakeTreeTable) modified 2008-11-03, Add cat_tree only for one Cliente OliverL (strRemakeTreeTable) modified 2009-05-05, Timo Trautmann - optional use for copy label on copy proccess modified 2009-10-14, Dominik Ziegler - changed functionality of strMoveSubtree and strMoveCatTargetallowed to prevent crashing tree on moving modified 2009-10-23, Murat Purc, removed deprecated function (PHP 5.3 ready), commenting code and some formatting modified 2009-10-27, Murat Purc, fixed/modified CEC_Hook, see [#CON-256] modified 2010-01-30, Ingo van Peeren, modified strRemakeTreeTable() to pass only one INSERT statement to the database, see [#CON-299] modified 2010-03-12, Ingo van Peeren, fixed a bug with last change if more than one client exist [#CON-299] modified 2010-06-18, Ingo van Peeren, fixed some issues with next id and order of con_cat_tree entries modified 2010-09-17, Ingo van Peeren, fixed some issues wrong level information causing garbled tree [#CON-348] modified 2010-10-13, Dominik Ziegler, No copy label per default when copying articles or categories (CON-352) modified 2012-01-17, Mischa Holz, reworked strDeeperCategoriesArray to fix [CON-453] $Id: functions.str.php 1785 2012-01-17 16:53:36Z mischa.holz $: }}
- Version
- 1.3.11
Functions
recCats( $aCats, $sInsertQuery, $iNextTreeId, $aAllCats, $iLevel = 0) : void| Name | Type | Description |
|---|---|---|
| $aCats | ||
| $sInsertQuery | ||
| $iNextTreeId | ||
| $aAllCats | ||
| $iLevel |
strCopyCategory(int $idcat, int $destidcat, bool $remakeTree = true, bool $bUseCopyLabel = true) : voidCopies the category and it's existing articles into another category.
| Name | Type | Description |
|---|---|---|
| $idcat | int | Id of category to copy |
| $destidcat | int | Id of destination category |
| $remakeTree | bool | Flag to rebuild category tree |
| $bUseCopyLabel | bool | Flag to add copy label to the new categories |
strCopyTree(int $idcat, int $destcat, bool $remakeTree = true, bool $bUseCopyLabel = true) : voidCopies the categorytree (category and its childs) to an another category.
| Name | Type | Description |
|---|---|---|
| $idcat | int | Id of category to copy |
| $destcat | int | Id of destination category |
| $remakeTree | bool | Flag to rebuild category tree |
| $bUseCopyLabel | bool | Flag to add copy label to the new categories |
strDeeperCategoriesArray(int $idcat_start) : ArrayReturns all childs and childchidls of $idcat_start
| Name | Type | Description |
|---|---|---|
| $idcat_start | int | the start category |
| Type | Description |
|---|---|
| Array | contains all childs of $idcat_start and $id_cat start itself |
strDeleteCategory(int $idcat) : voidDeletes the category and its template configurations.
Only categories having no child categories and having no articles will be deleted!
| Name | Type | Description |
|---|---|---|
| $idcat | int | Id of category to delete |
strHasArticles(int $tmp_idcat) : boolChecks, if passed category cotains any articles
| Name | Type | Description |
|---|---|---|
| $tmp_idcat | int | ID of category |
| Type | Description |
|---|---|
| bool |
strHasStartArticle(int $idcat, int $idlang) : boolChecks if category has a start article
| Name | Type | Description |
|---|---|---|
| $idcat | int | Id of category |
| $idlang | int | The language id |
| Type | Description |
|---|---|
| bool |
strMakePublic(int $idcat, int $lang, int $public) : voidSets the public status of the category and its childs
| Name | Type | Description |
|---|---|---|
| $idcat | int | Category id |
| $lang | int | Language id |
| $public | int | Public status |
strMakeVisible(int $idcat, int $lang, int $visible) : voidSets the visible status of the category and its childs
| Name | Type | Description |
|---|---|---|
| $idcat | int | Category id |
| $lang | int | Language id |
| $visible | int | Visible status |
strMoveCatTargetallowed(int $idcat, int $source) : boolChecks if category is movable.
| Name | Type | Description |
|---|---|---|
| $idcat | int | Id of category to move |
| $source | int | Id of source category |
| Type | Description |
|---|---|
| bool |
strMoveDownCategory(int $idcat) : voidMoves a category downwards.
| Name | Type | Description |
|---|---|---|
| $idcat | int | Id of category to move downwards |
strMoveSubtree(int $idcat, int $parentid_new) : voidMoves a subtree to another destination.
| Name | Type | Description |
|---|---|---|
| $idcat | int | Id of category |
| $parentid_new | int | Id of destination parent category |
strMoveUpCategory(int $idcat) : voidMoves a category upwards.
| Name | Type | Description |
|---|---|---|
| $idcat | int | Id of category to move upwards |
strNewCategory(int $tmp_parentid, string $catname, bool $remakeTree = true, string $catalias = '', bool $bVisible = 0, bool $bPublic = 1, int $iIdtplcfg = 0) : \(int | \void)Creates a new category.
| Name | Type | Description |
|---|---|---|
| $tmp_parentid | int | Id of parent category |
| $catname | string | The category name |
| $remakeTree | bool | Flag to rebuild category tree structure |
| $catalias | string | Alias of category |
| $bVisible | bool | Flag about visible status |
| $bPublic | bool | Flag about public status |
| $iIdtplcfg | int | Id of template configuration |
| Type | Description |
|---|---|
| \(int | \void) | Id of new generated category or nothing on failure |
strNewTree(string $catname, string $catalias = '', bool $bVisible = 0, bool $bPublic = 1, int $iIdtplcfg = 0) : \(int | \void)Creates a new category tree (root category item).
| Name | Type | Description |
|---|---|---|
| $catname | string | The category name |
| $catalias | string | Alias of category |
| $bVisible | bool | Flag about visible status |
| $bPublic | bool | Flag about public status |
| $iIdtplcfg | int | Id of template configuration |
| Type | Description |
|---|---|
| \(int | \void) | Id of new generated category or nothing on failure |
strNextDeeper( $tmp_idcat, $ignore_lang = false) : void| Name | Type | Description |
|---|---|---|
| $tmp_idcat | ||
| $ignore_lang |
strNextDeeperAll( $tmp_idcat, $ignore_lang = false) : voidHotfix recursive call more than 200 times exit script on hosteurope Timo.Trautmann
| Name | Type | Description |
|---|---|---|
| $tmp_idcat | ||
| $ignore_lang |
strRemakeTreeTableFindNext( $tmp_idcat, $tmp_level) : voidHotfix recursive call more than 200 times exit script on hosteurope Timo.Trautmann (strRemakeTreeTableFindNext)
@deprecated
| Name | Type | Description |
|---|---|---|
| $tmp_idcat | ||
| $tmp_level |
strRenameCategory(int $idcat, int $lang, string $newcategoryname, string $newcategoryalias) : voidRenames a category
| Name | Type | Description |
|---|---|---|
| $idcat | int | Category id |
| $lang | int | Language id |
| $newcategoryname | string | New category name |
| $newcategoryalias | string | New category alias |
strSyncCategory(int $idcatParam, int $sourcelang, int $targetlang, bool $bMultiple = false) : voidSynchronizes a category from one language to another language.
| Name | Type | Description |
|---|---|---|
| $idcatParam | int | Id of category to synchronize |
| $sourcelang | int | Id of source language |
| $targetlang | int | Id of target language |
| $bMultiple | bool | Flag to synchronize child languages |