to 'uca-default-u-kn' or 'uca-<langcode>-u-kn'. If you can't use UCA collations,
a 'numeric' collation is also available. If migrating from another
collation, you will need to run the updateCollation.php maintenance script.
+* Two new codes have been added to #time parser function: "xit" for days in current
+ month, and "xiz" for days passed in the year, both in Iranian calendar.
=== External library changes in 1.28 ===
$this->addWhereFld( 'ipb_deleted', 0 );
}
- // Purge expired entries on one in every 10 queries
- if ( !mt_rand( 0, 10 ) ) {
- Block::purgeExpired();
- }
+ # Filter out expired rows
+ $this->addWhere( 'ipb_expiry > ' . $db->addQuotes( $db->timestamp() ) );
$res = $this->select( __METHOD__ );
if ( $this->maxSize !== false && $newsize > $this->maxSize ) {
/// @todo Add i18n message when replacing calls to ->setWarning()
$msg = new ApiRawMessage( 'This result was truncated because it would otherwise ' .
- ' be larger than the limit of $1 bytes', 'truncatedresult' );
+ 'be larger than the limit of $1 bytes', 'truncatedresult' );
$msg->numParams( $this->maxSize );
$this->errorFormatter->addWarning( 'result', $msg );
return false;
/**
* Prepare all tracked load balancers for shutdown
* @param integer $flags Supports SHUTDOWN_* flags
- * STUB
*/
public function shutdown( $flags = 0 ) {
+ if ( !( $flags & self::SHUTDOWN_NO_CHRONPROT ) ) {
+ $this->shutdownChronologyProtector( $this->chronProt );
+ }
+ $this->commitMasterChanges( __METHOD__ ); // sanity
}
/**
call_user_func_array( $callback, array_merge( [ $lb ], $params ) );
}
}
-
- public function shutdown( $flags = 0 ) {
- if ( !( $flags & self::SHUTDOWN_NO_CHRONPROT ) ) {
- $this->shutdownChronologyProtector( $this->chronProt );
- }
- $this->commitMasterChanges( __METHOD__ ); // sanity
- }
}
call_user_func_array( $callback, array_merge( [ $lb ], $params ) );
}
}
-
- public function shutdown( $flags = 0 ) {
- if ( !( $flags & self::SHUTDOWN_NO_CHRONPROT ) ) {
- $this->shutdownChronologyProtector( $this->chronProt );
- }
- $this->commitMasterChanges( __METHOD__ ); // sanity
- }
}
}
}
+ $flags = $this->persist ? 0 : CachedBagOStuff::WRITE_CACHE_ONLY;
+ $flags |= CachedBagOStuff::WRITE_SYNC; // write to all datacenters
$this->store->set(
wfMemcKey( 'MWSession', (string)$this->id ),
[
'metadata' => $metadata,
],
$metadata['expires'],
- $this->persist ? 0 : CachedBagOStuff::WRITE_CACHE_ONLY
+ $flags
);
$this->metaDirty = false;
case Block::TYPE_IP:
case Block::TYPE_RANGE:
list( $start, $end ) = IP::parseRange( $target );
- $dbr = wfGetDB( DB_SLAVE );
- $conds[] = $dbr->makeList(
+ $conds[] = wfGetDB( DB_SLAVE )->makeList(
[
'ipb_address' => $target,
Block::getRangeCond( $start, $end )
* xiy y (two digit year) in Iranian calendar
* xiY Y (full year) in Iranian calendar
* xit t (days in month) in Iranian calendar
+ * xiz z (day of the year) in Iranian calendar
*
* xjj j (day number) in Hebrew calendar
* xjF F (month name) in Hebrew calendar
}
$num = self::$IRANIAN_DAYS[$iranian[1] - 1];
break;
+ case 'xiz':
+ $usedIranianYear = true;
+ if ( !$iranian ) {
+ $iranian = self::tsToIranian( $ts );
+ }
+ $num = $iranian[3];
+ break;
case 'a':
$usedAMPM = true;
$s .= intval( substr( $ts, 8, 2 ) ) < 12 ? 'am' : 'pm';
$jDayNo = floor( ( $jDayNo - 1 ) % 365 );
}
+ $jz = $jDayNo;
+
for ( $i = 0; $i < 11 && $jDayNo >= self::$IRANIAN_DAYS[$i]; $i++ ) {
$jDayNo -= self::$IRANIAN_DAYS[$i];
}
$jm = $i + 1;
$jd = $jDayNo + 1;
- return [ $jy, $jm, $jd ];
+ return [ $jy, $jm, $jd, $jz ];
}
/**