$flags = explode( ',', $row->old_flags );
if( in_array( 'external', $flags ) ) {
$url=$row->old_text;
- @list( /* $proto */ ,$path)=explode('://',$url,2);
- if ( $path == "" ) {
+ $parts = explode( '://', $url, 2 );
+ if ( !isset( $parts[1] ) || $parts[1] == '' ) {
wfProfileOut( $fname );
return false;
}
/**
* Sets the location (cur_id) of the main object to which this object
* points
+ *
+ * @param $id int
*/
function setLocation( $id ) {
$this->mCurId = $id;
}
}
+ /**
+ * @param $t1
+ * @param $t2
+ * @return string
+ */
function diff( $t1, $t2 ) {
# Need to do a null concatenation with warnings off, due to bugs in the current version of xdiff
# "String is not zero-terminated"
return $diff;
}
+ /**
+ * @param $base
+ * @param $diff
+ * @return bool|string
+ */
function patch( $base, $diff ) {
if ( function_exists( 'xdiff_string_bpatch' ) ) {
wfSuppressWarnings();
}
}
+ /**
+ * @return array
+ */
function __sleep() {
$this->compress();
if ( !count( $this->mItems ) ) {
/**
* Helper function for compression jobs
* Returns true until the object is "full" and ready to be committed
+ *
+ * @return bool
*/
function isHappy() {
return $this->mSize < $this->mMaxSize