|
@@ 154-160 (lines=7) @@
|
| 151 |
|
* @param string $typeName |
| 152 |
|
* @return string One of log_id/rev_id/fa_id/ar_timestamp/oi_archive_name |
| 153 |
|
*/ |
| 154 |
|
public static function getRelationType( $typeName ) { |
| 155 |
|
$typeName = self::getCanonicalTypeName( $typeName ); |
| 156 |
|
if ( !$typeName ) { |
| 157 |
|
return null; |
| 158 |
|
} |
| 159 |
|
return call_user_func( [ self::$allowedTypes[$typeName], 'getRelationType' ] ); |
| 160 |
|
} |
| 161 |
|
|
| 162 |
|
/** |
| 163 |
|
* Get the user right required for the RevDel type |
|
@@ 168-174 (lines=7) @@
|
| 165 |
|
* @param string $typeName |
| 166 |
|
* @return string User right |
| 167 |
|
*/ |
| 168 |
|
public static function getRestriction( $typeName ) { |
| 169 |
|
$typeName = self::getCanonicalTypeName( $typeName ); |
| 170 |
|
if ( !$typeName ) { |
| 171 |
|
return null; |
| 172 |
|
} |
| 173 |
|
return call_user_func( [ self::$allowedTypes[$typeName], 'getRestriction' ] ); |
| 174 |
|
} |
| 175 |
|
|
| 176 |
|
/** |
| 177 |
|
* Get the revision deletion constant for the RevDel type |
|
@@ 182-188 (lines=7) @@
|
| 179 |
|
* @param string $typeName |
| 180 |
|
* @return int RevDel constant |
| 181 |
|
*/ |
| 182 |
|
public static function getRevdelConstant( $typeName ) { |
| 183 |
|
$typeName = self::getCanonicalTypeName( $typeName ); |
| 184 |
|
if ( !$typeName ) { |
| 185 |
|
return null; |
| 186 |
|
} |
| 187 |
|
return call_user_func( [ self::$allowedTypes[$typeName], 'getRevdelConstant' ] ); |
| 188 |
|
} |
| 189 |
|
|
| 190 |
|
/** |
| 191 |
|
* Suggest a target for the revision deletion |