Ejemplo n.º 1
0
            $_REQUEST['minor'] = false;
            //			$links = $gContent->get_links( $edit );
            //			$wikilib->cache_links( $links );
            //			$gContent->storeLinks( $links );
        }
    } else {
        //		$links = $gContent->get_links( $_REQUEST["edit"] );
        //		$notcachedlinks = $gContent->get_links_nocache( $_REQUEST["edit"] );
        //		$cachedlinks = array_diff( $links, $notcachedlinks );
        //		$gContent->cache_links( $cachedlinks );
        //		$gContent->storeLinks( $cachedlinks );
    }
    $data_to_parse = $formInfo['edit'];
    if (!empty($formInfo['section']) && !empty($gContent->mInfo['data'])) {
        $full_page_data = $gContent->mInfo['data'];
        $data_to_parse = replace_section($full_page_data, $formInfo['section'], $formInfo['edit']);
        $_REQUEST["edit"] = $data_to_parse;
    }
    if ($gContent->store($_REQUEST)) {
        if ($gBitSystem->isFeatureActive('wiki_watch_author')) {
            $gBitUser->storeWatch("wiki_page_changed", $gContent->mPageId, $gContent->mContentTypeGuid, $_REQUEST['title'], $gContent->getDisplayUrl());
        }
        header("Location: " . $gContent->getDisplayUrl($gContent->mPageName));
        die;
    } else {
        $formInfo = $_REQUEST;
        $formInfo['data'] =& $_REQUEST['edit'];
    }
} elseif (!empty($_REQUEST['edit'])) {
    // perhaps we have a javascript non-saving form submit
    $formInfo = $_REQUEST;
    replace_js();
    exit;
}
if (isset($_POST["replace-delete"])) {
    replace_delete();
    exit;
}
if (isset($_GET["replace-popup"])) {
    replace_popup();
    exit;
}
if (isset($_POST["replaceid"])) {
    replace_save();
    exit;
}
replace_section();
function replace_section()
{
    $boot = new boostrap_form();
    $tpl = new templates();
    $page = CurrentPageName();
    $servername = $_GET["servername"];
    $folderid = $_GET["folderid"];
    $q = new mysql_squid_builder();
    $sock = new sockets();
    $ARRAY = unserialize(base64_decode($sock->getFrameWork("nginx.php?status-infos=yes")));
    if (!is_array($ARRAY["MODULES"])) {
        $ARRAY["MODULES"] = array();
    }
    $COMPAT = FALSE;
    while (list($a, $b) = each($ARRAY["MODULES"])) {