r108425 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108424‎ | r108425 | r108426 >
Date:16:16, 9 January 2012
Author:mglaser
Status:reverted (Comments)
Tags:
Comment:
This extension makes sure PHPAzure library is properly included.
Initial commit
Modified paths:
  • /trunk/phase3/extensions/WindowsAzureSDK (added) (history)
  • /trunk/phase3/extensions/WindowsAzureSDK/README.txt (added) (history)
  • /trunk/phase3/extensions/WindowsAzureSDK/WindowsAzureSDK.i18n.php (added) (history)
  • /trunk/phase3/extensions/WindowsAzureSDK/WindowsAzureSDK.php (added) (history)

Diff [purge]

Index: trunk/phase3/extensions/WindowsAzureSDK/WindowsAzureSDK.i18n.php
@@ -0,0 +1,14 @@
 2+<?php
 3+$messages = array();
 4+
 5+$messages['en'] = array(
 6+ 'windowswzuresdk-desc' => 'This extension provides the [http://phpazure.codeplex.com/ PHPAzure] SDK created by [http://www.realdolmen.com/ REALDOLMEN]. It is the foundation for other extensions that need to interact with Windows Azure services. The integration with MediaWiki was made by [http://www.hallowelt.biz Hallo Welt! Medienwerkstatt GmbH].'
 7+);
 8+
 9+$messages['de-formal'] = array(
 10+ 'windowswzuresdk-desc' => 'Diese Erweiterung stellt das [http://phpazure.codeplex.com/ PHPAzure] SDK bereit, welches von [http://www.realdolmen.com/ REALDOLMEN] entwickelt wird. Sie ist die Basis f�r andere Erweiterungen, welche mit Windows Azure Diensten interagieren m�ssen. Die MediaWiki-Integration wurde von [http://www.hallowelt.biz Hallo Welt! Medienwerkstatt GmbH] durchgef�hrt.'
 11+);
 12+
 13+$messages['de'] = array(
 14+ 'windowswzuresdk-desc' => 'Diese Erweiterung stellt das [http://phpazure.codeplex.com/ PHPAzure] SDK bereit, welches von [http://www.realdolmen.com/ REALDOLMEN] entwickelt wird. Sie ist die Basis f�r andere Erweiterungen, welche mit Windows Azure Diensten interagieren m�ssen. Die MediaWiki-Integration wurde von [http://www.hallowelt.biz Hallo Welt! Medienwerkstatt GmbH] durchgef�hrt.'
 15+);
\ No newline at end of file
Property changes on: trunk/phase3/extensions/WindowsAzureSDK/WindowsAzureSDK.i18n.php
___________________________________________________________________
Added: svn:eol-style
116 + native
Index: trunk/phase3/extensions/WindowsAzureSDK/WindowsAzureSDK.php
@@ -0,0 +1,44 @@
 2+<?php
 3+/*
 4+ (c) Hallo Welt! Medienwerkstatt GmbH, 2011 GPL
 5+
 6+ This program is free software; you can redistribute it and/or modify
 7+ it under the terms of the GNU General Public License as published by
 8+ the Free Software Foundation; either version 2 of the License, or
 9+ (at your option) any later version.
 10+
 11+ This program is distributed in the hope that it will be useful,
 12+ but WITHOUT ANY WARRANTY; without even the implied warranty of
 13+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 14+ GNU General Public License for more details.
 15+
 16+ You should have received a copy of the GNU General Public License along
 17+ with this program; if not, write to the Free Software Foundation, Inc.,
 18+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 19+ http://www.gnu.org/copyleft/gpl.html
 20+*/
 21+
 22+if ( !defined( 'MEDIAWIKI' ) ) {
 23+ echo 'To install WindowsAzureSDK, put the following line in LocalSettings.php: include_once( "$IP/extensions/WindowsAzureSDK/WindowsAzureSDK.php" );'."\n";
 24+ exit( 1 );
 25+}
 26+
 27+$wgExtensionCredits['other'][] = array(
 28+ 'path' => __FILE__,
 29+ 'name' => 'WindowsAzureSDK',
 30+ 'author' => array( 'REALDOLMEN', 'Hallo Welt! Medienwerkstatt GmbH' ),
 31+ 'url' => 'http://www.hallowelt.biz',
 32+ 'version' => '4.1.0',
 33+ 'descriptionmsg' => 'windowswzuresdk-desc',
 34+);
 35+
 36+$dir = dirname(__FILE__) . '/';
 37+$wgExtensionMessagesFiles['WindowsAzureSDK'] = $dir . 'WindowsAzureSDK.i18n.php';
 38+
 39+if(!class_exists('Microsoft_WindowsAzure_Diagnostics_Manager')) {
 40+ require_once( $dir.'lib/PHPAzure/library/Microsoft/AutoLoader.php' );
 41+}
 42+
 43+if (!defined( 'MICROSOFT_WINDOWS_AZURE_SDK_VERSION' )) {
 44+ define( 'MICROSOFT_WINDOWS_AZURE_SDK_VERSION', '4.1.0' );
 45+}
