Minor - cleaning code, format code.

1.9.x
Julio Montoya 11 years ago
parent d074881e04
commit ea95575891
  1. 7
      main/inc/lib/fckeditor/editor/plugins/ImageManager/config.inc.php
  2. 36
      main/inc/lib/fckeditor/editor/plugins/ImageManager/editorFrame.php
  3. 20
      main/inc/lib/fckeditor/editor/plugins/ImageManager/manager.php
  4. 5
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php
  5. 11
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/function.base.php
  6. 24
      main/inc/lib/fckeditor/fcktemplates.xml.php

@ -28,14 +28,17 @@
*/
$language_file = array('document');
include '../../../../../../inc/global.inc.php';
require_once '../../../../../../inc/global.inc.php';
// Disabling access for anonymous users.
api_block_anonymous_users();
// Initialization of the repositories.
require_once api_get_path(LIBRARY_PATH).'fckeditor/repository.php';
// Choosing the repository to be used.
if (api_is_in_course()) {
if (!api_is_in_group()) {
if (!api_is_in_group()) {
// 1. We are inside a course and not in a group.
if (api_is_allowed_to_edit()) {
// 1.1. Teacher

@ -1,27 +1,27 @@
<?php
/**
* The frame that contains the image to be edited.
* @author Wei Zhuo
* @author Paul Moers <mail@saulmade.nl> - watermarking and replace code + several small enhancements <http://www.saulmade.nl/FCKeditor/FCKPlugins.php>
* @version $Id: editorFrame.php,v 1.7 2006/12/20 18:19:28 thierrybo Exp $
* @package ImageManager
*/
/**
* The frame that contains the image to be edited.
* @author Wei Zhuo
* @author Paul Moers <mail@saulmade.nl> - watermarking and replace code + several small enhancements <http://www.saulmade.nl/FCKeditor/FCKPlugins.php>
* @version $Id: editorFrame.php,v 1.7 2006/12/20 18:19:28 thierrybo Exp $
* @package ImageManager
*/
require_once('config.inc.php');
require_once('Classes/ImageManager.php');
require_once('Classes/ImageEditor.php');
require_once('config.inc.php');
require_once('Classes/ImageManager.php');
require_once('Classes/ImageEditor.php');
//default path is /
$relative = '/';
//default path is /
$relative = '/';
$manager = new ImageManager($IMConfig);
$editor = new ImageEditor($manager);
$manager = new ImageManager($IMConfig);
$editor = new ImageEditor($manager);
// process any uploaded files
$imageRelative = $manager->processUploads();
// process any uploaded files
$imageRelative = $manager->processUploads();
// get image info and process any action
$imageInfo = $editor->processImage($imageRelative);
// get image info and process any action
$imageInfo = $editor->processImage($imageRelative);
?>
<!--[if IE]>

@ -6,21 +6,13 @@
* @package ImageManager
*/
require_once('config.inc.php');
require_once('Classes/ImageManager.php');
require_once('config.inc.php');
require_once('Classes/ImageManager.php');
$manager = new ImageManager($IMConfig);
$dirs = $manager->getDirs();
$var = explode('/',$_GET['base_url_alt']);
/*
// if the base_url_alt parameter there is a default_course_document we change the allow upload parameter
if (($var[count($var)-2] == 'default_course_document') && !api_is_platform_admin())
{
$IMConfig['allow_upload']=false;
}
*/
//clean injection string (XSS)
$base_url_alt = str_replace('"','',$_GET['base_url_alt']);
$manager = new ImageManager($IMConfig);
$dirs = $manager->getDirs();
$var = explode('/',$_GET['base_url_alt']);
$base_url_alt = str_replace('"','',$_GET['base_url_alt']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

@ -11,9 +11,6 @@
* @since 31/December/2008
*/
//error_reporting(E_ALL);
//error_reporting(E_ALL ^ E_NOTICE);
//Access Control Setting
/**
* turn off => false
@ -120,8 +117,6 @@ define('CONFIG_SYS_ROOT_PATH', $PathChamiloAjaxFileManager);
// end chamilo
define('CONFIG_SYS_FOLDER_SHOWN_ON_TOP', true); //show your folders on the top of list if true or order by name
define("CONFIG_SYS_DIR_SESSION_PATH", session_save_path()); // Hack by Juan Carlos Raña
define("CONFIG_SYS_PATTERN_FORMAT", 'list'); //three options: reg ,csv, list, this option define the parttern format for the following patterns

@ -9,17 +9,6 @@
*/
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."config.php";
/**
* force to ensure existence of stripos
*/
if (!function_exists("stripos")) {
function stripos($str, $needle, $offset = 0) {
return @strpos(strtolower($str), strtolower($needle), $offset);
}
}
/**
* get the current Url but not the query string specified in $excls
*

@ -1,17 +1,5 @@
<?php
/**
* Chamilo LMS
*
* For a full list of contributors, see "credits.txt".
* The full license can be read in "license.txt".
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* See the GNU General Public License for more details.
*/
/* For licensing terms, see /license.txt */
// Setting the encoding to UTF-8.
header('Content-Type: text/xml; charset=utf-8');
@ -204,16 +192,16 @@ function load_personal_templates($user_id = 0) {
$table_template = Database::get_main_table(TABLE_MAIN_TEMPLATES);
$table_document = Database::get_course_table(TABLE_DOCUMENT);
$course_id = api_get_course_int_id();
// The sql statement for getting all the user defined templates
$sql = "SELECT template.id, template.title, template.description, template.image, template.ref_doc, document.path
FROM ".$table_template." template, ".$table_document." document
WHERE
user_id='".Database::escape_string($user_id)."' AND
WHERE
user_id='".Database::escape_string($user_id)."' AND
course_code='".Database::escape_string(api_get_course_id())."' AND
document.c_id = $course_id AND
document.c_id = $course_id AND
document.id = template.ref_doc";
$result_template = Database::query($sql);
@ -252,7 +240,7 @@ function load_empty_template() {
<![CDATA[
<html>
<head>
<meta charset="<?php echo api_get_system_encoding(); ?>" />
<meta charset="<?php echo api_get_system_encoding(); ?>" />
</head>
<body dir="<?php echo api_get_text_direction(); ?>">
</body>

Loading…
Cancel
Save