Yannick Warnier 13 năm trước cách đây
mục cha
commit
66e9da4407

+ 2 - 2
main/document/create_paint.php

@@ -127,7 +127,7 @@ echo '<div class="actions">';
 echo '</div>';
 
 ///pixlr
-// max size 1 Mb
+// max size 1 Mb ??
 $title=urlencode(utf8_encode(get_lang('NewImage')));//TODO:check
 //
 $image=api_get_path(WEB_IMG_PATH).'canvas1024x768.png';
@@ -138,7 +138,7 @@ $langpixlr = isset($pixlr_code_translation_table[$langpixlr]) ? $pixlredit_code_
 $loc=$langpixlr;// deprecated ?? TODO:check pixlr read user browser
 
 $exit_path=api_get_path(WEB_CODE_PATH).'document/exit_pixlr.php';
-$_SESSION['exit_pixlr']= Security::remove_XSS($dir);
+$_SESSION['exit_pixlr']=$document_data['path'];
 $referrer="Chamilo";
 $target_path=api_get_path(WEB_CODE_PATH).'document/save_pixlr.php';
 $target=$target_path;

+ 2 - 1
main/document/save_pixlr.php

@@ -78,6 +78,7 @@ $title = $title.'.'.$extension;
 if($currentTool=='document/createpaint'){		
 	//check save as and prevent rewrite an older file with same name	
 	if (0 != $groupId){
+	require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
 	$group_properties  = GroupManager :: get_group_properties($groupId);
 	$groupPath = $group_properties['directory'];
 	}
@@ -142,4 +143,4 @@ else{
 	$location=api_get_path(WEB_CODE_PATH).'document/document.php?curdirpath='.Security::remove_XSS($_SESSION['exit_pixlr']);
 	echo '<script>window.parent.location.href="'.$location.'"</script>';
 	unset($_SESSION['exit_pixlr']);
-}
+}

+ 3 - 3
main/install/db_main.sql

@@ -826,7 +826,7 @@ VALUES
 ('header_extra_content', NULL, 'textarea', 'Tracking', '', 'HeaderExtraContentTitle', 'HeaderExtraContentComment', NULL, NULL, 1),
 ('footer_extra_content', NULL, 'textarea', 'Tracking', '', 'FooterExtraContentTitle', 'FooterExtraContentComment', NULL, NULL, 1),
 ('show_documents_preview', NULL, 'radio', 'Tools', 'false', 'ShowDocumentPreviewTitle', 'ShowDocumentPreviewComment', NULL, NULL, 1),
-('htmlpurifier_wiki', NULL, 'radio', 'Editor', 'true', 'HtmlPurifierWikiTitle', 'HtmlPurifierWikiComment', NULL, NULL, 0),
+('htmlpurifier_wiki', NULL, 'radio', 'Editor', 'false', 'HtmlPurifierWikiTitle', 'HtmlPurifierWikiComment', NULL, NULL, 0),
 ('cas_activate', NULL, 'radio', 'CAS', 'false', 'CasMainActivateTitle', 'CasMainActivateComment', NULL, NULL, 0),
 ('cas_server', NULL, 'textfield', 'CAS', '', 'CasMainServerTitle', 'CasMainServerComment', NULL, NULL, 0),
 ('cas_server_uri', NULL, 'textfield', 'CAS', '', 'CasMainServerURITitle', 'CasMainServerURIComment', NULL, NULL, 0),
@@ -1132,8 +1132,8 @@ VALUES
 ('enable_nanogong','false','No'),
 ('show_documents_preview', 'true', 'Yes'),
 ('show_documents_preview', 'false', 'No'),
-('enabled_htmlpurifier', 'true', 'Yes'),
-('enabled_htmlpurifier', 'false', 'No'),
+('htmlpurifier_wiki', 'true', 'Yes'),
+('htmlpurifier_wiki', 'false', 'No'),
 ('cas_activate', 'true', 'Yes'),
 ('cas_activate', 'false', 'No'),
 ('cas_protocol', 'CAS1', 'CAS1Text'),