Minor update docs + format code

1.9.x
Julio Montoya 10 years ago
parent 4d15a0f4fa
commit e2a2ac14a7
  1. 3
      main/inc/lib/document.lib.php
  2. 25
      main/inc/lib/uri.class.php

@ -4027,6 +4027,7 @@ class DocumentManager
}
/**
* Sets
* @param string $file ($document_data['path'])
* @param string $file_url_sys
* @return string
@ -4071,7 +4072,7 @@ class DocumentManager
}
/**
* Erase temp nanogons' audio, image edit
* Erase temp nanogong audio.
*/
public static function removeGeneratedAudioTempFile()
{

@ -2,13 +2,13 @@
/**
* Utility functions to manage uris/urls.
*
*
* @license see /license.txt
* @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Geneva
*/
class Uri
{
public static function chamilo()
{
return 'http://chamilo.org/';
@ -20,21 +20,20 @@ class Uri
public static function www()
{
static $result = false;
if (empty($result))
{
if (empty($result)) {
$result = api_get_path(WEB_PATH);
}
return $result;
}
public static function here($params = array(), $html = true)
{
$protocol = Request::server()->server_protocol();
$protocol = stripos($protocol, 'https') !== false ? 'https' : 'http';
$host = Request::server()->server_name();
$host = $host ? $host : Request::server()->server_addr();
$here = Request::server()->request_uri();
$here = explode('?', $here);
$here = reset($here);
@ -45,10 +44,10 @@ class Uri
/**
* Returns a full url from local/absolute path and parameters.
* Append the root as required for relative urls.
*
*
* @param string $path
* @param array $params
* @return string
* @return string
*/
public static function url($path = '', $params = array(), $html = true)
{
@ -69,7 +68,7 @@ class Uri
/**
* Format url parameters
*
*
* @param array $params
* @return string
*/
@ -86,11 +85,11 @@ class Uri
/**
* Returns the course parameters. If null default to the current user parameters.
*
*
* @param string $course_code
* @param string|int $session_id
* @param string|int $group_id
* @return type
* @return type
*/
public static function course_params($course_code = null, $session_id = null, $group_id = null)
{
@ -102,4 +101,4 @@ class Uri
return array('cidReq' => $course_code, 'id_session' => $session_id, 'gidReq' => $group_id);
}
}
}

Loading…
Cancel
Save