Replacing new image with new Image see #4778

skala
Julio Montoya 13 years ago
parent 24231f7bf2
commit 59def9e96f
  1. 18
      main/inc/lib/group_portal_manager.lib.php
  2. 2
      main/install/update-db-1.8.5-1.8.6.inc.php
  3. 4
      tests/main/inc/lib/image.lib.test.php

@ -14,14 +14,13 @@ define('GROUP_PERMISSION_OPEN' , '1');
define('GROUP_PERMISSION_CLOSED', '2');
// Group user permissions
define('GROUP_USER_PERMISSION_ADMIN' ,'1'); // the admin of a group
define('GROUP_USER_PERMISSION_READER' ,'2'); // a normal user
define('GROUP_USER_PERMISSION_PENDING_INVITATION' ,'3'); // When an admin/moderator invites a user
define('GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER' ,'4'); // an user joins a group
define('GROUP_USER_PERMISSION_MODERATOR' ,'5'); // a moderator
define('GROUP_USER_PERMISSION_ANONYMOUS' ,'6'); // an anonymous user
define('GROUP_USER_PERMISSION_HRM', '7'); // a human resources manager
define('GROUP_USER_PERMISSION_ADMIN' , '1'); // the admin of a group
define('GROUP_USER_PERMISSION_READER', '2'); // a normal user
define('GROUP_USER_PERMISSION_PENDING_INVITATION', '3'); // When an admin/moderator invites a user
define('GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER', '4'); // an user joins a group
define('GROUP_USER_PERMISSION_MODERATOR', '5'); // a moderator
define('GROUP_USER_PERMISSION_ANONYMOUS' , '6'); // an anonymous user
define('GROUP_USER_PERMISSION_HRM', '7'); // a human resources manager
define('GROUP_IMAGE_SIZE_ORIGINAL', 1);
define('GROUP_IMAGE_SIZE_BIG', 2);
@ -29,6 +28,7 @@ define('GROUP_IMAGE_SIZE_MEDIUM', 3);
define('GROUP_IMAGE_SIZE_SMALL', 4);
define('GROUP_TITLE_LENGTH', 50);
/**
* Class
* @package chamilo.library
@ -904,7 +904,7 @@ class GroupPortalManager {
* @return obj image object
*/
public static function resize_picture($file, $max_size_for_picture) {
$temp = new image($file);
$temp = new Image($file);
$picture_infos = api_getimagesize($file);
if ($picture_infos['width'] > $max_size_for_picture) {
$thumbwidth = $max_size_for_picture;

@ -146,7 +146,7 @@ if (defined('SYSTEM_INSTALLATION')) {
$type = $picture_infos[2];
// Original picture
$big_temp = new image($image_repository);
$big_temp = new Image($image_repository);
switch (!empty($type)) {
case 2 : $temp->send_image('JPG', $picture_location);

@ -1,5 +1,5 @@
<?php
require_once(api_get_path(LIBRARY_PATH).'image.lib.php');
require_once api_get_path(LIBRARY_PATH).'image.lib.php';
class TestImage extends UnitTestCase {
@ -9,7 +9,7 @@ class TestImage extends UnitTestCase {
}
public function setUp(){
$this->timage = new image();
$this->timage = new Image();
}
public function tearDown(){

Loading…
Cancel
Save