}
/**
- * Returns the token salt if there is one, null if the module doesn't require a salt, else false if the module doesn't need a token
+ * Returns the token salt if there is one, '' if the module doesn't require a salt, else false if the module doesn't need a token
* @returns bool
*/
public function getTokenSalt() {
$ret[] = array ( 'writedisabled' );
}
- if ( $this->getTokenSalt() != false ) {
+ if ( $this->getTokenSalt() !== false ) {
$ret[] = array( 'missingparam', 'token' );
$ret[] = array( 'sessionfailure' );
}
}
public function getTokenSalt() {
- return null;
+ return '';
}
protected function getExamples() {
}
public function getTokenSalt() {
- return null;
+ return '';
}
protected function getExamples() {
}
public function getTokenSalt() {
- return null;
+ return '';
}
protected function getExamples() {
}
public function getTokenSalt() {
- return null;
+ return '';
}
protected function getExamples() {
}
public function getTokenSalt() {
- return null;
+ return '';
}
protected function getExamples() {
//Die if token required, but not provided (unless there is a gettoken parameter)
$salt = $module->getTokenSalt();
- if ( $salt != false )
+ if ( $salt !== false )
{
if ( !isset( $moduleParams['token'] ) && !isset( $moduleParams['gettoken'] ) ) {
$this->dieUsageMsg( array( 'missingparam', 'token' ) );
} else {
global $wgUser;
- if ( ( $salt != null && !$wgUser->matchEditToken( $moduleParams['token'], $salt ) )
- || !$wgUser->matchEditToken( $moduleParams['token'] ) ) {
+ if ( !$wgUser->matchEditToken( $moduleParams['token'], $salt ) ) {
$this->dieUsageMsg( array( 'sessionfailure' ) );
}
}
}
public function getTokenSalt() {
- return null;
+ return '';
}
protected function getExamples() {
}
public function getTokenSalt() {
- return null;
+ return '';
}
protected function getExamples() {
}
public function getTokenSalt() {
- return null;
+ return '';
}
protected function getExamples() {
}
public function getTokenSalt() {
- return null;
+ return '';
}
protected function getExamples() {
}
public function getTokenSalt() {
- return null;
+ return '';
}
protected function getExamples() {
}
public function getTokenSalt() {
- return null;
+ return '';
}
protected function getExamples() {