本文整理汇总了PHP中site::fetchSiteAtOnceForeverAndEverAndDontForgetThePermissionsAsWell_Amen方法的典型用法代码示例。如果您正苦于以下问题:PHP site::fetchSiteAtOnceForeverAndEverAndDontForgetThePermissionsAsWell_Amen方法的具体用法?PHP site::fetchSiteAtOnceForeverAndEverAndDontForgetThePermissionsAsWell_Amen怎么用?PHP site::fetchSiteAtOnceForeverAndEverAndDontForgetThePermissionsAsWell_Amen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类site
的用法示例。
在下文中一共展示了site::fetchSiteAtOnceForeverAndEverAndDontForgetThePermissionsAsWell_Amen方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: site
} else {
if ($_SESSION['type'] == "story") {
$GLOBALS['__site_hash']['stories'][$partObj->id] = 'NEXT';
}
}
}
if ($_REQUEST['keep_discussions'] == 'no') {
$keepDiscussion = FALSE;
} else {
$keepDiscussion = TRUE;
}
// move the object.
$partObj->copyObj($parentObj, $removeOrigional, $keepaddedby, $keepDiscussion);
// If we have moved to a new site, update the site links from the hash.
$newSiteObj = new site($parentObj->owningSiteObj->name);
$newSiteObj->fetchSiteAtOnceForeverAndEverAndDontForgetThePermissionsAsWell_Amen();
if ($_SESSION['type'] == "section") {
$newPartObj =& $newSiteObj->sections[$partObj->id];
} else {
if ($_SESSION['type'] == "page") {
$newPartObj =& $newSiteObj->sections[$_REQUEST['section']]->pages[$partObj->id];
} else {
if ($_SESSION['type'] == "story") {
$newPartObj =& $newSiteObj->sections[$_REQUEST['section']]->pages[$_REQUEST['page']]->stories[$partObj->id];
}
}
}
updateSiteLinksFromHash($newSiteObj, $newPartObj);
$newSiteObj->updateDB(1, 1);
// delete the origional
if ($_REQUEST['action'] == "MOVE") {
示例2: copySite
function copySite($newName, $clearPermissions = 1, $copyDiscussions = FALSE)
{
if ($newName == $this->name) {
return FALSE;
}
if ($newName == "" || !$newName) {
return FALSE;
}
$oldName = $this->name;
$this->fetchSiteAtOnceForeverAndEverAndDontForgetThePermissionsAsWell_Amen();
// Make a hash array of site, section, and page ids so that
makeSiteHash($this);
$newSiteObj = $this;
$newSiteObj->setSiteName($newName, 1);
// Since we are specifying TRUE for the 'copy' option, each
// part should add its new id to the global hash
$newSiteObj->insertDB(1, 1, 0, $copyDiscussions);
// Copy all the media
$query = "\n\t\t\tSELECT\n\t\t\t\tmedia_id\n\t\t\tFROM\n\t\t\t\tmedia\n\t\t\t\t\tINNER JOIN\n\t\t\t\tslot\n\t\t\t\t\tON\n\t\t\t\t\t\tmedia.FK_site = slot.FK_site\n\t\t\tWHERE\n\t\t\t\tslot_name='" . addslashes($oldName) . "'\n\t\t\t\tAND \n\t\t\t\tmedia_type != 'other'\n\t\t";
$r = db_query($query);
while ($a = db_fetch_assoc($r)) {
copy_media($a['media_id'], $newName);
}
$newSiteObj = NULL;
unset($newSiteObj);
$newSiteObj = new site($newName);
$newSiteObj->fetchSiteAtOnceForeverAndEverAndDontForgetThePermissionsAsWell_Amen();
// Remove the permissions if we are clearing them.
if ($clearPermissions) {
$editors = $newSiteObj->getEditors();
foreach ($editors as $editor) {
$newSiteObj->delEditor($editor);
}
}
// Parse through all the text for links refering to parts of the
// old site and update them with the new ids.
updateSiteLinksFromHash($newSiteObj, $newSiteObj);
$newSiteObj->updateDB(1, 1);
// Delete any editors that we wanted to delete.
$newSiteObj->deletePendingEditors();
}