Cheetah
ChArlModule.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('ChWsbTextModule');
9 
10 require_once('ChArlCalendar.php');
11 require_once('ChArlCmts.php');
12 require_once('ChArlVoting.php');
13 require_once('ChArlSearchResult.php');
14 require_once('ChArlData.php');
15 
105 {
110  {
111  parent::__construct($aModule);
112 
113  //--- Define Membership Actions ---//
114  defineMembershipActions(array('articles delete'), 'ACTION_ID_');
115  }
116 
120  function serviceArticlesRss($iLength = 0)
121  {
122  return $this->actionRss($iLength);
123  }
124 
128  function actionGetArticles($sSampleType = 'all', $iStart = 0, $iPerPage = 0)
129  {
130  return $this->actionGetEntries($sSampleType, $iStart, $iPerPage);
131  }
132 
136  function _createObjectCalendar($iYear, $iMonth)
137  {
138  return new ChArlCalendar($iYear, $iMonth, $this->_oDb, $this->_oConfig);
139  }
141  {
142  return new ChArlCmts($this->_oConfig->getCommentsSystemName(), $iId);
143  }
145  {
146  return new ChArlVoting($this->_oConfig->getVotesSystemName(), $iId);
147  }
148  function _isDeleteAllowed($bPerform = false)
149  {
150  if(!isLogged())
151  return false;
152 
153  if(isAdmin())
154  return true;
155 
156  $aCheckResult = checkAction(getLoggedId(), ACTION_ID_ARTICLES_DELETE, $bPerform);
157  return $aCheckResult[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED;
158  }
159 }
ChArlCmts
Definition: ChArlCmts.php:11
ChWsbModule\isLogged
isLogged()
Definition: ChWsbModule.php:113
CHECK_ACTION_RESULT_ALLOWED
const CHECK_ACTION_RESULT_ALLOWED
Definition: membership_levels.inc.php:60
$aModule
$aModule
Definition: classifieds.php:21
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
CHECK_ACTION_RESULT
const CHECK_ACTION_RESULT
Definition: membership_levels.inc.php:54
php
$iId
$iId
Definition: license.php:15
ChArlCalendar
Definition: ChArlCalendar.php:11
$iPerPage
else $iPerPage
Definition: browse.php:61
isAdmin
isAdmin()
Definition: index.php:649
ChWsbTextModule\actionGetEntries
actionGetEntries($sSampleType='all', $iStart=0, $iPerPage=0)
Definition: ChWsbTextModule.php:460
ChArlModule\_createObjectCalendar
_createObjectCalendar($iYear, $iMonth)
Definition: ChArlModule.php:136
ChArlModule\_createObjectVoting
_createObjectVoting($iId)
Definition: ChArlModule.php:144
getLoggedId
getLoggedId()
Definition: profiles.inc.php:32
ChArlModule\_createObjectCmts
_createObjectCmts($iId)
Definition: ChArlModule.php:140
ChArlModule\serviceArticlesRss
serviceArticlesRss($iLength=0)
Definition: ChArlModule.php:120
checkAction
checkAction($iMemberId, $actionID, $performAction=false, $iForcedProfID=0, $isCheckMemberStatus=true)
Definition: membership_levels.inc.php:313
defineMembershipActions
defineMembershipActions($aActionsAll, $sPrefix='CH_')
Definition: membership_levels.inc.php:744
ChArlModule\_isDeleteAllowed
_isDeleteAllowed($bPerform=false)
Definition: ChArlModule.php:148
ChWsbTextModule
Definition: ChWsbTextModule.php:22
ChArlModule
Definition: ChArlModule.php:105
ChArlVoting
Definition: ChArlVoting.php:11
ChWsbTextModule\actionRss
actionRss($iLength=0, $sType='archive')
Definition: ChWsbTextModule.php:425
ChArlModule\__construct
__construct($aModule)
Definition: ChArlModule.php:109
ChArlModule\actionGetArticles
actionGetArticles($sSampleType='all', $iStart=0, $iPerPage=0)
Definition: ChArlModule.php:128