fixing typos, PHPDoc and missing namespace \

remotes/origin/stable6
Thomas Müller 12 years ago committed by Bart Visscher
parent 3de8570e35
commit 01c39cf2be
  1. 10
      lib/template.php
  2. 4
      lib/template/cssresourcelocator.php
  3. 6
      lib/template/jsresourcelocator.php
  4. 1
      lib/template/templatefilelocator.php

@ -24,7 +24,7 @@
require_once __DIR__.'/template/functions.php';
/**
* This class provides the templates for owncloud.
* This class provides the templates for ownCloud.
*/
class OC_Template extends \OC\Template\Base {
private $renderas; // Create a full page?
@ -34,7 +34,7 @@ class OC_Template extends \OC\Template\Base {
/**
* @brief Constructor
* @param string $app app providing the template
* @param string $file name of the template file (without suffix)
* @param string $name of the template file (without suffix)
* @param string $renderas = ""; produce a full page
* @return OC_Template object
*
@ -172,7 +172,7 @@ class OC_Template extends \OC\Template\Base {
/**
* @brief Add a custom element to the header
* @param string $tag tag name of the element
* @param array $attributes array of attrobutes for the element
* @param array $attributes array of attributes for the element
* @param string $text the text content for the element
*/
public function addHeader( $tag, $attributes, $text='') {
@ -264,8 +264,8 @@ class OC_Template extends \OC\Template\Base {
/**
* @brief Print a fatal error page and terminates the script
* @param string $error The error message to show
* @param string $hint An optional hint message
* @param string $error_msg The error message to show
* @param string $hint An optional hint message
* Warning: All data passed to $hint needs to get sanitized using OC_Util::sanitizeHTML
*/
public static function printErrorPage( $error_msg, $hint = '' ) {

@ -21,10 +21,10 @@ class CSSResourceLocator extends ResourceLocator {
}
$app = substr($style, 0, strpos($style, '/'));
$style = substr($style, strpos($style, '/')+1);
$app_path = OC_App::getAppPath($app);
$app_path = \OC_App::getAppPath($app);
$app_url = $this->webroot . '/index.php/apps/' . $app;
if ($this->appendIfExist($app_path, $style.$this->form_factor.'.css', $app_url)
|| $this->appendIfExist($app_path, $style.'.css', $ap_url)
|| $this->appendIfExist($app_path, $style.'.css', $app_url)
) {
return;
}

@ -28,10 +28,10 @@ class JSResourceLocator extends ResourceLocator {
}
$app = substr($script, 0, strpos($script, '/'));
$script = substr($script, strpos($script, '/')+1);
$app_path = OC_App::getAppPath($app);
$app_url = OC_App::getAppWebPath($app);
$app_path = \OC_App::getAppPath($app);
$app_url = \OC_App::getAppWebPath($app);
if ($this->appendIfExist($app_path, $script.$this->form_factor.'.js', $app_url)
|| $this->appendIfExist($app_path, $script.'.js', $ap_url)
|| $this->appendIfExist($app_path, $script.'.js', $app_url)
) {
return;
}

@ -11,6 +11,7 @@ namespace OC\Template;
class TemplateFileLocator {
protected $form_factor;
protected $dirs;
private $path;
public function __construct( $form_factor, $dirs ) {
$this->form_factor = $form_factor;

Loading…
Cancel
Save