Exemplo n.º 1
0
    $oUser->setCurrentVisitIP($_SERVER['REMOTE_ADDR']);
    $oUser->setCurrentVisitMoment(date('Y-m-d H:i:s'));
    $boolFreshUser = true;
}
// planting an article tree
$ogArticleTree = new NSTree($oDB, $fusebox['tableArticlesTree'], $fusebox['tableArticlesTokens']);
if (!$ogArticleTree->initialize(array('token' => $fusebox['defaultArticleRoot'], 'id_author' => $oUser->getID(), 'moment' => date("Y-m-d H:i:s")))) {
    _throw("FNoArticlesTables", "There is no articles tree table \"{$fusebox['tableArticlesTree']}\" or articles tokens table \"{$fusebox['tableArticlesTokens']}\" present in DB");
}
// adding article manager
$ogArticleManager = new ContentManager($oDB, $ogFuseaction, $oLanguage, $fusebox['tableArticlesTokens'], $fusebox['tableArticles'], $fusebox['tableArticlesComments'], false);
// setting authorship
$ogArticleManager->fAuthorID = $oUser->getID();
$ogArticleManager->fEditorID = $oUser->getID();
// running dry
if (!$ogArticleManager->initialize()) {
    _throw("FNoArticlesTable", "There is no articles table called \"{$fusebox['tableArticles']}\" present in DB");
}
$ogArticleManager->fTitleEditLink = "%s&nbsp;<a href=\"javascript:void(0);\" onClick=\"popupContentForm('" . $myself . "util.showArticleForm', %d, '%s', %d, 1);\">Edit</a>";
$ogArticleManager->fContentEditLink = "%s&nbsp;<a href=\"javascript:void(0);\" onClick=\"popupContentForm('" . $myself . "util.showArticleForm', %d, '%s', %d, 2);\">Edit</a>";
$ogArticleAttachmentManager = new ArticleAttachmentManager($oDB, $ogArticleManager, $fusebox['tableArticleAttachments']);
// creating gallery manager
$ogGalleryManager = new GalleryManager($oDB, $oLanguage, $fusebox['tableGalleriesTokens'], $fusebox['tableGalleries'], $fusebox['tableImagesTokens'], $fusebox['tableImages'], $fusebox['tableGalleriesComments'], $fusebox['tableImagesComments']);
// setting authorship
$ogGalleryManager->fAuthorID = $oUser->getID();
$ogGalleryManager->fEditorID = $oUser->getID();
// bringing up
if (!$ogGalleryManager->initialize()) {
    _throw("FNoGalleryTables", "There is no gallery and images tables present in DB");
}
// security managers initialization (for current FA and 'global' for entire site)