示例#1
0
	function setTOCEnabled( $flag )      { return wfSetVar( $this->mTOCEnabled, $flag ); }
示例#2
0
文件: User.php 项目: k-hasan-19/wiki
 /**
  * Set mDataLoaded, return previous value
  * Use this to prevent DB access in command-line scripts or similar situations
  */
 function setLoaded($loaded)
 {
     return wfSetVar($this->mDataLoaded, $loaded);
 }
 function setTimestamp($x)
 {
     return wfSetVar($this->mTimestamp, $x);
 }
示例#4
0
 public function setIsPrintable($x)
 {
     return wfSetVar($this->mIsPrintable, $x);
 }
示例#5
0
 /**
  * Accessor/mutator for the ParserOptions object
  *
  * @param $x ParserOptions New value or null to just get the current one
  * @return ParserOptions Current ParserOptions object
  */
 function Options($x = null)
 {
     return wfSetVar($this->mOptions, $x);
 }
示例#6
0
	/**
	 * Get/set the table prefix.
	 * @param string $prefix The table prefix to set, or omitted to leave it unchanged.
	 * @return string The previous table prefix.
	 */
	public function tablePrefix( $prefix = null ) {
		return wfSetVar( $this->mTablePrefix, $prefix );
	}
示例#7
0
 /**
  * Set whether this page is listed in Special:Specialpages, at run-time
  */
 function setListed($listed)
 {
     return wfSetVar($this->mListed, $listed);
 }
 /**
  * setCacheTime() sets the timestamp expressing when the page has been rendered.
  * This does not control expiry, see updateCacheExpiry() for that!
  * @param string $t
  * @return string
  */
 public function setCacheTime($t)
 {
     return wfSetVar($this->mCacheTime, $t);
 }
示例#9
0
 function setTOCHTML($tochtml)
 {
     return wfSetVar($this->mTOCHTML, $tochtml);
 }
示例#10
0
 function setIndexPolicy($policy)
 {
     return wfSetVar($this->mIndexPolicy, $policy);
 }
 function setTitleText($t)
 {
     return wfSetVar($this->mTitleText, $t);
 }
	/**
	 * Set whether the item the comment is about is to be printed.
	 */
	public function setShowItem( $value = true ) {
		return wfSetVar( $this->mShowItem, $value );
	}
示例#13
0
 /**
  * Get/set whether the Block prevents a given action
  *
  * @param string $action Action to check
  * @param bool|null $x Value for set, or null to just get value
  * @return bool|null Null for unrecognized rights.
  */
 public function prevents($action, $x = null)
 {
     global $wgBlockDisablesLogin;
     $res = null;
     switch ($action) {
         case 'edit':
             # For now... <evil laugh>
             $res = true;
             break;
         case 'createaccount':
             $res = wfSetVar($this->mCreateAccount, $x);
             break;
         case 'sendemail':
             $res = wfSetVar($this->mBlockEmail, $x);
             break;
         case 'editownusertalk':
             $res = wfSetVar($this->mDisableUsertalk, $x);
             break;
         case 'read':
             $res = false;
             break;
     }
     if (!$res && $wgBlockDisablesLogin) {
         // If a block would disable login, then it should
         // prevent any action that all users cannot do
         $anon = new User();
         $res = $anon->isAllowed($action) ? $res : true;
     }
     return $res;
 }
示例#14
0
 function setExternalLinkTarget($x)
 {
     return wfSetVar($this->mExternalLinkTarget, $x);
 }
示例#15
0
 function waitTimeout($value = NULL)
 {
     return wfSetVar($this->mWaitTimeout, $value);
 }
示例#16
0
 /**
  * General accessor to get/set whether SELECT FOR UPDATE should be used
  */
 function forUpdate($update = NULL)
 {
     return wfSetVar($this->mForUpdate, $update);
 }
示例#17
0
 /**
  * Called in the installer and updater.
  * Probably doesn't need to be called anywhere else in the codebase.
  * @param bool|null $value
  * @return bool|null
  */
 public function scrollableCursor($value = null)
 {
     return wfSetVar($this->mScrollableCursor, $value);
 }
示例#18
0
 /**
  * Number of errors logged, only useful when errors are ignored
  */
 function errorCount($count = NULL)
 {
     return wfSetVar($this->mErrorCount, $count);
 }
示例#19
0
文件: Block.php 项目: whysasse/kmwiki
 /**
  * Get/set whether the Block prevents a given action
  * @param string $action
  * @param bool $x
  * @return bool
  */
 public function prevents($action, $x = null)
 {
     switch ($action) {
         case 'edit':
             # For now... <evil laugh>
             return true;
         case 'createaccount':
             return wfSetVar($this->mCreateAccount, $x);
         case 'sendemail':
             return wfSetVar($this->mBlockEmail, $x);
         case 'editownusertalk':
             return wfSetVar($this->mDisableUsertalk, $x);
         default:
             return null;
     }
 }
示例#20
0
 /**
  * Read/write accessor to select FOR UPDATE
  *
  * @param $x Mixed: FIXME
  */
 function forUpdate($x = NULL)
 {
     return wfSetVar($this->mForUpdate, $x);
 }
示例#21
0
 function OutputType($x = NULL)
 {
     return wfSetVar($this->mOutputType, $x);
 }
示例#22
0
 /**
  * Whether the special page is being evaluated via transclusion
  * @param $x Bool
  * @return Bool
  */
 function including($x = null)
 {
     return wfSetVar($this->mIncluding, $x);
 }
示例#23
0
 /**
  * @param mixed $value
  * @return mixed
  */
 public function waitTimeout($value = null)
 {
     return wfSetVar($this->mWaitTimeout, $value);
 }
 protected function markBodyContentDirty($dirty = true)
 {
     return (bool) wfSetVar($this->dirtyFlags['content'], $dirty, true);
 }
示例#25
0
 /**
  * Set a callback that displays notice messages
  *
  * @param callable $callback
  * @return callable
  */
 public function setNoticeCallback($callback)
 {
     return wfSetVar($this->mNoticeCallback, $callback);
 }
示例#26
0
 /**
  * Get or set the prevent-clickjacking flag
  *
  * @since 1.24
  * @param bool|null $flag New flag value, or null to leave it unchanged
  * @return bool Old flag value
  */
 public function preventClickjacking($flag = null)
 {
     return wfSetVar($this->mPreventClickjacking, $flag);
 }
示例#27
0
 /**
  * General accessor to get/set whether the master DB should be used
  *
  * This used to also set the FOR UPDATE option (locking the rows read
  * in order to avoid link table inconsistency), which was later removed
  * for performance on wikis with a high edit rate.
  *
  * @param bool $update
  * @return bool
  */
 public function forUpdate($update = null)
 {
     return wfSetVar($this->mForUpdate, $update);
 }
示例#28
0
 /**
  * Get/set the db schema.
  * @param string $schema The database schema to set, or omitted to leave it unchanged.
  * @return string The previous db schema.
  */
 public function dbSchema($schema = null)
 {
     return wfSetVar($this->mSchema, $schema);
 }
示例#29
0
 /**
  * Use enableClientCache(false) to force it to send nocache headers
  *
  * @param bool $state
  *
  * @return bool
  */
 public function enableClientCache($state)
 {
     return wfSetVar($this->mEnableClientCache, $state);
 }
 function setRemoveComments($x)
 {
     return wfSetVar($this->mRemoveComments, $x);
 }