skala
Juan Carlos Raña 15 years ago
commit 977b171c24
  1. 0
      main/document/create_draw.php
  2. 7
      main/document/document.inc.php
  3. 28
      main/document/document.php
  4. 9
      main/document/edit_document.php
  5. 4
      main/document/edit_draw.php
  6. BIN
      main/img/canvas1024x768.png
  7. BIN
      main/img/canvas1920x1080.png
  8. BIN
      main/img/canvas800x600.png
  9. 0
      main/img/draw_big.png
  10. BIN
      main/img/new_paint.png
  11. BIN
      main/img/paint_big.png
  12. 2
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/en.php
  13. 2
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/es.php
  14. 2
      main/inc/lib/message.lib.php
  15. 12
      main/inc/lib/svg-edit/extensions/filesave.php
  16. 7
      main/install/db_main.sql
  17. 6
      main/install/migrate-db-1.8.7-1.8.8-pre.sql
  18. 0
      main/social/usergroups.php

@ -380,7 +380,10 @@ function build_edit_icons($curdirpath, $type, $path, $visibility, $id, $is_templ
$modify_icons = '<a href="edit_document.php?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;file='.urlencode($path).$req_gid.'&selectcat='.$gradebook_category.'"><img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="" /></a>';
}else {
if($extension=='svg' && api_browser_support('svg') && api_get_setting('enabled_support_svg') == 'true'){
$modify_icons = '<a href="edit_drawing.php?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;file='.urlencode($path).$req_gid.'"><img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="" /></a>';
$modify_icons = '<a href="edit_draw.php?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;file='.urlencode($path).$req_gid.'"><img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="" /></a>';
}
elseif($extension=='png' || $extension='jpg' || $extension='jpeg' || $extension='bmp' || $extension="pxd" && api_get_setting('enabled_support_pixlr') == 'true'){
$modify_icons = '<a href="edit_paint.php?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;file='.urlencode($path).$req_gid.'"><img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="" /></a>';
}else{
$modify_icons = '<a href="edit_document.php?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;file='.urlencode($path).$req_gid.'"><img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="" /></a>';
}
@ -684,7 +687,7 @@ function search_keyword($document_name, $keyword) {
function is_browser_viewable($file_extension) {
static $allowed_extensions = array(
'htm', 'html', 'xhtml', 'gif', 'jpg', 'jpeg', 'png', 'pdf', 'swf', 'mp3', 'mp4', 'ogg', 'ogx', 'oga', 'ogv', 'svg',
'txt', 'log', 'css', 'js',
'txt', 'log',
'mpg', 'mpeg'
);
if (!($result = in_array($file_extension, $allowed_extensions))) { // Assignment + a logical check.

@ -919,22 +919,30 @@ if ($is_allowed_to_edit || $group_member_with_upload_rights || is_my_shared_fold
if (api_browser_support('svg')){
?>
<a href="create_drawing.php?<?php echo api_get_cidreq(); ?>&dir=<?php echo $curdirpathurl.$req_gid; ?>">
<a href="create_draw.php?<?php echo api_get_cidreq(); ?>&dir=<?php echo $curdirpathurl.$req_gid; ?>">
<?php Display::display_icon('draw_new.png', get_lang('Draw')); echo get_lang('Draw'); ?></a>&nbsp;
<?php
}else{
Display::display_icon('draw_new_na.png', get_lang('BrowserDontSupportsSVG')); echo get_lang('Draw').'&nbsp;';
}
}
}
// Create new audio
if (api_get_setting('enabled_text2audio') == 'true'){
?>
<a href="create_audio.php?<?php echo api_get_cidreq(); ?>&dir=<?php echo $curdirpathurl.$req_gid; ?>">
<?php Display::display_icon('new_text2audio.png', get_lang('CreateAudio')); echo get_lang('CreateAudio'); ?></a>&nbsp;
<?php
}
// Create new paint
if (api_get_setting('enabled_support_pixlr') == 'true'){
?>
<a href="create_paint.php?<?php echo api_get_cidreq(); ?>&dir=<?php echo $curdirpathurl.$req_gid; ?>">
<?php Display::display_icon('new_paint.png', get_lang('Paint')); echo get_lang('Paint'); ?></a>&nbsp;
<?php
}
// Create new audio
if (api_get_setting('enabled_text2audio') == 'true'){
?>
<a href="create_audio.php?<?php echo api_get_cidreq(); ?>&dir=<?php echo $curdirpathurl.$req_gid; ?>">
<?php Display::display_icon('new_text2audio.png', get_lang('CreateAudio')); echo get_lang('CreateAudio'); ?></a>&nbsp;
<?php
}
}
// Create new certificate
if ($is_certificate_mode) {

@ -598,10 +598,13 @@ function show_return($call_from_tool='', $slide_id=0, $is_certificate_mode=false
elseif($call_from_tool=='slideshow'){
echo '<a href="'.api_get_path(WEB_PATH).'main/document/slideshow.php?slide_id='.$slide_id.'&curdirpath='.Security::remove_XSS(urlencode($_GET['curdirpath'])).'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('ViewSlideshow')).get_lang('BackTo').' '.get_lang('ViewSlideshow').'</a>';
}
elseif($call_from_tool=='editdrawing'){
elseif($call_from_tool=='editdraw'){
echo '<a href="document.php?action=exit_slideshow&curdirpath='.$pathurl.'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview')).get_lang('BackTo').' '.get_lang('DocumentsOverview').'</a>';
echo '<a href="javascript:history.back(1)">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('Draw')).get_lang('BackTo').' '.get_lang('Draw').'</a>';
echo '<a href="javascript:history.back(1)">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('Draw')).get_lang('BackTo').' '.get_lang('Draw').'</a>';
}
elseif($call_from_tool=='editpaint'){
echo '<a href="document.php?action=exit_slideshow&curdirpath='.$pathurl.'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview')).get_lang('BackTo').' '.get_lang('DocumentsOverview').'</a>';
echo '<a href="javascript:history.back(1)">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('Paint')).get_lang('BackTo').' '.get_lang('Paint').'</a>';
}
else{
echo '<a href="document.php?action=exit_slideshow&curdirpath='.$pathurl.'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview')).get_lang('BackTo').' '.get_lang('DocumentsOverview').'</a>&nbsp;';

