r78876 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78875‎ | r78876 | r78877 >
Date:10:30, 23 December 2010
Author:nadeesha
Status:deferred (Comments)
Tags:
Comment:
Added MediaWikiInstallationMessage.php and MediaWikiInstallationVariables.php as per the code review comment
Modified paths:
  • /trunk/phase3/tests/installer/MediaWikiInstallationMessage.php (added) (history)
  • /trunk/phase3/tests/installer/MediaWikiInstallationVariables.php (added) (history)

Diff [purge]

Index: trunk/phase3/tests/installer/MediaWikiInstallationMessage.php
@@ -0,0 +1,57 @@
 2+<?php
 3+
 4+/**
 5+ * MediaWikiInstallationConfig
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+
 32+// 'MySQL' database type help field hint
 33+define( 'MYSQL_DATABASE_HOST_HELP', "If your database server is on different server, enter the host name or IP address here. \nIf you are using shared web hosting, your hosting provider should give you the correct host name in their documentation. \nIf you are installing on a Windows server and using MySQL, using \"localhost\" may not work for the server name. If it does not, try \"127.0.0.1\" for the local IP address." );
 34+define( 'MYSQL_DATABASE_NAME_HELP', "Choose a name that identifies your wiki. It should not contain spaces or hyphens. \nIf you are using shared web hosting, your hosting provider will either give you a specific database name to use or let you create databases via a control panel." );
 35+define( 'MYSQL_DATABASE_TABLE_PREFIX_HELP', "Choose a name that identifies your wiki. It should not contain spaces or hyphens.");
 36+define( 'MYSQL_DATBASE_USERNAME_HELP', "Enter the username that will be used to connect to the database during the installation process. This is not the username of the MediaWiki account; this is the username for your database." );
 37+define( 'MYSQL_DATABASE_PASSWORD_HELP', "Enter the password that will be used to connect to the database during the installation process. This is not the password for the MediaWiki account; this is the password for your database." );
 38+
 39+
 40+// 'SQLite' database type help field hint
 41+define( 'SQLITE_DATA_DIRECTORY_HELP', "SQLite stores all data in a single file. \nThe directory you provide must be writable by the webserver during installation. \nIt should not be accessible via the web, this is why we're not putting it where your PHP files are. \nThe installer will write a .htaccess file along with it, but if that fails someone can gain access to your raw database. That includes raw user data (e-mail addresses, hashed passwords) as well as deleted revisions and other restricted data on the wiki. \nConsider putting the database somewhere else altogether, for example in /var/lib/mediawiki/yourwiki." );
 42+define( 'SQLITE_DATABASE_NAME_HELP', "Choose a name that identifies your wiki. Do not use spaces or hyphens. This will be used for the SQLite data file name.");
 43+
 44+
 45+// 'Database settings' page hel0p field hint
 46+define( 'SEARCH_ENGINE_HELP', "InnoDB is almost always the best option, since it has good concurrency support. \nMyISAM may be faster in single-user or read-only installations. MyISAM databases tend to get corrupted more often than InnoDB databases." );
 47+define( 'DATABASE_CHARACTER_SET_HELP', "In binary mode, MediaWiki stores UTF-8 text to the database in binary fields. This is more efficient than MySQL's UTF-8 mode, and allows you to use the full range of Unicode characters. \nIn UTF-8 mode, MySQL will know what character set your data is in, and can present and convert it appropriately, but it will not let you store characters above the Basic Multilingual Plane." );
 48+
 49+
 50+// 'Name' page help field hint
 51+define( 'NAME_OF_WIKI_HELP', "This will appear in the title bar of the browser and in various other places.");
 52+define( 'PROJECT_NAMESPACE_HELP', "Following Wikipedia's example, many wikis keep their policy pages separate from their content pages, in a \"project namespace\". All page titles in this namespace start with a certain prefix, which you can specify here. Traditionally, this prefix is derived from the name of the wiki, but it cannot contain punctuation characters such as \"#\" or \":\"." );
 53+define( 'USER_NAME_HELP', "Enter your preferred username here, for example \"Joe Bloggs\". This is the name you will use to log in to the wiki." );
 54+define( 'EMAIL_ADDRESS_HELP', "Enter an e-mail address here to allow you to receive e-mail from other users on the wiki, reset your password, and be notified of changes to pages on your watchlist." );
 55+define( 'SUBSCRIBE_MAILING_LIST_HELP', "This is a low-volume mailing list used for release announcements, including important security announcements. You should subscribe to it and update your MediaWiki installation when new versions come out." );
 56+
 57+
 58+
Index: trunk/phase3/tests/installer/MediaWikiInstallationVariables.php
@@ -0,0 +1,73 @@
 2+<?php
 3+
 4+/**
 5+ * MediaWikiInstallationConfig
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+
 32+// Common variables
 33+define('PAGE_LOAD_TIME', "80000" );
 34+
 35+
 36+// 'Name' page input values
 37+define( 'NAME_OF_WIKI', "Site Name" );
 38+define( 'ADMIN_USER_NAME', "My Name" );
 39+define( 'ADMIN_PASSWORD', "12345" );
 40+define ( 'ADMIN_RETYPE_PASSWORD', "12345" );
 41+define ( 'ADMIN_EMAIL_ADDRESS', "nadeesha@calcey.com" );
 42+
 43+
 44+// 'Name' page input values for warning messages
 45+define( 'VALID_WIKI_NAME', "MyWiki" );
 46+define( 'VALID_YOUR_NAME', "Nadeesha Weerasinghe" );
 47+define( 'VALID_PASSWORD', "12345" );
 48+define( 'VALID_PASSWORD_AGAIN', "12345" );
 49+define( 'INVALID_PASSWORD_AGAIN', "123" );
 50+define( 'VALID_NAMESPACE', "Mynamespace" );
 51+define( 'INVALID_NAMESPACE', "##..##" );
 52+
 53+
 54+// 'Database settings' page input values
 55+define( 'DB_WEB_USER', "different" );
 56+define('DB_WEB_USER_PASSWORD', "12345" );
 57+
 58+
 59+// 'Connet to database' page input values
 60+define( 'DATABASE_PREFIX',"databaseprefix" );
 61+
 62+
 63+// 'Connet to database' page input values for warning messages
 64+define( 'VALID_DB_HOST', "localhost" );
 65+define( 'INVALID_DB_HOST', "local" );
 66+define( 'INVALID_DB_NAME', "my-wiki" );
 67+define( 'VALID_DB_NAME', "my_wiki1");
 68+define( 'INVALID_DB_PREFIX', "database prefix" );
 69+define( 'VALID_DB_PREFIX', "database_prefix");
 70+define( 'INVALID_DB_USER_NAME', "roots" );
 71+define( 'VALID_DB_USER_NAME', "root");
 72+define( 'INVALID_DB_PASSWORD', "12345" );
 73+
 74+

Follow-up revisions

RevisionCommit summaryAuthorDate
r78878Followup r78876, set svn:eol-style nativereedy10:48, 23 December 2010

Comments

#Comment by Zakgreant (talk | contribs)   16:37, 23 December 2010

Would it be better to use admin@example.com instead of Nadeesha's email address?

#Comment by MarkAHershberger (talk | contribs)   16:27, 30 December 2010

Right. I wonder if this whole bit might not be better handled by an ini file and PHP's parse_ini_file since they're likely to be different for each developer.

#Comment by MarkAHershberger (talk | contribs)   16:24, 30 December 2010

Copying from IRC: It might be better to use i18n files for the messages in MediaWikiInstallationMessage.php so that they'll be automatically translated.

Status & tagging log