Permalink
Browse files

Remove trailing spaces .

  • Loading branch information...
vikas-srivastava
vikas-srivastava committed Dec 27, 2012
1 parent a101534 commit 8688b60b80da3ba71d6bd8a0f5a02815a2adb9e5
Showing with 298 additions and 299 deletions.
  1. +1 −1 .travis.yml
  2. +7 −7 LICENSE
  3. +15 −15 README.md
  4. +1 −1 _config.php
  5. +2 −2 code/control/ExtensionAdmin.php
  6. +2 −2 code/control/ExtensionAuthor.php
  7. +4 −4 code/control/ExtensionCategory.php
  8. +12 −12 code/control/ExtensionData.php
  9. +7 −7 code/control/ExtensionKeywords.php
  10. +12 −12 code/control/ExtensionSnapshot.php
  11. +2 −2 code/control/ExtensionVersion.php
  12. +23 −23 code/control/JsonHandler.php
  13. +14 −14 code/page_type/ExtensionHolder.php
  14. +3 −3 code/page_type/Module.php
  15. +11 −11 code/page_type/ModuleHolder.php
  16. +3 −3 code/page_type/Theme.php
  17. +8 −8 code/page_type/ThemeHolder.php
  18. +3 −3 code/page_type/Widget.php
  19. +9 −9 code/page_type/WidgetHolder.php
  20. +5 −5 code/task/CreatePackageJsonTask.php
  21. +5 −5 code/task/JsonUpdateTask.php
  22. +4 −4 composer.json
  23. +4 −4 docs/en/developers/data-flow.md
  24. +2 −2 docs/en/getting-started/getting-started.md
  25. +6 −6 docs/en/topics/add-search-pages.md
  26. +4 −4 docs/en/topics/detail-module-page.md
  27. +1 −1 docs/en/topics/submit-extension.md
  28. +3 −3 docs/en/topics/update-extension.md
  29. +5 −5 templates/Email/ExtensionApproved.ss
  30. +4 −4 templates/Email/ExtensionSubmitted.ss
  31. +2 −2 templates/Includes/ExtensionSearchResult.ss
  32. +1 −1 templates/Layout/ExtensionHolder.ss
  33. +3 −3 templates/Layout/ModuleHolder.ss
  34. +28 −28 templates/Layout/Module_show.ss
  35. +4 −4 templates/Layout/ThemeHolder.ss
  36. +30 −30 templates/Layout/Theme_show.ss
  37. +2 −3 templates/Layout/WidgetHolder.ss
  38. +30 −30 templates/Layout/Widget_show.ss
  39. +13 −13 tests/MockComposerClasses.php
  40. +1 −1 tests/control/ExtensionAuthorTest.php
  41. +2 −2 tests/control/ExtensionSnapshotTest.php
View
@@ -22,4 +22,4 @@ before_script:
- ./sake dev/build "flush=1"
- - cd ~/builds/ss3
script:
- - phpunit -c phpunit.xml.dist
+ - phpunit -c phpunit.xml.dist
View
14 LICENSE
@@ -4,14 +4,14 @@ All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- * Neither the name of SilverStripe nor the names of its contributors may be used to endorse or promote products derived from this software
+ * Neither the name of SilverStripe nor the names of its contributors may be used to endorse or promote products derived from this software
without specific prior written permission.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
View
@@ -2,14 +2,14 @@
## Overview
-Allows logged-in members to submit modules, themes and widgets on
+Allows logged-in members to submit modules, themes and widgets on
extension.silverstripe.org (proposed website for silverstripe extensions)
[![Build Status](https://secure.travis-ci.org/vikas-srivastava/extensionmanager.png?branch=master)](http://travis-ci.org/vikas-srivastava/extensionmanager)
-## Maintainer Contact
-
- * vikas srivastava
+## Maintainer Contact
+
+ * vikas srivastava
* NickName: openbees
* Email: viky2130@gmail.com)
@@ -19,21 +19,21 @@ extension.silverstripe.org (proposed website for silverstripe extensions)
* [composer](https://github.com/composer/composer)
## Documentation
-
+
* http://openbees.blogspot.in/
- * https://github.com/vikas-srivastava/extensionmanager/blob/master/docs/en/index.md
+ * https://github.com/vikas-srivastava/extensionmanager/blob/master/docs/en/index.md
+
+## Demo Website
+
+ * http://extension.openbees.org/
-## Demo Website
-
- * http://extension.openbees.org/
-
## Installation Instructions
-
+
* git clone git@github.com:vikas-srivastava/extensionmanager.git extensionmanager
- * cd extensionmanager
+ * cd extensionmanager
* curl -s http://getcomposer.org/installer | php
* composer.phar install
-
-## Usage Overview
- * https://github.com/silverstripe/gsoc-wiki/wiki/GSOC-2012-Project:-Improve-silverstripe.org-Modules-and-Widgets-page
+## Usage Overview
+
+ * https://github.com/silverstripe/gsoc-wiki/wiki/GSOC-2012-Project:-Improve-silverstripe.org-Modules-and-Widgets-page
View
@@ -5,7 +5,7 @@
*/
require_once __DIR__ . '/vendor/autoload.php';
-//todo add better search
+//todo add better search
FulltextSearchable::enable();
/**
@@ -5,7 +5,7 @@
* @package extensionmanager
*/
class ExtensionAdmin extends ModelAdmin {
-
+
static $menu_title = "Extensions";
static $url_segment = "extensions";
@@ -14,6 +14,6 @@ class ExtensionAdmin extends ModelAdmin {
"ExtensionVersion",
"ExtensionCategory",
"ExtensionKeywords",
- "Member",
+ "Member",
);
}
@@ -37,9 +37,9 @@ public static function storeAuthorsInfo($authorsRawData,$extensionId) {
$totalAuthors = count($authorsRawData);
$extensionAuthorsId = array();
-
+
foreach($authorsRawData as $author) {
-
+
if(((array_key_exists('email', $author)))){
if(ExtensionAuthor::get()->filter("Email" , $author['email'])->first()) {
$extensionAuthor = ExtensionAuthor::get()->filter("Email" , $author['email'])->first();
@@ -1,19 +1,19 @@
<?php
/**
- * Class containing methods for fetching and storing
+ * Class containing methods for fetching and storing
* extension Category information.
*
* @package extensionmanager
*/
class ExtensionCategory extends DataObject {
- static $db = array(
+ static $db = array(
'CategoryName' => 'Varchar(100)',
);
static $has_many = array(
'Extensions' => 'ExtensionData',
- );
+ );
static $searchable_fields = array(
'CategoryName' => array(
@@ -44,6 +44,6 @@ public static function getExtensionCategory($categoryID) {
$category = ExtensionCategory::get()->byID($categoryID);
if($category) {
return $category->CategoryName;
- }
+ }
}
}
@@ -1,13 +1,13 @@
<?php
/**
- * Acts as base class for stroing and handling
+ * Acts as base class for stroing and handling
* Extensions(Module/Widget/Theme) Data .
*
* @package extensionmanager
*/
class ExtensionData extends DataObject {
- static $db = array(
+ static $db = array(
'Url' => 'Varchar(100)',
'Accepted' => 'Boolean',
'Title' => 'VarChar(100)',
@@ -42,7 +42,7 @@ class ExtensionData extends DataObject {
'IncludePath' => 'VarChar(500)',
'Bin' => 'VarChar(500)',
'MinimumStability' => 'VarChar(500)',
- );
+ );
static $searchable_fields = array(
'Name' => array(
@@ -158,15 +158,15 @@ private function sendMailtoAuthors($mailData) {
$email->populateTemplate($mailData);
$email->send();
}
-}
+}
class ExtensionData_Controller extends ContentController {
-
+
public $type, $disqus;
static $allowed_actions = array(
'index',
- 'show',
+ 'show',
);
public function init() {
@@ -183,22 +183,22 @@ public function init() {
*/
public function getExtensionData() {
$Params = $this->getURLParams();
-
- if(is_numeric($Params['ID']) && $ExtensionData = ExtensionData::get()->byID((int)$Params['ID'])) {
+
+ if(is_numeric($Params['ID']) && $ExtensionData = ExtensionData::get()->byID((int)$Params['ID'])) {
if(Permission::check("ADMIN") || ($ExtensionData->Type == $this->type && $ExtensionData->Accepted == "1" )) {
return $ExtensionData;
}
}
}
/**
- * Show module data
+ * Show module data
*
* @return array
*/
- function show() {
+ function show() {
- if($ExtensionData = $this->getExtensionData($this->type)) {
+ if($ExtensionData = $this->getExtensionData($this->type)) {
$Data = array(
'MetaTitle' => $ExtensionData->Name,
'ExtensionData' => $ExtensionData,
@@ -216,5 +216,5 @@ function show() {
else{
return $this->httpError(404, "Sorry that $this->type could not be found");
}
- }
+ }
}
@@ -1,9 +1,9 @@
<?php
/**
- * Base class for handling extension tags
- *
+ * Base class for handling extension tags
+ *
* @package extensionmanager
- */
+ */
class ExtensionKeywords extends DataObject {
@@ -37,15 +37,15 @@ class ExtensionKeywords extends DataObject {
/**
* Store Keywords in seprate dataobject
*
- * @param array $authorsRawData, int $extensionId
+ * @param array $authorsRawData, int $extensionId
*/
public static function saveKeywords($rawKeywordData, $extensionId) {
$totalKeywords = count($rawKeywordData);
- for ($i = 0; $i < $totalKeywords; $i++) {
-
+ for ($i = 0; $i < $totalKeywords; $i++) {
+
if($keyword = ExtensionKeywords::get()->filter("KeywordName" , $rawKeywordData[$i])->first()) {
- $keyword->Extension()->add($extensionId);
+ $keyword->Extension()->add($extensionId);
} else {
$keyword = new ExtensionKeywords();
$keyword->KeywordName = $rawKeywordData[$i] ;
@@ -1,22 +1,22 @@
<?php
/**
- * Factory class for handling extension snapshot
+ * Factory class for handling extension snapshot
* Related tasks
- *
+ *
* @package extensionmanager
- */
+ */
class ExtensionSnapshot extends Controller {
/**
- * Save Snapshots of extension in assets folder
+ * Save Snapshots of extension in assets folder
*
- * @param string $thumbnailUrl, $extensionName
- * @return int
+ * @param string $thumbnailUrl, $extensionName
+ * @return int
*/
public static function saveSnapshot($thumbnailUrl, $extensionName) {
-
- $folderToSave = 'assets/Uploads/Snapshots/';
+
+ $folderToSave = 'assets/Uploads/Snapshots/';
$folderObject = Folder::get()->filter("Filename" , $folderToSave)->first();
@@ -27,9 +27,9 @@ public static function saveSnapshot($thumbnailUrl, $extensionName) {
$fileExtension = preg_replace('/^.*\.([^.]+)$/D', '$1', $thumbnailUrl);
- $thumbnailBaseName = str_replace('/', '-', $extensionName);
+ $thumbnailBaseName = str_replace('/', '-', $extensionName);
- $thumbnailName = $thumbnailBaseName.'-thumbnail.'.$fileExtension;
+ $thumbnailName = $thumbnailBaseName.'-thumbnail.'.$fileExtension;
$ch = curl_init();
$timeout = 30;
@@ -49,8 +49,8 @@ public static function saveSnapshot($thumbnailUrl, $extensionName) {
if($folderObject ) {
$thumbnailFile = fopen(BASE_PATH.DIRECTORY_SEPARATOR.$folderToSave.$thumbnailName, 'w');
- fwrite($thumbnailFile, $imageContent);
- fclose($thumbnailFile);
+ fwrite($thumbnailFile, $imageContent);
+ fclose($thumbnailFile);
} else {
throw new InvalidArgumentException("Could not create $folderToSave , Please create it mannually ");
}
@@ -1,13 +1,13 @@
<?php
/**
- * Acts as base class for stroing and handling
+ * Acts as base class for stroing and handling
* Extensions(Module/Widget/Theme) Versions data.
*
* @package extensionmanager
*/
class ExtensionVersion extends DataObject {
- static $db = array(
+ static $db = array(
'SourceType' => 'Varchar(300)',
'SourceUrl' => 'Varchar(300)',
'SourceReference' => 'Varchar(300)',
Oops, something went wrong.

0 comments on commit 8688b60

Please sign in to comment.