<commit_before><?php
/*"******************************************************************************************************
*   (c) 2004-2006 by MulchProductions, www.mulchprod.de                                                 *
*   (c) 2007-2014 by Kajona, www.kajona.de                                                              *
*       Published under the GNU LGPL v2.1, see /system/licence_lgpl.txt                                 *
*-------------------------------------------------------------------------------------------------------*
*	$Id$                            *
********************************************************************************************************/


/**
 * This class provides a list-view of the folders created in the database / filesystem.
 * Since Kajona 3.4.1 this class is deprecated. All methods have been moved to the appropriate source-modules.
 * It only remains as a switch between different browsers.
 *
 * @package module_mediamanager
 * @author <EMAIL>
 * @deprecated
 *
 * @module mediamanager
 * @moduleId _mediamanager_module_id_
 */
class class_module_folderview_admin extends class_admin implements interface_admin {

    /**
     * Constructor, doing nothing but a few inits
     */
    public function __construct() {
        $this->setArrModuleEntry("template", "/folderview.tpl");
        parent::__construct();
        $this->setStrLangBase("mediamanager");

    }


    protected function getOutputModuleTitle() {
        return $this->getLang("moduleFolderviewTitle");
    }

    /**
     * @return string
     * @autoTestable
     * @permissions view
     */
    protected function actionBrowserChooser() {
        $strReturn = "";

        if($this->getParam("CKEditorFuncNum") != "") {
            $strReturn .= "<script type=\"text/javascript\">window.opener.KAJONA.admin.folderview.selectCallbackCKEditorFuncNum = " . (int)$this->getParam("CKEditorFuncNum") . ";</script>";
        }

        $intCounter = 1;
        $strReturn .= $this->objToolkit->listHeader();

        if(class_module_system_module::getModuleByName("pages") !== null) {
            $strAction = $this->objToolkit->listButton(
                getLinkAdmin(
                    "pages",
                    "pagesFolderBrowser",
                    "&pages=1&form_element=" . $this->getParam("form_element") . "&bit_link=1",
                    $this->getLang("wysiwygPagesBrowser"),
                    $this->getLang("wysiwygPagesBrowser"),
                    "icon_folderActionOpen"
                )
            );
            $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygPagesBrowser"), "", $strAction, $intCounter++);
        }

        if(validateSystemid(_mediamanager_default_filesrepoid_) && class_module_system_module::getModuleByName("mediamanager") !== null) {
            $strAction = $this->objToolkit->listButton(
                getLinkAdmin(
                    "mediamanager",
                    "folderContentFolderviewMode",
                    "&systemid=" . _mediamanager_default_filesrepoid_ . "&form_element=" . $this->getParam("form_element") . "&bit_link=1",
                    $this->getLang("wysiwygFilesBrowser"),
                    $this->getLang("wysiwygFilesBrowser"),
                    "icon_folderActionOpen"
                )
            );
            $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygFilesBrowser"), "", $strAction, $intCounter++);
        }

        if(validateSystemid(_mediamanager_default_imagesrepoid_) && class_module_system_module::getModuleByName("mediamanager") !== null) {
            $strAction = $this->objToolkit->listButton(
                getLinkAdmin(
                    "mediamanager",
                    "folderContentFolderviewMode",
                    "&systemid=" . _mediamanager_default_imagesrepoid_ . "&form_element=" . $this->getParam("form_element") . "&bit_link=1",
                    $this->getLang("wysiwygImagesBrowser"),
                    $this->getLang("wysiwygImagesBrowser"),
                    "icon_folderActionOpen"
                )
            );
            $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygImagesBrowser"), "", $strAction, $intCounter++);
        }

        if(class_module_system_module::getModuleByName("mediamanager") !== null) {
            $strAction = $this->objToolkit->listButton(
                getLinkAdmin(
                    "mediamanager",
                    "folderContentFolderviewMode",
                    "&form_element=" . $this->getParam("form_element") . "&bit_link=1",
                    $this->getLang("wysiwygRepoBrowser"),
                    $this->getLang("wysiwygRepoBrowser"),
                    "icon_folderActionOpen"
                )
            );
            $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygRepoBrowser"), "", $strAction, $intCounter++);
        }

        $strReturn .= $this->objToolkit->listFooter();<commit_msg>BUG: module_mediamanager | class_module_folderview_admin -> fixed possible NpE in combination with delete default repositories<commit_after><?php
/*"******************************************************************************************************
*   (c) 2004-2006 by MulchProductions, www.mulchprod.de                                                 *
*   (c) 2007-2014 by Kajona, www.kajona.de                                                              *
*       Published under the GNU LGPL v2.1, see /system/licence_lgpl.txt                                 *
*-------------------------------------------------------------------------------------------------------*
*	$Id$                            *
********************************************************************************************************/


/**
 * This class provides a list-view of the folders created in the database / filesystem.
 * Since Kajona 3.4.1 this class is deprecated. All methods have been moved to the appropriate source-modules.
 * It only remains as a switch between different browsers.
 *
 * @package module_mediamanager
 * @author <EMAIL>
 * @deprecated
 *
 * @module mediamanager
 * @moduleId _mediamanager_module_id_
 */
class class_module_folderview_admin extends class_admin implements interface_admin {

    /**
     * Constructor, doing nothing but a few inits
     */
    public function __construct() {
        $this->setArrModuleEntry("template", "/folderview.tpl");
        parent::__construct();
        $this->setStrLangBase("mediamanager");

    }


    /**
     * @return string
     */
    protected function getOutputModuleTitle() {
        return $this->getLang("moduleFolderviewTitle");
    }

    /**
     * @return string
     * @autoTestable
     * @permissions view
     */
    protected function actionBrowserChooser() {
        $strReturn = "";

        if($this->getParam("CKEditorFuncNum") != "") {
            $strReturn .= "<script type=\"text/javascript\">window.opener.KAJONA.admin.folderview.selectCallbackCKEditorFuncNum = " . (int)$this->getParam("CKEditorFuncNum") . ";</script>";
        }

        $intCounter = 1;
        $strReturn .= $this->objToolkit->listHeader();

        if(class_module_system_module::getModuleByName("pages") !== null) {
            $strAction = $this->objToolkit->listButton(
                class_link::getLinkAdmin(
                    "pages",
                    "pagesFolderBrowser",
                    "&pages=1&form_element=" . $this->getParam("form_element") . "&bit_link=1",
                    $this->getLang("wysiwygPagesBrowser"),
                    $this->getLang("wysiwygPagesBrowser"),
                    "icon_folderActionOpen"
                )
            );
            $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygPagesBrowser"), "", $strAction, $intCounter++);
        }

        if(validateSystemid(_mediamanager_default_filesrepoid_) && class_module_system_module::getModuleByName("mediamanager") !== null && class_objectfactory::getInstance()->getObject(_mediamanager_default_filesrepoid_) !== null) {
            $strAction = $this->objToolkit->listButton(
                class_link::getLinkAdmin(
                    "mediamanager",
                    "folderContentFolderviewMode",
                    "&systemid=" . _mediamanager_default_filesrepoid_ . "&form_element=" . $this->getParam("form_element") . "&bit_link=1",
                    $this->getLang("wysiwygFilesBrowser"),
                    $this->getLang("wysiwygFilesBrowser"),
                    "icon_folderActionOpen"
                )
            );
            $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygFilesBrowser"), "", $strAction, $intCounter++);
        }

        if(validateSystemid(_mediamanager_default_imagesrepoid_) && class_module_system_module::getModuleByName("mediamanager") !== null && class_objectfactory::getInstance()->getObject(_mediamanager_default_imagesrepoid_) !== null) {
            $strAction = $this->objToolkit->listButton(
                class_link::getLinkAdmin(
                    "mediamanager",
                    "folderContentFolderviewMode",
                    "&systemid=" . _mediamanager_default_imagesrepoid_ . "&form_element=" . $this->getParam("form_element") . "&bit_link=1",
                    $this->getLang("wysiwygImagesBrowser"),
                    $this->getLang("wysiwygImagesBrowser"),
                    "icon_folderActionOpen"
                )
            );
            $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygImagesBrowser"), "", $strAction, $intCounter++);
        }

        if(class_module_system_module::getModuleByName("mediamanager") !== null) {
            $strAction = $this->objToolkit->listButton(
                class_link::getLinkAdmin(
                    "mediamanager",
                    "folderContentFolderviewMode",
                    "&form_element=" . $this->getParam("form_element") . "&bit_link=1",
                    $this->getLang("wysiwygRepoBrowser"),
                    $this->getLang("wysiwygRepoBrowser"),
                    "icon_folderActionOpen"
                )
            );
            $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygRepoBrowser"), "", $strAction, $intCounter++);
        }

        $strReturn .= $this->objToolkit->listFooter();
{'fraction_non_alphanumeric': 0.179928517682468, 'fraction_numerical': 0.005079006772009029, 'mean_word_length': 2.1589423648247177, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 94, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6741537', 'n_tokens_mistral': 2872, 'n_tokens_neox': 2685, 'n_words': 398}