예제 #1
0
                            $bb_page["perms"]["_p"] = array();
                            if (isset($_REQUEST["perms"]) && is_array($_REQUEST["perms"])) {
                                foreach ($_REQUEST["perms"] as $group) {
                                    $bb_page["perms"]["_p"][$group] = true;
                                }
                            }
                            if ($bb_revision_writeable) {
                                $bb_langpage["title"] = $_REQUEST["title"];
                                $bb_langpage["metadesc"] = $_REQUEST["metadesc"];
                                BB_SaveLangPage($bb_revision_num);
                            }
                            BB_SavePage();
                            BB_UpdateSitemaps();
                        }
                    }
                    BB_DeletePageCache();
                    ?>
<div class="success"><?php 
                    echo htmlspecialchars(BB_Translate("Options saved."));
                    ?>
</div>
<script type="text/javascript">
ReloadIFrame();
CloseProperties();
</script>
<?php 
                    BB_RunPluginAction("post_bb_main_edit_page_opt_properties_submit");
                } else {
                    if ($_REQUEST["bb_action"] == "bb_main_edit_page_opt_properties") {
                        BB_RunPluginAction("pre_bb_main_edit_page_opt_properties");
                        if (!BB_IsMemberOfPageGroup("_p")) {
예제 #2
0
function BB_SaveLangPage($revnum)
{
    global $bb_dir, $bb_file, $bb_pref_lang, $bb_langpage, $bb_revision_num, $bb_revision, $bb_langpagerevisions, $bb_widget, $bb_widget_id;
    if (!BB_IsRevisionWriteable($revnum)) {
        return false;
    }
    if (isset($bb_widget) && isset($bb_widget_id) && $bb_widget_id != "") {
        $bb_widget->Save();
    }
    if ($revnum < 0) {
        $data = "<" . "?php\n\t\$bb_langpage = " . BB_CreatePHPStorageData($bb_langpage) . ";\n?" . ">";
        if (BB_WriteFile($bb_dir . "/" . $bb_file . "_" . $bb_pref_lang . "_page.php", $data) === false) {
            return false;
        }
        BB_DeletePageCache();
        BB_RunPluginAction("post_bb_savelangpage");
    } else {
        $bb_langpagerevisions["revisions"][$revnum][1] = serialize($bb_langpage);
        $bb_langpagerevisions["revisions"][$revnum][3] = time();
        if ($revnum == $bb_revision_num) {
            $bb_revision = $bb_langpagerevisions["revisions"][$revnum];
        }
        BB_RunPluginActionInfo("post_bb_savelangpage_revision", $revnum);
        return BB_SaveRevisions();
    }
    return true;
}