Index: trunk/extensions/ProxyConnect/ProxyConnect.php |
— | — | @@ -0,0 +1,27 @@ |
| 2 | +<?php |
| 3 | +if ( ! defined( 'MEDIAWIKI' ) ) |
| 4 | + die(); |
| 5 | + |
| 6 | +/**#@+ |
| 7 | + * An extension that allows users to rate articles. |
| 8 | + * |
| 9 | + * @package MediaWiki |
| 10 | + * @subpackage Extensions |
| 11 | + * |
| 12 | + * @link http://www.wikihow.com/WikiHow:ProxyConnect-Extension Documentation |
| 13 | + * |
| 14 | + * |
| 15 | + * @author Travis Derouin <travis@wikihow.com> |
| 16 | + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
| 17 | + */ |
| 18 | + |
| 19 | +$wgExtensionCredits['special'][] = array( |
| 20 | + 'name' => 'ProxyConnect', |
| 21 | + 'author' => 'Travis Derouin', |
| 22 | + 'description' => 'Implements the server side functionality of Proxy Connect', |
| 23 | + 'url' => 'http://www.wikihow.com/WikiHow:ProxyConnect-Extension', |
| 24 | +); |
| 25 | + |
| 26 | + |
| 27 | +$wgSpecialPages['ProxyConnect'] = 'ProxyConnect'; |
| 28 | +$wgAutoloadClasses['ProxyConnect'] = dirname( __FILE__ ) . '/ProxyConnect.body.php'; |
Index: trunk/extensions/ProxyConnect/ProxyConnect.body.php |
— | — | @@ -0,0 +1,22 @@ |
| 2 | +<? |
| 3 | +class ProxyConnect extends SpecialPage { |
| 4 | + |
| 5 | + function __construct() { |
| 6 | + SpecialPage::SpecialPage( 'ProxyConnect' ); |
| 7 | + } |
| 8 | + |
| 9 | + function execute ($par) { |
| 10 | + global $wgUser, $wgOut; |
| 11 | + $wgOut->disable(); |
| 12 | + header("Content-type: text/plain;"); |
| 13 | + if ($wgUser->getID() == 0) |
| 14 | + return; |
| 15 | + $result = ""; |
| 16 | + $result .= "UniqueID={$wgUser->getID()}\n"; |
| 17 | + $result .= "Name={$wgUser->getName()}\n"; |
| 18 | + $result .= "Email={$wgUser->getEmail()}\n"; |
| 19 | + wfDebug("ProxyConnect: returning $result\n"); |
| 20 | + echo $result; |
| 21 | + return; |
| 22 | + } |
| 23 | +} |