Esempio n. 1
0
                    $gBitSmarty->assign('choose', $lookupHash['page']);
                    $gBitSmarty->assign('dupePages', $existsInfo);
                    $gBitSystem->display('bitpackage:wiki/page_select.tpl', NULL, array('display_mode' => 'display'));
                    die;
                } else {
                    $loadPageId = $existsInfo[0]['page_id'];
                    $loadContentId = $existsInfo[0]['content_id'];
                }
            }
        } elseif ($loadPage) {
            $gBitSmarty->assign('page', $loadPage);
            //to have the create page link in the error
        }
    }
    if (!empty($loadContentId)) {
        $gContent = BitPage::getLibertyObject($loadContentId);
    }
    if (empty($gContent) || !is_object($gContent)) {
        $gContent = new BitPage();
    }
}
// we weren't passed a structure, but maybe this page belongs to one. let's check...
if ($gContent->isValid() && empty($gStructure)) {
    //Get the structures this page is a member of
    if (!empty($lookupHash['structure'])) {
        $structure = $lookupHash['structure'];
    } else {
        $structure = '';
    }
    $structs = $gContent->getStructures();
    if (count($structs) == 1) {