// Do some sanity checks. These aren't needed for reversibility,
// but should help keep the breakage down if the editor
// breaks one of the entities whilst editing.
- if ( ( substr( $invalue, $i, 1 ) == ";" ) and ( strlen( $hexstring ) <= 6 ) ) {
+ if ( ( substr( $invalue, $i, 1 ) == ";" ) && ( strlen( $hexstring ) <= 6 ) ) {
$codepoint = hexdec( $hexstring );
$result .= codepointToUtf8( $codepoint );
} else {
foreach ( $merged as $key => $val ) {
# A false value suppresses the attribute, and we don't want the
# href attribute to be overridden.
- if ( $key != 'href' and $val !== false ) {
+ if ( $key != 'href' && $val !== false ) {
$ret[$key] = $val;
}
}
}
if ( $mimeTypeFile ) {
- if ( is_file( $mimeTypeFile ) and is_readable( $mimeTypeFile ) ) {
+ if ( is_file( $mimeTypeFile ) && is_readable( $mimeTypeFile ) ) {
wfDebug( __METHOD__ . ": loading mime types from $mimeTypeFile\n" );
$types .= "\n";
$types .= file_get_contents( $mimeTypeFile );
$info = MM_WELL_KNOWN_MIME_INFO;
if ( $mimeInfoFile ) {
- if ( is_file( $mimeInfoFile ) and is_readable( $mimeInfoFile ) ) {
+ if ( is_file( $mimeInfoFile ) && is_readable( $mimeInfoFile ) ) {
wfDebug( __METHOD__ . ": loading mime info from $mimeInfoFile\n" );
$info .= "\n";
$info .= file_get_contents( $mimeInfoFile );
if ( $right == 'autoconfirmed' ) {
$right = 'editsemiprotected'; // B/C
}
- if ( $tp and !$wgUser->isAllowed( $right ) ) {
+ if ( $tp && !$wgUser->isAllowed( $right ) ) {
$errors[] = array( 'cantmove-titleprotected' );
}
}
}
# If our database is strict about IP addresses, use NULL instead of an empty string
- if ( $dbw->strictIPs() and $this->mAttribs['rc_ip'] == '' ) {
+ if ( $dbw->strictIPs() && $this->mAttribs['rc_ip'] == '' ) {
unset( $this->mAttribs['rc_ip'] );
}
$this->mAttribs['rc_id'] = $dbw->nextSequenceValue( 'recentchanges_rc_id_seq' );
## If we are using foreign keys, an entry of 0 for the page_id will fail, so use NULL
- if ( $dbw->cascadingDeletes() and $this->mAttribs['rc_cur_id'] == 0 ) {
+ if ( $dbw->cascadingDeletes() && $this->mAttribs['rc_cur_id'] == 0 ) {
unset( $this->mAttribs['rc_cur_id'] );
}
$paragraphStack = false;
# @todo bug 5718: paragraph closed
$output .= $this->closeParagraph();
- if ( $preOpenMatch and !$preCloseMatch ) {
+ if ( $preOpenMatch && !$preCloseMatch ) {
$this->mInPre = true;
}
$bqOffset = 0;