Internal: Remove unused files

pull/3513/head
Julio Montoya 4 years ago
parent 646fdf5994
commit 2554afef15
  1. 103
      public/main/inc/lib/custom_pages.class.php
  2. 4
      public/main/inc/lib/database.mysqli.lib.php
  3. 6
      public/main/inc/lib/flv_player/index.html
  4. BIN
      public/main/inc/lib/flv_player/player_flv_mini.swf
  5. 194
      src/CoreBundle/Entity/Block.php

@ -1,103 +0,0 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Used to implement the loading of custom pages.
*
* @license see /license.txt
* @author 2011, Jean-Karim Bockstael <jeankarim@cblue.be>
* @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Geneva
*/
class CustomPages
{
const INDEX_LOGGED = 'index-logged';
const INDEX_UNLOGGED = 'index-unlogged';
const LOGGED_OUT = 'loggedout';
const REGISTRATION_FEEDBACK = 'registration-feedback';
const REGISTRATION = 'registration';
const LOST_PASSWORD = 'lostpassword';
/**
* Returns true if custom pages are enabled. False otherwise.
*
* @return bool
*/
public static function enabled()
{
return 'true' == api_get_setting('use_custom_pages');
}
/**
* Returns the path to a custom page.
*
* @param string $name
*
* @return string
*/
public static function path($name = '')
{
return api_get_path(SYS_PATH).'custompages/'.$name;
}
/**
* If enabled display a custom page and exist. Otherwise log error and returns.
*
* @param string $pageName
* @param array $content used to pass data to the custom page
*
* @return bool False if custom pages is not enabled or file could not be found. Void otherwise.
*/
public static function display($pageName, $content = [])
{
if (!self::enabled()) {
return false;
}
$file = self::path($pageName.'.php');
// Only include file if it exists, otherwise do nothing
if (file_exists($file)) {
include $file;
exit; //finish the execution here - do not return
}
return false;
}
/**
* Does not look like this function is being used is being used.
*
* @param int $url_id
*
* @return array
*/
public static function getURLImages($url_id = null)
{
if (is_null($url_id)) {
$url = 'http://'.$_SERVER['HTTP_HOST'].'/';
$url_id = UrlManager::get_url_id($url);
}
$url_images_dir = api_get_path(SYS_PATH).'custompages/url-images/';
$images = [];
for ($img_id = 1; $img_id <= 3; $img_id++) {
if (file_exists($url_images_dir.$url_id.'_url_image_'.$img_id.'.png')) {
$images[] = api_get_path(WEB_PATH).'custompages/url-images/'.$url_id.'_url_image_'.$img_id.'.png';
}
}
return $images;
}
/**
* Check if exists the file for custom page.
*
* @param string $pageName The name of custom page
*
* @return bool
*/
public static function exists($pageName)
{
$fileName = self::path("$pageName.php");
return file_exists($fileName);
}
}

@ -1,4 +0,0 @@
<?php
// This file is needed to avoid the double Database class definition in 1.9.x
// Don't remove.

@ -1,6 +0,0 @@
<html>
<head>
</head>
<body>
</body>
</html>

@ -1,194 +0,0 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Block.
*
* @ORM\Table(
* name="block",
* options={"row_format":"DYNAMIC"},
* uniqueConstraints={@ORM\UniqueConstraint(name="path", columns={"path"})}
* )
* @ORM\Entity
*/
class Block
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
protected $id;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255, nullable=true)
*/
protected $name;
/**
* @var string
*
* @ORM\Column(name="description", type="text", nullable=true)
*/
protected $description;
/**
* @var string
*
* @ORM\Column(name="path", type="string", length=190, nullable=false)
*/
protected $path;
/**
* @var string
*
* @ORM\Column(name="controller", type="string", length=100, nullable=false)
*/
protected $controller;
/**
* @var bool
*
* @ORM\Column(name="active", type="boolean", nullable=false)
*/
protected $active;
/**
* Set name.
*
* @param string $name
*
* @return Block
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name.
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set description.
*
* @param string $description
*
* @return Block
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get description.
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set path.
*
* @param string $path
*
* @return Block
*/
public function setPath($path)
{
$this->path = $path;
return $this;
}
/**
* Get path.
*
* @return string
*/
public function getPath()
{
return $this->path;
}
/**
* Set controller.
*
* @param string $controller
*
* @return Block
*/
public function setController($controller)
{
$this->controller = $controller;
return $this;
}
/**
* Get controller.
*
* @return string
*/
public function getController()
{
return $this->controller;
}
/**
* Set active.
*
* @param bool $active
*
* @return Block
*/
public function setActive($active)
{
$this->active = $active;
return $this;
}
/**
* Get active.
*
* @return bool
*/
public function getActive()
{
return $this->active;
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
}
Loading…
Cancel
Save