\ No newline at end of file
Property changes on: trunk/phase3/extensions/WindowsAzureSDK/WindowsAzureSDK.php
___________________________________________________________________
Added: svn:eol-style
146 + native
Index: trunk/phase3/extensions/WindowsAzureSDK/README.txt
@@ -0,0 +1 @@
 2+This extension contains the Microsoft "Windows Azure SDK for PHP v4.1.0" (http://phpazure.codeplex.com/) by REALDOLMEN.
\ No newline at end of file
Property changes on: trunk/phase3/extensions/WindowsAzureSDK/README.txt
___________________________________________________________________
Added: svn:eol-style
13 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r108450Followup r108425, r108426...reedy18:41, 9 January 2012
r108663r108425/r108450: Consistency tweaks in preparation for adding extension to tr...raymond19:57, 11 January 2012
r108664r108425/r108450: Register extension for translatewiki.net.raymond19:59, 11 January 2012
r108752Fix extension credits URL: Link to MediaWiki.org (todo: please create extensi...raymond20:05, 12 January 2012

Comments

#Comment by Nikerabbit (talk | contribs)   17:27, 9 January 2012

Encoding wrong in i18n file.

#Comment by Reedy (talk | contribs)   18:47, 9 January 2012
if(!class_exists('Microsoft_WindowsAzure_Diagnostics_Manager')) {
	require_once( $dir.'lib/PHPAzure/library/Microsoft/AutoLoader.php' );
}

Are you going to svn:external this in or something?

#Comment by Blobaugh (talk | contribs)   18:50, 9 January 2012

This is done to protect against any other extensions that may need the Windows Azure SDK for PHP. For obvious reasons the same files cannot be included twice. If the PHP SDK is included somewhere on the filesystem the require_once will not see it as required yet and load it, thus triggering a fatal error. The conditional check simply makes sure that does not happen

#Comment by Reedy (talk | contribs)   18:53, 9 January 2012

Sure, but shouldn't the files actually be included/exist "somewhere"? Or is it from a PHP extension or similar?

#Comment by Blobaugh (talk | contribs)   18:57, 9 January 2012

Yes they should exist with the Windows Azure storage extension. If they are not there perhaps Markus has not committed them yet.

#Comment by Blobaugh (talk | contribs)   18:56, 9 January 2012

Err...the same classes/function names

#Comment by Mglaser (talk | contribs)   19:11, 9 January 2012

I did not commit the SDK for PHP because I wasn't sure about MWs policy concerning third party libraries. I remember we talked about that at the NOLA hackathon and it was kind of an unresolved issue. If this is no problem (as you all indicate), I will commit the SDK as well. Licensewise, the SDK is BSD, so it should be ok to republish in SVN.

#Comment by Mglaser (talk | contribs)   19:44, 9 January 2012

SDK is now committed

#Comment by Mglaser (talk | contribs)   19:46, 9 January 2012

SVN revision is r108463

#Comment by Mglaser (talk | contribs)   19:46, 9 January 2012

i18n file now encoded in UTF without BOM in r108466

Status & tagging log