The previous version of the phpdoc simply says
that the field contains a comma seperated list of
page restrictions, which is wrong.
The field is actually a colon seperated list of comma
seperated lists.
The new phpdoc and example have been pulled from mw.org
and checked against what actually exists in a real db.
Change-Id: I6bfdfd87120150e4b53e1b4c49e95041f55d8c97
/** @var array Array of groups allowed to edit this article */
public $mRestrictions = [];
/** @var array Array of groups allowed to edit this article */
public $mRestrictions = [];
- /** @var string|bool */
+ /**
+ * @var string|bool Comma-separated set of permission keys
+ * indicating who can move or edit the page from the page table, (pre 1.10) rows.
+ * Edit and move sections are separated by a colon
+ * Example: "edit=autoconfirmed,sysop:move=sysop"
+ */
protected $mOldRestrictions = false;
/** @var bool Cascade restrictions on this page to included templates and images? */
protected $mOldRestrictions = false;
/** @var bool Cascade restrictions on this page to included templates and images? */
* Public for usage by LiquidThreads.
*
* @param array $rows Array of db result objects
* Public for usage by LiquidThreads.
*
* @param array $rows Array of db result objects
- * @param string $oldFashionedRestrictions Comma-separated list of page
- * restrictions from page table (pre 1.10)
+ * @param string $oldFashionedRestrictions Comma-separated set of permission keys
+ * indicating who can move or edit the page from the page table, (pre 1.10) rows.
+ * Edit and move sections are separated by a colon
+ * Example: "edit=autoconfirmed,sysop:move=sysop"
*/
public function loadRestrictionsFromRows( $rows, $oldFashionedRestrictions = null ) {
$dbr = wfGetDB( DB_REPLICA );
*/
public function loadRestrictionsFromRows( $rows, $oldFashionedRestrictions = null ) {
$dbr = wfGetDB( DB_REPLICA );
/**
* Load restrictions from the page_restrictions table
*
/**
* Load restrictions from the page_restrictions table
*
- * @param string $oldFashionedRestrictions Comma-separated list of page
- * restrictions from page table (pre 1.10)
+ * @param string $oldFashionedRestrictions Comma-separated set of permission keys
+ * indicating who can move or edit the page from the page table, (pre 1.10) rows.
+ * Edit and move sections are separated by a colon
+ * Example: "edit=autoconfirmed,sysop:move=sysop"
*/
public function loadRestrictions( $oldFashionedRestrictions = null ) {
if ( $this->mRestrictionsLoaded ) {
*/
public function loadRestrictions( $oldFashionedRestrictions = null ) {
if ( $this->mRestrictionsLoaded ) {