Harej has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/340427 )
Change subject: Removing commented out functions from SpecialCreateCollaborationHub ...................................................................... Removing commented out functions from SpecialCreateCollaborationHub Implementation of the import-related features is long-deferred, and we do not quite know what the UI for it will be, so removing it in the meantime. Change-Id: I6d25553a42bc5235e00a626581be90c0b4586f67 --- M includes/SpecialCreateCollaborationHub.php 1 file changed, 0 insertions(+), 48 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit refs/changes/27/340427/1 diff --git a/includes/SpecialCreateCollaborationHub.php b/includes/SpecialCreateCollaborationHub.php index 73a534c..4790a68 100644 --- a/includes/SpecialCreateCollaborationHub.php +++ b/includes/SpecialCreateCollaborationHub.php @@ -91,27 +91,6 @@ 'default' => 'lightgrey' ]; - /* Comment this out until it's actually implemented (T135408) - // Content source options - $fields['content_source'] = [ - 'type' => 'select', - 'options' => $this->getOptions( [ - 'collaborationkit-createhub-new' => 'new', - 'collaborationkit-createhub-import' => 'import', - 'collaborationkit-createhub-clone' => 'clone', - ] ), - 'default' => 'new', // might want to change default to clone from the default? (TODO add a canned default as example and stuff: T136470) - 'label-message' => 'collaborationkit-createhub-content', - 'cssclass' => 'mw-ck-source-options-input' - ]; - $fields['source'] = [ - 'type' => 'text', - 'label-message' => 'collaborationkit-createhub-source', - 'hide-if' => [ '===', 'wpcontent_source', 'new' ], - 'cssclass' => 'mw-ck-source-input' - ]; - */ - $fields['introduction'] = [ 'type' => 'textarea', 'rows' => 5, @@ -159,33 +138,6 @@ ) { return Status::newFatal( 'collaborationkit-createhub-nopermission' ); } - - /* Comment this out until it's actually implemented (T135408) - // ACTUAL STUFF HERE - if ( $data['content_source'] !== 'new' ) { // Importing from wikitext - $source = Title::newFromText( $data['source'] ); - if ( !$source ) { - return Status::newFatal( 'collaborationkit-createhub-invalidsource' ); - } - - if ( $data['content_source'] === 'clone' ) { - // Copy another hub - // Just copy some of the bits... - - // TODO prefill the actual content - } elseif ( $data['content_source'] === 'import' ) { - // Do some magic based on the source: - // If wikiproject x project: get module list, recreate modules - // If regular page: pull headers - - // TODO prefill the actual content - } - // Render preview? - } else { - - // ...? - } - */ $title = Title::newFromText( $pagename ); if ( !$title ) { -- To view, visit https://gerrit.wikimedia.org/r/340427 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d25553a42bc5235e00a626581be90c0b4586f67 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CollaborationKit Gerrit-Branch: master Gerrit-Owner: Harej <jamesmh...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits