当前位置: 首页>>代码示例>>PHP>>正文


PHP Legacy_Utils::getDirnameListByTrustDirname方法代码示例

本文整理汇总了PHP中Legacy_Utils::getDirnameListByTrustDirname方法的典型用法代码示例。如果您正苦于以下问题:PHP Legacy_Utils::getDirnameListByTrustDirname方法的具体用法?PHP Legacy_Utils::getDirnameListByTrustDirname怎么用?PHP Legacy_Utils::getDirnameListByTrustDirname使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Legacy_Utils的用法示例。


在下文中一共展示了Legacy_Utils::getDirnameListByTrustDirname方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getClientModules

 /**
  * getClientModules
  *
  * @param mixed[] &$list
  *
  * @return	void
  */
 public function getClientModules(&$list)
 {
     $dirnames = Legacy_Utils::getDirnameListByTrustDirname(basename(dirname(dirname(__FILE__))));
     foreach ($dirnames as $dirname) {
         $list[] = array('dirname' => $dirname, 'dataname' => 'rpg');
     }
     foreach ($dirnames as $dirname) {
         $list[] = array('dirname' => $dirname, 'dataname' => 'book');
     }
 }
开发者ID:kilica,项目名称:playermap,代码行数:17,代码来源:DelegateFunctions.class.php

示例2: getClientList

 /**
  * getClientList
  *
  * @param mixed[]    &$list
  *  @list[]['dirname']
  *  @list[]['dataname']
  * @param string    $dirname
  *
  * @return    void
  */
 public static function getClientList(&$list, $dirname)
 {
     $dirnames = Legacy_Utils::getDirnameListByTrustDirname('legroup');
     //don't call this method multiple times when site owner duplicate.
     static $isCalled = false;
     if ($isCalled === true) {
         return;
     }
     foreach ($dirnames as $dir) {
         $list[] = array('dirname' => $dir, 'dataname' => 'group');
     }
     $isCalled = true;
 }
开发者ID:mambax7,项目名称:legroup,代码行数:23,代码来源:DelegateFunctions.class.php

示例3: getClientList

 /**
  * getClientList
  *
  * @param mixed[]   &$list
  *  @list[]['dirname']
  *  @list[]['dataname']
  *
  * @return  void
  */
 public static function getClientList(&$list)
 {
     $dirnames = Legacy_Utils::getDirnameListByTrustDirname(basename(dirname(dirname(dirname(__FILE__)))));
     //don't call this method multiple times when site owner duplicate this module.
     static $isCalled = false;
     if ($isCalled === true) {
         return;
     }
     $list[] = array('dirname' => $dir, 'dataname' => 'forums');
     $list[] = array('dirname' => $dir, 'dataname' => 'topics');
     $list[] = array('dirname' => $dir, 'dataname' => 'posts');
     $isCalled = true;
 }
开发者ID:naao,项目名称:xcforum_proto,代码行数:22,代码来源:ImageClient.class.php

示例4: getClientList

 /**
  * getClientList
  *
  * @param mixed[]   &$list
  *  @list[]['dirname']
  *  @list[]['dataname']
  * @param string    $tDirname   Legacy_Tag module's dirname
  *
  * @return  void
  */
 public static function getClientList(&$list, $tDirname)
 {
     //don't call this method multiple times when site owner duplicate.
     static $isCalled = false;
     if ($isCalled === true) {
         return;
     }
     //get dirname list of xupdatemaster
     $dirnames = Legacy_Utils::getDirnameListByTrustDirname(basename(dirname(dirname(dirname(__FILE__)))));
     foreach ($dirnames as $dir) {
         //setup client module info
         if (Xupdatemaster_Utils::getModuleConfig($dir, 'tag_dirname') == $tDirname) {
             $list[] = array('dirname' => $dir, 'dataname' => 'item');
         }
     }
     $isCalled = true;
 }
开发者ID:nao-pon,项目名称:xupdate_master,代码行数:27,代码来源:TagClient.class.php

示例5: getClientList

 /**
  * getClientList
  *
  * @param mixed[]   &$list
  *  string  $list[]['dirname']
  *  string  $list[]['dataname']
  *  string  $list[]['access_controller']
  *
  * @return  void
  */
 public static function getClientList(&$list)
 {
     //don't call this method multiple times when site owner duplicate.
     static $isCalled = false;
     if ($isCalled === true) {
         return;
     }
     //get dirname list of this module
     $dirnames = Legacy_Utils::getDirnameListByTrustDirname(basename(dirname(dirname(dirname(__FILE__)))));
     foreach ($dirnames as $dir) {
         //setup client module info
         $list[] = array('dirname' => $dir, 'dataname' => 'forums', 'access_controller' => Xcforum_Utils::getModuleConfig($dir, 'access_controller'));
         $list[] = array('dirname' => $dir, 'dataname' => 'topics', 'access_controller' => Xcforum_Utils::getModuleConfig($dir, 'access_controller'));
         $list[] = array('dirname' => $dir, 'dataname' => 'posts', 'access_controller' => Xcforum_Utils::getModuleConfig($dir, 'access_controller'));
         $list[] = array('dirname' => $dir, 'dataname' => 'users2topics', 'access_controller' => Xcforum_Utils::getModuleConfig($dir, 'access_controller'));
     }
     $isCalled = true;
 }
开发者ID:naao,项目名称:xcforum_proto,代码行数:28,代码来源:ActivityClient.class.php

示例6: _getXcckList

 /**
  * _getXcckList
  * 
  * @param	void
  * 
  * @return	mixed[]
  **/
 protected function _getXcckList()
 {
     $list = array('');
     $handler = xoops_gethandler('config');
     $dirnames = Legacy_Utils::getDirnameListByTrustDirname('xcck');
     foreach ($dirnames as $dirname) {
         //check self ?
         if ($dirname == $this->mAsset->mDirname) {
             continue;
         }
         //check maintable ?
         $conf = $handler->getConfigsByDirname($dirname);
         if ($conf['maintable']) {
             continue;
         }
         $list[] = $dirname;
     }
     return $list;
 }
开发者ID:mambax7,项目名称:xcck,代码行数:26,代码来源:IndexAction.class.php

示例7: getActionList

 /**
  * getActionList
  * Get client module's actions(view, edit, etc) to set their permission
  * by member's group rank.
  *
  * @param mixed[]   &$list
  *  $list['action'][]   string
  *  $list['rank'][]     Lenum_GroupRank
  *  $list['title'][]    string
  *  $list['desctiption'][]  string
  * @param string    $dirname
  * @param string    $dataname
  *
  * @return  void
  */
 public static function getActionList(&$list, $dirname, $dataname)
 {
     $dirnames = Legacy_Utils::getDirnameListByTrustDirname(basename(dirname(dirname(dirname(__FILE__)))));
     if (!in_array($dirname, $dirnames)) {
         return;
     }
     //don't call this method multiple times when site owner duplicate.
     static $isCalled = false;
     if ($isCalled === true) {
         return;
     }
     XCube_Root::getSingleton()->mLanguageManager->loadModuleMessageCatalog($dirname);
     //view
     $list['action'][] = 'view';
     $list['rank'][] = Lenum_GroupRank::GUEST;
     $list['title'][] = _MD_XCFORUM_TITLE_ACTION_VIEW;
     $list['description'][] = _MD_XCFORUM_DESC_ACTION_VIEW;
     //post
     $list['action'][] = 'post';
     $list['rank'][] = Lenum_GroupRank::REGULAR;
     $list['title'][] = _MD_XCFORUM_TITLE_ACTION_POST;
     $list['description'][] = _MD_XCFORUM_DESC_ACTION_POST;
     //review
     $list['action'][] = 'review';
     $list['rank'][] = Lenum_GroupRank::STAFF;
     $list['title'][] = _MD_XCFORUM_TITLE_ACTION_REVIEW;
     $list['description'][] = _MD_XCFORUM_DESC_ACTION_REVIEW;
     //manage
     $list['action'][] = 'manage';
     $list['rank'][] = Lenum_GroupRank::STAFF;
     $list['title'][] = _MD_XCFORUM_TITLE_ACTION_MANAGE;
     $list['description'][] = _MD_XCFORUM_DESC_ACTION_MANAGE;
     $isCalled = true;
 }
开发者ID:naao,项目名称:xcforum_proto,代码行数:49,代码来源:AccessClient.class.php

示例8: getGroupClientList

 public function getGroupClientList(&$list)
 {
     $dirnames = Legacy_Utils::getDirnameListByTrustDirname('log');
     foreach ($dirnames as $dirname) {
         $list[] = array('dirname' => $dirname, 'dataname' => 'log');
     }
 }
开发者ID:kilica,项目名称:playermap,代码行数:7,代码来源:DelegateFunctions_Group.class.php

示例9: deleteUserData

 public static function deleteUserData($user)
 {
     //don't call this method multiple times when site owner duplicate.
     static $isCalled = false;
     if ($isCalled === true) {
         return;
     }
     $uid = $user->get('uid');
     $dirnames = Legacy_Utils::getDirnameListByTrustDirname(basename(dirname(dirname(__DIR__))));
     foreach ($dirnames as $dirname) {
         $handler = Legacy_Utils::getModuleHandler('page', $dirname);
         $handler->deleteAll(new Criteria('uid', $uid));
     }
     $isCalled = true;
 }
