admin toolbox with category context

vincent3569 Member, Translator
edited December 2017 in General support

hi

I have a look on this code in zp-core\zp-extensions\zenpage.php (line 314 and following)

    static function admin_toolbox_news($redirect, $zf) {
        global $_zp_zenpage, $_zp_current_category, $_zp_current_zenpage_news;
        if (is_NewsArticle()) {
            if (zp_loggedin(ZENPAGE_NEWS_RIGHTS) && ZP_NEWS_ENABLED) {



// page is a NewsArticle--provide zenpage edit, delete, and Add links
                echo "<li><a href=\"" . $zf . '/' . PLUGIN_FOLDER . "/zenpage/admin-edit.php?newsarticle&amp;edit&amp;titlelink=" . html_encode($_zp_current_zenpage_news->getTitleLink()) . "\">" . gettext("Edit Article") . "</a></li>";
                if (GALLERY_SESSION) {
// XSRF defense requires sessions
                    ?>
                    <li>
                        <a href="javascript:confirmDelete('<?php echo $zf . '/' . PLUGIN_FOLDER; ?>/zenpage/admin-news-articles.php?del=<?php echo getNewsID(); ?>&amp;XSRFToken=<?php echo getXSRFToken('delete'); ?>',deleteArticle)"
                             title="<?php echo gettext("Delete article"); ?>"><?php echo gettext("Delete Article"); ?>  </a>
                    </li>
                    <?php
                }
                echo "<li><a href=\"" . $zf . '/' . PLUGIN_FOLDER . "/zenpage/admin-edit.php?newsarticle&amp;add\">" . gettext("Add Article") . "</a></li>";
            }
            $redirect .= '&amp;title=' . urlencode($_zp_current_zenpage_news->getTitlelink());
        } else {

            if (!empty($_zp_current_category)) {
                $redirect .= '&amp;category=' . $_zp_current_category->getTitlelink();
            }
        }
        return $redirect;
    }

what is suposed to do the else statement?
when I am on news loop or category, nothing is different on my toolbox menu.

Comments

  • acrylian Administrator, Developer

    Its for the redirect link when logging out on a category page so you return to/stay on that category page.

    And before you ask: Yes, there is no edit link for the current category itself for unknown reasons.

  • vincent3569 Member, Translator

    I didn't aked the question.
    but as you noticed, maybe it will a new feature...
    ;-)

  • acrylian Administrator, Developer

    Is considered ;-)

Sign In or Register to comment.