44 $this->server =
$params[
'server'] ?? [];
47 public function get(
$code, $key ) {
48 if ( $this->server || $this->writesDone ) {
60 [
'lc_lang' =>
$code,
'lc_key' => $key ],
68 if ( $this->readOnly ) {
71 throw new MWException( __METHOD__ .
": Invalid language \"$code\"" );
77 $this->currentLang =
$code;
82 if ( $this->readOnly ) {
85 throw new MWException( __CLASS__ .
': must call startWrite() before finishWrite()' );
88 $trxProfiler = Profiler::instance()->getTransactionProfiler();
89 $oldSilenced = $trxProfiler->setSilenced(
true );
94 $dbw->
delete(
'l10n_cache', [
'lc_lang' => $this->currentLang ], __METHOD__ );
98 $this->writesDone =
true;
101 $this->readOnly =
true;
108 $trxProfiler->setSilenced( $oldSilenced );
111 $this->currentLang =
null;
116 if ( $this->readOnly ) {
119 throw new MWException( __CLASS__ .
': must call startWrite() before set()' );
136 if ( $this->server ) {
137 $this->dbw = Database::factory( $this->server[
'type'], $this->server );
139 throw new MWException( __CLASS__ .
': failed to obtain a DB connection' );
unserialize( $serialized)
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
LCStore implementation which uses the standard DB functions to store data.
array $server
Server configuration map.
finishWrite()
Finish a write transaction.
startWrite( $code)
Start a write transaction.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction $rows
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not it can be in the form of< username >< more info > e g for bot passwords intended to be added to log contexts Fields it might only if the login was with a bot password it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable & $code
returning false will NOT prevent logging $e
Interface for the persistence layer of LocalisationCache.
linkcache txt The LinkCache class maintains a list of article titles and the information about whether or not the article exists in the database This is used to mark up links when displaying a page If the same link appears more than once on any page then it only has to be looked up once In most cases link lookups are done in batches with the LinkBatch class or the equivalent in so the link cache is mostly useful for short snippets of parsed and for links in the navigation areas of the skin The link cache was formerly used to track links used in a document for the purposes of updating the link tables This application is now deprecated To create a batch
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))