开发者ID:mambax7,项目名称:xcck,代码行数:15,代码来源:DelegateFunctions.class.php

示例10: executeViewSuccess

 /**
  * executeViewSuccess
  * 
  * @param   XCube_RenderTarget  &$render
  * 
  * @return  void
  **/
 public function executeViewSuccess(&$render)
 {
     $render->setTemplateName($this->mAsset->mDirname . '_page_view.html');
     $render->setAttribute('dirname', $this->mAsset->mDirname);
     $render->setAttribute('dataname', 'page');
     $render->setAttribute('catTitle', $this->mCategoryManager->getTitle($this->mObject->get('category_id')));
     $render->setAttribute('object', $this->mObject);
     $render->setAttribute('definitions', Legacy_Utils::getModuleHandler('definition', $this->mAsset->mDirname)->getFields());
     $render->setAttribute('accessController', $this->mCategoryManager);
     $render->setAttribute('useMap', $this->mRoot->mContext->mModuleConfig['use_map']);
     $render->setAttribute('commentDirname', $this->mRoot->mContext->mModuleConfig['comment_dirname']);
     //setup images
     $this->mObject->setupImages($isPost = false);
     $render->setAttribute('imageObjs', $this->mObject->mImage);
     $render->setAttribute('imageNameList', Xcck_Utils::getImageNameList($this->mAsset->mDirname));
     //setup contents tree
     $isHierarchical = $this->mRoot->mContext->mModuleConfig['hierarchical'];
     $render->setAttribute('isHierarchical', $isHierarchical);
     if ($isHierarchical == 1) {
         $render->setAttribute('pageTree', $this->mObjectHandler->getTree($this->mObject->getTopId()));
     }
     //setup subtable objects
     $render->setAttribute('isSubtable', $this->_isSubtable());
     $chandler = xoops_gethandler('config');
     $mhandler = xoops_gethandler('module');
     $subtableDirnameArr = Legacy_Utils::getDirnameListByTrustDirname('xcck');
     //page criteria
     $subtableArr = array();
     $cri = new CriteriaCompo();
     $cri->add(new Criteria('status', Lenum_Status::PUBLISHED));
     $cri->add(new Criteria('maintable_id', $this->mObject->get('page_id')));
     XCube_DelegateUtils::call('Module.xcck.Event.GetSubtableCriteria', new XCube_Ref($cri), $this->mAsset->mDirname);
     //deprecated
     //definition criteria
     foreach ($subtableDirnameArr as $dirname) {
         $configArr = $chandler->getConfigsByDirname($dirname);
         if ($configArr['maintable'] == $this->mAsset->mDirname) {
             $subtableCri = clone $cri;
             XCube_DelegateUtils::call('Module.' . $dirname . '.SetupSubtableCriteria', new XCube_Ref($subtableCri), $this->mAsset->mDirname);
             $module = $mhandler->getByDirname($dirname);
             $subtableArr[] = array('dirname' => $dirname, 'name' => $module->get('name'));
             $definitionArr[$dirname] = Legacy_Utils::getModuleHandler('definition', $dirname)->getFields(true);
             $pageArr[$dirname] = Legacy_Utils::getModuleHandler('page', $dirname)->getObjects($subtableCri);
         }
     }
     if (count($subtableArr) > 0) {
         $render->setAttribute('subtableArr', $subtableArr);
         $render->setAttribute('definitionArr', $definitionArr);
         $render->setAttribute('pageArr', $pageArr);
     }
     $render->setAttribute('xoops_breadcrumbs', $this->_getBreadcrumb($this->mObject));
 }
开发者ID:mambax7,项目名称:xcck,代码行数:59,代码来源:PageViewAction.class.php

