當前位置: 首頁>>代碼示例>>PHP>>正文


PHP site::fetchSiteAtOnceForeverAndEverAndDontForgetThePermissionsAsWell_Amen方法代碼示例

本文整理匯總了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") {
開發者ID:adamfranco,項目名稱:segue-1.x,代碼行數:31,代碼來源:copy_parts.php

示例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();
 }
開發者ID:adamfranco,項目名稱:segue-1.x,代碼行數:41,代碼來源:site.inc.php


注:本文中的site::fetchSiteAtOnceForeverAndEverAndDontForgetThePermissionsAsWell_Amen方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。