contenido\includes\functions.str.php

Show: PublicProtectedPrivateinherited
    Table of Contents
    Project: Contenido Content Management System

    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

    functionrecCats( $aCats,  $sInsertQuery,  $iNextTreeId,  $aAllCats,  $iLevel = 0) : void

    Parameters
    NameTypeDescription
    $aCats
    $sInsertQuery
    $iNextTreeId
    $aAllCats
    $iLevel
    functionsort_pre_post( $arr) : void

    Parameters
    NameTypeDescription
    $arr
    functionstrCopyCategory(int $idcat, int $destidcat, bool $remakeTree = true, bool $bUseCopyLabel = true) : void

    Copies the category and it's existing articles into another category.

    Parameters
    NameTypeDescription
    $idcatint

    Id of category to copy

    $destidcatint

    Id of destination category

    $remakeTreebool

    Flag to rebuild category tree

    $bUseCopyLabelbool

    Flag to add copy label to the new categories

    functionstrCopyTree(int $idcat, int $destcat, bool $remakeTree = true, bool $bUseCopyLabel = true) : void

    Copies the categorytree (category and its childs) to an another category.

    Parameters
    NameTypeDescription
    $idcatint

    Id of category to copy

    $destcatint

    Id of destination category

    $remakeTreebool

    Flag to rebuild category tree

    $bUseCopyLabelbool

    Flag to add copy label to the new categories

    functionstrDeeperCategoriesArray(int $idcat_start) : Array

    Returns all childs and childchidls of $idcat_start

    Parameters
    NameTypeDescription
    $idcat_startint

    the start category

    Returns
    TypeDescription
    Arraycontains all childs of $idcat_start and $id_cat start itself
    functionstrDeleteCategory(int $idcat) : void

    Deletes the category and its template configurations.

    Only categories having no child categories and having no articles will be deleted!

    Parameters
    NameTypeDescription
    $idcatint

    Id of category to delete

    functionstrHasArticles(int $tmp_idcat) : bool

    Checks, if passed category cotains any articles

    Parameters
    NameTypeDescription
    $tmp_idcatint

    ID of category

    Returns
    TypeDescription
    bool
    functionstrHasStartArticle(int $idcat, int $idlang) : bool

    Checks if category has a start article

    Parameters
    NameTypeDescription
    $idcatint

    Id of category

    $idlangint

    The language id

    Returns
    TypeDescription
    bool
    functionstrMakePublic(int $idcat, int $lang, int $public) : void

    Sets the public status of the category and its childs

    Parameters
    NameTypeDescription
    $idcatint

    Category id

    $langint

    Language id

    $publicint

    Public status

    functionstrMakeVisible(int $idcat, int $lang, int $visible) : void

    Sets the visible status of the category and its childs

    Parameters
    NameTypeDescription
    $idcatint

    Category id

    $langint

    Language id

    $visibleint

    Visible status

    functionstrMoveCatTargetallowed(int $idcat, int $source) : bool

    Checks if category is movable.

    Parameters
    NameTypeDescription
    $idcatint

    Id of category to move

    $sourceint

    Id of source category

    Returns
    TypeDescription
    bool
    functionstrMoveDownCategory(int $idcat) : void

    Moves a category downwards.

    Parameters
    NameTypeDescription
    $idcatint

    Id of category to move downwards

    functionstrMoveSubtree(int $idcat, int $parentid_new) : void

    Moves a subtree to another destination.

    Parameters
    NameTypeDescription
    $idcatint

    Id of category

    $parentid_newint

    Id of destination parent category

    functionstrMoveUpCategory(int $idcat) : void

    Moves a category upwards.

    Parameters
    NameTypeDescription
    $idcatint

    Id of category to move upwards

    functionstrNewCategory(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.

    Parameters
    NameTypeDescription
    $tmp_parentidint

    Id of parent category

    $catnamestring

    The category name

    $remakeTreebool

    Flag to rebuild category tree structure

    $cataliasstring

    Alias of category

    $bVisiblebool

    Flag about visible status

    $bPublicbool

    Flag about public status

    $iIdtplcfgint

    Id of template configuration

    Returns
    TypeDescription
    \(int | \void)Id of new generated category or nothing on failure
    functionstrNewTree(string $catname, string $catalias = '', bool $bVisible = 0, bool $bPublic = 1, int $iIdtplcfg = 0) : \(int | \void)

    Creates a new category tree (root category item).

    Parameters
    NameTypeDescription
    $catnamestring

    The category name

    $cataliasstring

    Alias of category

    $bVisiblebool

    Flag about visible status

    $bPublicbool

    Flag about public status

    $iIdtplcfgint

    Id of template configuration

    Returns
    TypeDescription
    \(int | \void)Id of new generated category or nothing on failure
    functionstrNextBackwards( $tmp_idcat) : void

    Parameters
    NameTypeDescription
    $tmp_idcat
    functionstrNextDeeper( $tmp_idcat,  $ignore_lang = false) : void

    Parameters
    NameTypeDescription
    $tmp_idcat
    $ignore_lang
    functionstrNextDeeperAll( $tmp_idcat,  $ignore_lang = false) : void

    Hotfix recursive call more than 200 times exit script on hosteurope Timo.Trautmann

    Parameters
    NameTypeDescription
    $tmp_idcat
    $ignore_lang
    functionstrNextPost( $tmp_idcat) : void

    Parameters
    NameTypeDescription
    $tmp_idcat
    functionstrOrderedPostTreeList( $idcat,  $poststring) : void

    Parameters
    NameTypeDescription
    $idcat
    $poststring
    functionstrRemakeTreeTable() : void

    Remakes the category tree structure in category tree table.

    functionstrRemakeTreeTableFindNext( $tmp_idcat,  $tmp_level) : void

    Hotfix recursive call more than 200 times exit script on hosteurope Timo.Trautmann (strRemakeTreeTableFindNext)

    @deprecated

    Parameters
    NameTypeDescription
    $tmp_idcat
    $tmp_level
    functionstrRenameCategory(int $idcat, int $lang, string $newcategoryname, string $newcategoryalias) : void

    Renames a category

    Parameters
    NameTypeDescription
    $idcatint

    Category id

    $langint

    Language id

    $newcategorynamestring

    New category name

    $newcategoryaliasstring

    New category alias

    functionstrShowTreeTable() : void

    Renders the category tree a HTML table

    functionstrSyncCategory(int $idcatParam, int $sourcelang, int $targetlang, bool $bMultiple = false) : void

    Synchronizes a category from one language to another language.

    Parameters
    NameTypeDescription
    $idcatParamint

    Id of category to synchronize

    $sourcelangint

    Id of source language

    $targetlangint

    Id of target language

    $bMultiplebool

    Flag to synchronize child languages

    Documentation was generated by phpDocumentor 2.0.0a12.