return (string)$val;
}
}
+
+ /**
+ * Set an aribtrary value into our get/post data.
+ * @param $key string Key name to use
+ * @param $value mixed Value to set
+ * @return mixed old value if one was present, null otherwise
+ */
+ function setVal( $key, $value ) {
+ $ret = isset( $this->data[$key] ) ? $this->data[$key] : null;
+ $this->data[$key] = $value;
+ return $ret;
+ }
/**
* Fetch an array from the input or return $default if it's not set.
# Handle CAPTCHA parameters
global $wgRequest;
if(isset($params['captchaid']))
- $wgRequest->data['wpCaptchaId'] = $params['captchaid'];
+ $wgRequest->setVal( 'wpCaptchaId' ) = $params['captchaid'];
if(isset($params['captchaword']))
- $wgRequest->data['wpCaptchaWord'] = $params['captchaword'];
+ $wgRequest->setVal( 'wpCaptchaWord' ) = $params['captchaword'];
$r = array();
if(!wfRunHooks('APIEditBeforeSave', array(&$ep, $ep->textbox1, &$r)))
{