Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -538,13 +538,6 @@ |
539 | 539 | // Hook for database schema. |
540 | 540 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'PageTranslationHooks::schemaUpdates'; |
541 | 541 | |
542 | | - // Do not activate hooks if not setup properly |
543 | | - global $wgEnablePageTranslation; |
544 | | - if ( !efTranslateCheckPT() ) { |
545 | | - $wgEnablePageTranslation = false; |
546 | | - return true; |
547 | | - } |
548 | | - |
549 | 542 | // Fuzzy tags for speed. |
550 | 543 | $wgHooks['ArticleSaveComplete'][] = 'TranslateEditAddons::onSave'; |
551 | 544 | |
— | — | @@ -652,52 +645,6 @@ |
653 | 646 | } |
654 | 647 | |
655 | 648 | /** |
656 | | - * Checks if page translation was set up properly. |
657 | | - * @ingroup PageTranslation |
658 | | - * @private |
659 | | - */ |
660 | | -function efTranslateCheckPT() { |
661 | | - global $wgHooks, $wgMemc, $wgCommandLineMode; |
662 | | - |
663 | | - # Short circuit tests on cli, useless db trip and no reporting. |
664 | | - if ( $wgCommandLineMode ) { |
665 | | - return true; |
666 | | - } |
667 | | - |
668 | | - $version = "3"; # Must be a string |
669 | | - $memcKey = wfMemcKey( 'pt' ); |
670 | | - $ok = $wgMemc->get( $memcKey ); |
671 | | - |
672 | | - if ( $ok === $version ) { |
673 | | - return true; |
674 | | - } |
675 | | - |
676 | | - $dbw = wfGetDB( DB_MASTER ); |
677 | | - if ( !$dbw->tableExists( 'revtag' ) ) { |
678 | | - $wgHooks['SiteNoticeAfter'][] = array( 'efTranslateCheckWarn', 'tpt-install' ); |
679 | | - return false; |
680 | | - } |
681 | | - |
682 | | - $wgMemc->set( $memcKey, $version ); |
683 | | - return true; |
684 | | -} |
685 | | - |
686 | | -/** |
687 | | - * Replaces the sitenotice with a warning that the extension is not |
688 | | - * set up properly. Also disables caching to avoid the notices getting |
689 | | - * stuck. |
690 | | - * @param $msg \string Message key |
691 | | - * @param $sitenotice \string |
692 | | - * @return \bool true |
693 | | - */ |
694 | | -function efTranslateCheckWarn( $msg, &$sitenotice ) { |
695 | | - global $wgOut; |
696 | | - $sitenotice = wfMsg( $msg ); |
697 | | - $wgOut->enableClientCache( false ); |
698 | | - return true; |
699 | | -} |
700 | | - |
701 | | -/** |
702 | 649 | * Registers \<languages> tag with the parser. |
703 | 650 | * @param $parser Parser |
704 | 651 | * @return \bool true |
Index: trunk/extensions/Translate/PageTranslation.i18n.php |
— | — | @@ -78,8 +78,6 @@ |
79 | 79 | 'tpt-unknown-page' => 'This namespace is reserved for content page translations. |
80 | 80 | The page you are trying to edit does not seem to correspond any page marked for translation.', |
81 | 81 | |
82 | | - 'tpt-install' => 'Run php maintenance/update.php or web install to enable page translation feature.', |
83 | | - |
84 | 82 | 'tpt-render-summary' => 'Updating to match new version of source page', |
85 | 83 | |
86 | 84 | 'tpt-download-page' => 'Export page with translations', |