Skip to content

Change deprecated onArticleSave on onPageContentSave#27

Open
Albul wants to merge 4 commits intomediawiki4intranet:masterfrom
Albul:master
Open

Change deprecated onArticleSave on onPageContentSave#27
Albul wants to merge 4 commits intomediawiki4intranet:masterfrom
Albul:master

Conversation

@Albul
Copy link

@Albul Albul commented Jan 23, 2019

Change deprecated onArticleSave on onPageContentSave https://www.mediawiki.org/wiki/Manual:Hooks/PageContentSave

$this->mItemName = null;
$this->mItemTitle = null;
$this->mItemTalkTitle = null;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please keep tabs like in the original?) I'm not the fan of tabs over spaces, but I don't like a mix of both :)

{
if ( $target->isTalkPage() &&
( $i = array_search( 'broken', $options ) ) !== false ) {
( $i = array_search( 'broken', array_keys($options) ) ) !== false ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use isset( $options['broken'] ) instead of array_search(array_keys())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I see, $i is needed for an offset later, in array_splice

//if ( $this->mShowEditLink && $item->mTitle->quickUserCan( 'edit' ) ) {
// $heading = $this->doEditLink( $item->mTitle, $item->mName ) . $heading;
//}
$heading = Xml::tags( 'h2', null, $heading );
Copy link
Member

@vitalif vitalif Feb 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this commented out?

} else {
$query->setCategory('News');
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like something hardcoded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants