You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by sg...@apache.org on 2008/05/07 09:06:41 UTC

svn commit: r654010 - in /incubator/shindig/trunk/php/src/gadgets: ViewSpec.php http/GadgetRenderingServlet.php http/HttpUtil.php

Author: sgala
Date: Wed May  7 00:06:40 2008
New Revision: 654010

URL: http://svn.apache.org/viewvc?rev=654010&view=rev
Log:
A number of files had mixed line endings

Modified:
    incubator/shindig/trunk/php/src/gadgets/ViewSpec.php
    incubator/shindig/trunk/php/src/gadgets/http/GadgetRenderingServlet.php
    incubator/shindig/trunk/php/src/gadgets/http/HttpUtil.php

Modified: incubator/shindig/trunk/php/src/gadgets/ViewSpec.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/ViewSpec.php?rev=654010&r1=654009&r2=654010&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/ViewSpec.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/ViewSpec.php Wed May  7 00:06:40 2008
@@ -1,27 +1,27 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * 
- */
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * 
+ */
 
 /**
  * Represents a Content section, but normalized into an individual
  * view value after views are split on commas.
- */
+ */
 class ViewSpec {
 	
 	public $name;

Modified: incubator/shindig/trunk/php/src/gadgets/http/GadgetRenderingServlet.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/http/GadgetRenderingServlet.php?rev=654010&r1=654009&r2=654010&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/http/GadgetRenderingServlet.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/http/GadgetRenderingServlet.php Wed May  7 00:06:40 2008
@@ -25,7 +25,7 @@
  * 
  */
 class GadgetRenderingServlet extends HttpServlet {
-	private $context;
+	private $context;
 	
 	/**
 	 * Creates the gadget using the GadgetServer class and calls outputGadget
@@ -33,7 +33,7 @@
 	 */
 	public function doGet()
 	{
-		try {
+		try {
 			if (empty($_GET['url'])) {
 				throw new GadgetException("Missing required parameter: url");
 			}
@@ -78,8 +78,8 @@
 	 * @param string $view the view to render (only valid with a html content type)
 	 */
 	private function outputGadget($gadget, $context)
-	{
-		$view = HttpUtil::getView($gadget, $context);
+	{
+		$view = HttpUtil::getView($gadget, $context);
 		switch ($view->getType()) {
 			case 'HTML' :
 				$this->outputHtmlGadget($gadget, $context, $view);
@@ -101,11 +101,11 @@
 	 * @param GadgetContext $context
 	 */
 	private function outputHtmlGadget($gadget, $context, $view)
-	{
+	{
 		$this->setContentType("text/html; charset=UTF-8");
-		$output = '';
-		if (!$view->getQuirks()) {
-			$output .= "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">";
+		$output = '';
+		if (!$view->getQuirks()) {
+			$output .= "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">";
 		}
 		$output .= "<html>\n<head>\n";
 		// TODO: This is so wrong. (todo copied from java shindig, but i would agree with it :))
@@ -182,7 +182,7 @@
 	 * @param Gadget $gadget
 	 */
 	private function outputUrlGadget($gadget, $context, $view)
-	{
+	{
 		// Preserve existing query string parameters.
 		$redirURI = $view->getHref();
 		$queryStr = strpos($redirURI, '?') !== false ? substr($redirURI, strpos($redirURI, '?')) : '';

Modified: incubator/shindig/trunk/php/src/gadgets/http/HttpUtil.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/http/HttpUtil.php?rev=654010&r1=654009&r2=654010&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/http/HttpUtil.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/http/HttpUtil.php Wed May  7 00:06:40 2008
@@ -1,50 +1,50 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * 
- */
-
-/**
- * Collection of HTTP utilities
- */
-class HttpUtil {
-	
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ * 
+ */
+
+/**
+ * Collection of HTTP utilities
+ */
+class HttpUtil {
+	
 	static public function getView($gadget, $context)
-	{
-		$view = $gadget->getView($context->getView());	
-		if (empty($view)) {
-			$containerConfig = $context->getContainerConfig();
-			$config = $containerConfig->getConfig('default', 'gadgets.features');
+	{
+		$view = $gadget->getView($context->getView());	
+		if (empty($view)) {
+			$containerConfig = $context->getContainerConfig();
+			$config = $containerConfig->getConfig('default', 'gadgets.features');
 			$configViews = $config['views'];
-			if (isset($configViews[$context->getView()])) {
-				$views = $configViews[$context->getView()];
-				if (!empty($views)) {
-					$aliasesViews = $views['aliases'];
-					for ($i = 0; $i < count($aliasesViews); $i++) {
-						$view = $gadget->getView($aliasesViews[$i]);
-						if (!empty($view)) {
-							break;
-						}
-					}
+			if (isset($configViews[$context->getView()])) {
+				$views = $configViews[$context->getView()];
+				if (!empty($views)) {
+					$aliasesViews = $views['aliases'];
+					for ($i = 0; $i < count($aliasesViews); $i++) {
+						$view = $gadget->getView($aliasesViews[$i]);
+						if (!empty($view)) {
+							break;
+						}
+					}
 				}
-			} else {
-				$view = $gadget->getView(DEFAULT_VIEW);
-			}
-		}
-		return $view;
-	}
+			} else {
+				$view = $gadget->getView(DEFAULT_VIEW);
+			}
+		}
+		return $view;
+	}
 }