示例11: _setDataTrustModule

 private function _setDataTrustModule($sid, $item)
 {
     //$sid = (int)$sid;
     $item['version'] = isset($item['version']) ? round(floatval($item['version']) * 100) : 0;
     $item['replicatable'] = isset($item['replicatable']) ? intval($item['replicatable']) : 0;
     $item['target_key'] = isset($item['target_key']) ? $item['target_key'] : $item['dirname'];
     $item['trust_dirname'] = isset($item['trust_dirname']) ? $item['trust_dirname'] : $item['dirname'];
     $item['description'] = isset($item['description']) ? $item['description'] : '';
     if (function_exists('mb_convert_encoding')) {
         if ('UTF-8' != _CHARSET) {
             $item['description'] = mb_convert_encoding($item['description'], _CHARSET, 'UTF-8');
         }
     }
     $item['unzipdirlevel'] = isset($item['unzipdirlevel']) ? intval($item['unzipdirlevel']) : 0;
     $item['addon_url'] = isset($item['addon_url']) ? $item['addon_url'] : '';
     $item = $this->_createItemOptions($item);
     //インストール済みの同じtrustモージュールのリストを取得
     $list = Legacy_Utils::getDirnameListByTrustDirname($item['trust_dirname']);
     if (empty($list)) {
         //インストール済みの同じtrustモージュール無し、注意 is_activeはリストされない
         $mobj = new $this->modHand->mClass();
         $mobj->assignVars($item);
         $mobj->assignVar('sid', $sid);
         $mobj->setmModule();
         if (isset($this->mSiteModuleObjects[$sid][$item['target_key']][$item['dirname']])) {
             $mobj->assignVar('id', $this->mSiteModuleObjects[$sid][$item['target_key']][$item['dirname']]->getVar('id'));
             $this->_ModuleStoreUpdate($mobj, $this->mSiteModuleObjects[$sid][$item['target_key']][$item['dirname']]);
         } else {
             $mobj->setNew();
             $this->modHand->insert($mobj, true);
             $this->mSiteModuleObjects[$sid][$item['target_key']][$item['dirname']] = $mobj;
         }
         unset($mobj);
     } else {
         $_isrootdirmodule = false;
         foreach ($list as $dirname) {
             $mobj = new $this->modHand->mClass();
             $mobj->assignVars($item);
             $mobj->assignVar('sid', $sid);
             //same trust_path module
             $mobj->assignVar('dirname', $dirname);
             $mobj->setmModule();
             if ($dirname == $item['dirname']) {
                 $_isrootdirmodule = true;
             }
             if (isset($this->mSiteModuleObjects[$sid][$item['target_key']][$item['dirname']])) {
                 $mobj->assignVar('id', $this->mSiteModuleObjects[$sid][$item['target_key']][$dirname]->getVar('id'));
                 $this->_ModuleStoreUpdate($mobj, $this->mSiteModuleObjects[$sid][$item['target_key']][$item['dirname']]);
             } else {
                 $mobj->setNew();
                 $this->modHand->insert($mobj, true);
                 $this->mSiteModuleObjects[$sid][$item['target_key']][$dirname] = $mobj;
             }
             unset($mobj);
         }
         //そのままインストールしていない場合、そのまま追加可能なので
         if ($_isrootdirmodule == false) {
             $mobj = new $this->modHand->mClass();
             $mobj->assignVars($item);
             $mobj->assignVar('sid', $sid);
             $mobj->setmModule();
             if (isset($this->mSiteModuleObjects[$sid][$item['target_key']][$item['dirname']])) {
                 $mobj->assignVar('id', $this->mSiteModuleObjects[$sid][$item['target_key']][$item['dirname']]->getVar('id'));
                 $this->_ModuleStoreUpdate($mobj, $this->mSiteModuleObjects[$sid][$item['target_key']][$item['dirname']]);
             } else {
                 $mobj->setNew();
                 $this->modHand->insert($mobj, true);
                 $this->mSiteModuleObjects[$sid][$item['target_key']][$item['dirname']] = $mobj;
             }
             unset($mobj);
         }
     }
 }
开发者ID:nao-pon,项目名称:xupdate,代码行数:73,代码来源:ModulesIniDadaSet.class.php

示例12: _deleteSubtable

 /**
  * @return  bool
  */
 protected function _deleteSubtable(Xcck_PageObject $obj)
 {
     //delete subtable
     $dirnames = Legacy_Utils::getDirnameListByTrustDirname('xcck');
     foreach ($dirnames as $dirname) {
         if (Xcck_Utils::getModuleConfig($dirname, 'maintable') == $obj->getDirname()) {
             return Legacy_Utils::getModuleHandler('page', $dirname)->deleteAll(new Criteria('maintable_id', $obj->get('page_id')));
         }
     }
 }
开发者ID:mambax7,项目名称:xcck,代码行数:13,代码来源:Page.class.php

示例13: _getXcckList

 /**
  * _getXcckList
  * 
  * @param	void
  * 
  * @return	mixed[]
  **/
 protected function _getXcckList()
 {
     return Legacy_Utils::getDirnameListByTrustDirname('xcck');
 }
开发者ID:mambax7,项目名称:xcck,代码行数:11,代码来源:ConfigEditAction.class.php


注:本文中的Legacy_Utils::getDirnameListByTrustDirname方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。