@ -109,7 +109,7 @@ Display :: display_header($nameTools, 'Doc');
echo '<div class="actions">';
echo '<a href="document.php?curdirpath='.Security::remove_XSS($_GET['curdirpath']).'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview')).get_lang('BackTo').' '.get_lang('DocumentsOverview').'</a>';
echo '<a href="edit_document.php?'.api_get_cidreq().'&curdirpath='.Security::remove_XSS($_GET['curdirpath']).'&amp;file='.urlencode($dir.$file).$req_gid.'&amp;origin=editdrawing">'.Display::return_icon('edit.gif',get_lang('Rename')).get_lang('Rename').', '.get_lang('Comment').'</a>';
echo '<a href="edit_document.php?'.api_get_cidreq().'&curdirpath='.Security::remove_XSS($_GET['curdirpath']).'&amp;file='.urlencode($dir.$file).$req_gid.'&amp;origin=editdraw">'.Display::return_icon('edit.gif',get_lang('Rename')).get_lang('Rename').', '.get_lang('Comment').'</a>';
echo '</div>';
if (api_browser_support('svg')){
@ -120,7 +120,7 @@ if (api_browser_support('svg')){
$langsvgedit = isset($svgedit_code_translation_table[$langsvgedit]) ? $svgedit_code_translation_table[$langsvgedit] : $langsvgedit;
$langsvgedit = file_exists(api_get_path(LIBRARY_PATH).'svg-edit/locale/lang.'.$langsvgedit.'.js') ? $langsvgedit : 'en';
echo '<iframe style=\'height: 500px; width: 100%;\' scrolling=\'no\' frameborder=\'0\' src=\''.api_get_path(WEB_LIBRARY_PATH).'svg-edit/svg-editor.php?url=../../../../courses/'.$courseDir.$dir.$file.'&lang='.$langsvgedit.'\'>';
echo '<iframe style=\'height: 500px; width: 100%;\' scrolling=\'no\' frameborder=\'0\' src=\''.api_get_path(WEB_LIBRARY_PATH).'svg-edit/svg-editor.php?url=../../../../courses/'.$courseDir.$dir.$file.'&amp;lang='.$langsvgedit.'\'>';
echo '</iframe>';
}else{

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@ -117,7 +117,7 @@
define('SEARCH_TYPE_HTML', 'HTML');
define('SEARCH_TYPE_VIDEO', 'Video');
define('SEARCH_TYPE_MOVIE', 'Movie');
define('SEARCH_TYPE_MUSIC', 'Music');
define('SEARCH_TYPE_MUSIC', 'Audio');
define('SEARCH_TYPE_FLASH', 'Flash');
define('SEARCH_TYPE_PPT', 'PowerPoint');
define('SEARCH_TYPE_DOC', 'Document');

@ -113,7 +113,7 @@
define('SEARCH_TYPE_HTML', 'HTML');
define('SEARCH_TYPE_VIDEO', 'Video');
define('SEARCH_TYPE_MOVIE', 'Pelicula');
define('SEARCH_TYPE_MUSIC', 'Musica');
define('SEARCH_TYPE_MUSIC', 'Audio');
define('SEARCH_TYPE_FLASH', 'Flash');
define('SEARCH_TYPE_PPT', 'PowerPoint');
define('SEARCH_TYPE_DOC', 'Documento');

@ -954,7 +954,7 @@ class MessageManager
$html_items.= '<div class="message-group-title">'.Security::remove_XSS($item['title']).'&nbsp;</div>';
$image_path = UserManager::get_user_picture_path_by_id($topic['user_sender_id'], 'web', false, true); $image_repository = $image_path['dir'];
$existing_image = $image_path['file'];
$html_items.= '<div class="message-group-author"><img src="'.$image_repository.$existing_image.'" alt="'.$name.'" width="44" height="44" title="'.$name.'" />&nbsp;<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$item['user_sender_id'].'">'.$name.'&nbsp;</a></div>';
$html_items.= '<div class="message-group-author"><img src="'.$image_repository.$existing_image.'" alt="'.$name.'" width="32" height="32" title="'.$name.'" />&nbsp;<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$item['user_sender_id'].'">'.$name.'&nbsp;</a></div>';
$html_items.= '<div class="message-group-content">'.$item['content'].'</div>';
if ($item['send_date'] != $item['update_date']) {

@ -83,8 +83,12 @@ $filename = Security::remove_XSS($filename);
$filename = replace_dangerous_char($filename, 'strict');
$filename = disable_dangerous_file($filename);
//a bit mime security
// a bit extension
if($suffix!= 'svg' || $suffix!= 'png'){
die();
}
//a bit mime security
if (phpversion() >= '5.3') {
$finfo = new finfo(FILEINFO_MIME);
$current_mime=$finfo->buffer($contents);
@ -100,12 +104,6 @@ if (phpversion() >= '5.3') {
//die();//File extension does not match its content //disabled to check into chamilo dev campus TODO:enabled
}
}else{
if($suffix!= 'svg' || $suffix!= 'png')
{
//die();//disabled to check into chamilo dev campus
}
}
//checks if the file exists, then rename the new

@ -815,7 +815,8 @@ VALUES
('course_hide_tools','tracking','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Stats',1),
('course_hide_tools','course_maintenance','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Maintenance',1),
('course_hide_tools','course_setting','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'CourseSettings',1),
('chamilo_database_version', NULL,'textfield', NULL, '1.8.8.13330','DokeosDatabaseVersion','', NULL, NULL, 0);
('enabled_support_pixlr',NULL,'radio','Tools','false','EnabledPixlrTitle','EnabledPixlrComment',NULL,NULL, 0),
('chamilo_database_version',NULL,'textfield',NULL, '1.8.8.13330','DokeosDatabaseVersion','', NULL, NULL, 0);
UNLOCK TABLES;
@ -1069,7 +1070,9 @@ VALUES
('show_chat_folder','true','Yes'),
('show_chat_folder','false','No'),
('enabled_text2audio','true','Yes'),
('enabled_text2audio','false','No');
('enabled_text2audio','false','No'),
('enabled_support_pixlr','true','Yes'),
('enabled_support_pixlr','false','No');
UNLOCK TABLES;

@ -72,7 +72,7 @@ INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_go
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enabled_imgmap',NULL,'radio','Editor','true','EnabledImageMapsTitle','EnabledImageMapsComment',NULL,NULL, 0);
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_imgmap', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_imgmap', 'false', 'No');
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enabled_support_svg',NULL,'radio','Editor','true','EnabledSVGTitle','EnabledSVGComment',NULL,NULL, 0);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enabled_support_svg',NULL,'radio','Tools','true','EnabledSVGTitle','EnabledSVGComment',NULL,NULL, 0);
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_support_svg', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_support_svg', 'false', 'No');
@ -142,6 +142,10 @@ INSERT INTO settings_current (variable, subkey, type, category, selected_value,
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','course_maintenance','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Maintenance',1);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_hide_tools','course_setting','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'CourseSettings',1);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enabled_support_pixlr',NULL,'radio','Tools','false','EnabledPixlrTitle','EnabledPixlrComment',NULL,NULL, 0);
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_support_pixlr', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_support_pixlr', 'false', 'No');
UPDATE settings_current SET selected_value = '1.8.8.13330' WHERE variable = 'chamilo_database_version';
-- xxSTATSxx

Loading…
Cancel
Save