diff options
Diffstat (limited to 'engine/lib/elgglib.php')
| -rw-r--r-- | engine/lib/elgglib.php | 20 | 
1 files changed, 10 insertions, 10 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 06af14fcb..fc87c1dc1 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -131,13 +131,13 @@  		/**  		 * Return the location of a given view.  		 * -		 * @param string $view The view.
 +		 * @param string $view The view.  		 * @param string $viewtype The viewtype  		 */  		function elgg_get_view_location($view, $viewtype = '')  		{  			global $CONFIG; -		
 +		  			if (empty($viewtype))  				$viewtype = elgg_get_viewtype(); @@ -162,7 +162,7 @@  	 * @param string $view The name and location of the view to use  	 * @param array $vars Any variables that the view requires, passed as an array  	 * @param boolean $bypass If set to true, elgg_view will bypass any specified alternative template handler; by default, it will hand off to this if requested (see set_template_handler) -	 * @param boolean $debug If set to true, the viewer will complain if it can't find a view
 +	 * @param boolean $debug If set to true, the viewer will complain if it can't find a view  	 * @param string $viewtype If set, forces the viewtype for the elgg_view call to be this value (default: standard detection)   	 * @return string The HTML content  	 */ @@ -228,7 +228,7 @@  		    } -		// Get the current viewtype
 +		// Get the current viewtype  			if (empty($viewtype))  				$viewtype = elgg_get_viewtype();  @@ -278,7 +278,7 @@  	/**  	 * Returns whether the specified view exists  	 * -	 * @param string $view The view name
 +	 * @param string $view The view name  	 * @param string $viewtype If set, forces the viewtype  	 * @return true|false Depending on success  	 */ @@ -286,7 +286,7 @@  				global $CONFIG; -			// Detect view type
 +			// Detect view type  				if (empty($viewtype))  			    	$viewtype = elgg_get_viewtype(); @@ -625,14 +625,14 @@  			$subtype = $entity->getSubtype();  			if (empty($subtype)) { $subtype = $entity_type; } -
 +  			$contents = '';  			if (elgg_view_exists("{$entity_type}/{$subtype}")) {  				$contents = elgg_view("{$entity_type}/{$subtype}",array(  																	'entity' => $entity,  																	'full' => $full  																	), $bypass, $debug); -			} 
 +			}   			if (empty($contents)) {  				$contents = elgg_view("{$entity_type}/default",array(  																'entity' => $entity, @@ -645,7 +645,7 @@  				if ($annotations)  					$contents .= $annotations; -			}
 +			}  			return $contents;  		} @@ -2303,7 +2303,7 @@  		define('ACCESS_DEFAULT',-1);  		define('ACCESS_PRIVATE',0);  		define('ACCESS_LOGGED_IN',1); -		define('ACCESS_PUBLIC',2);
 +		define('ACCESS_PUBLIC',2);  		define('ACCESS_FRIENDS',-2);  	register_elgg_event_handler('init','system','elgg_init');  | 
