当前位置: 首页>>代码示例>>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;未经允许,请勿转载。