Merged and resolved conflicts

skala
Noël Dieschburg 16 years ago
commit b2a3bb7703
  1. 26
      documentation/changelog.html
  2. 45
      main/admin/add_courses_to_session.php
  3. 28
      main/admin/add_users_to_session.php
  4. 4
      main/admin/course_user_list.php
  5. 7
      main/auth/inscription.php
  6. 33
      main/document/slideshowoptions.php
  7. 114
      main/dropbox/dropbox_functions.inc.php
  8. 10
      main/exercice/adminhp.php
  9. 4
      main/exercice/exercice.php
  10. 2
      main/exercice/exercise_result.class.php
  11. 20
      main/exercice/hotpotatoes.lib.php
  12. 2
      main/exercice/showinframes.php
  13. 2
      main/exercice/testheaderpage.php
  14. 38
      main/forum/forumfunction.inc.php
  15. 2
      main/gradebook/gradebook_result.class.php
  16. BIN
      main/img/wiki/assignment.gif
  17. BIN
      main/img/wiki/task.gif
  18. BIN
      main/img/wiki/works.gif
  19. 1
      main/inc/lib/add_course.lib.inc.php
  20. 5
      main/inc/lib/blog.lib.php
  21. 33
      main/inc/lib/course.lib.php
  22. 4
      main/inc/lib/fckeditor/editor/_source/commandclasses/fck_othercommands.js
  23. 8
      main/inc/lib/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js
  24. 356
      main/inc/lib/fckeditor/editor/_source/fckeditorapi.js
  25. 32
      main/inc/lib/fckeditor/editor/_source/internals/fck.js
  26. 10
      main/inc/lib/fckeditor/editor/_source/internals/fck_gecko.js
  27. 18
      main/inc/lib/fckeditor/editor/_source/internals/fck_ie.js
  28. 2
      main/inc/lib/fckeditor/editor/_source/internals/fckdialog.js
  29. 48
      main/inc/lib/fckeditor/editor/_source/internals/fckdomtools.js
  30. 17
      main/inc/lib/fckeditor/editor/_source/internals/fckxhtml.js
  31. 36
      main/inc/lib/fckeditor/editor/_source/internals/fckxhtml_ie.js
  32. 2
      main/inc/lib/fckeditor/editor/dialog/common/fck_dialog_common.js
  33. 7
      main/inc/lib/fckeditor/editor/dialog/fck_about.html
  34. 5
      main/inc/lib/fckeditor/editor/dialog/fck_anchor.html
  35. 5
      main/inc/lib/fckeditor/editor/dialog/fck_button.html
  36. 5
      main/inc/lib/fckeditor/editor/dialog/fck_checkbox.html
  37. 5
      main/inc/lib/fckeditor/editor/dialog/fck_colorselector.html
  38. 5
      main/inc/lib/fckeditor/editor/dialog/fck_div.html
  39. 39
      main/inc/lib/fckeditor/editor/dialog/fck_docprops.html
  40. 2
      main/inc/lib/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html
  41. 5
      main/inc/lib/fckeditor/editor/dialog/fck_flash.html
  42. 5
      main/inc/lib/fckeditor/editor/dialog/fck_form.html
  43. 5
      main/inc/lib/fckeditor/editor/dialog/fck_hiddenfield.html
  44. 5
      main/inc/lib/fckeditor/editor/dialog/fck_image.html
  45. 5
      main/inc/lib/fckeditor/editor/dialog/fck_link.html
  46. 5
      main/inc/lib/fckeditor/editor/dialog/fck_listprop.html
  47. 5
      main/inc/lib/fckeditor/editor/dialog/fck_paste.html
  48. 5
      main/inc/lib/fckeditor/editor/dialog/fck_radiobutton.html
  49. 5
      main/inc/lib/fckeditor/editor/dialog/fck_replace.html
  50. 5
      main/inc/lib/fckeditor/editor/dialog/fck_select.html
  51. 5
      main/inc/lib/fckeditor/editor/dialog/fck_smiley.html
  52. 5
      main/inc/lib/fckeditor/editor/dialog/fck_source.html
  53. 5
      main/inc/lib/fckeditor/editor/dialog/fck_specialchar.html
  54. 5
      main/inc/lib/fckeditor/editor/dialog/fck_spellerpages.html
  55. 148
      main/inc/lib/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm
  56. 181
      main/inc/lib/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl
  57. 49
      main/inc/lib/fckeditor/editor/dialog/fck_table.html
  58. 11
      main/inc/lib/fckeditor/editor/dialog/fck_tablecell.html
  59. 5
      main/inc/lib/fckeditor/editor/dialog/fck_template.html
  60. 5
      main/inc/lib/fckeditor/editor/dialog/fck_textarea.html
  61. 5
      main/inc/lib/fckeditor/editor/dialog/fck_textfield.html
  62. 2
      main/inc/lib/fckeditor/editor/filemanager/browser/default/browser.css
  63. 6
      main/inc/lib/fckeditor/editor/filemanager/browser/default/frmresourceslist.html
  64. 6
      main/inc/lib/fckeditor/editor/filemanager/connectors/php/basexml.php
  65. 1
      main/inc/lib/fckeditor/editor/filemanager/connectors/php/commands.php
  66. 2
      main/inc/lib/fckeditor/editor/filemanager/connectors/php/upload.php
  67. 18
      main/inc/lib/fckeditor/editor/js/fckeditorcode_gecko.js
  68. 18
      main/inc/lib/fckeditor/editor/js/fckeditorcode_ie.js
  69. 4
      main/inc/lib/fckeditor/editor/lang/_translationstatus.txt
  70. 2
      main/inc/lib/fckeditor/editor/lang/ko.js
  71. 4
      main/inc/lib/fckeditor/editor/lang/pl.js
  72. 4
      main/inc/lib/fckeditor/editor/plugins/ImageManager/editor.php
  73. 4
      main/inc/lib/fckeditor/editor/plugins/ImageManager/manager.php
  74. 5
      main/inc/lib/fckeditor/editor/plugins/audio/fck_audio.html
  75. 6
      main/inc/lib/fckeditor/editor/plugins/customizations/fckplugin.js
  76. 5
      main/inc/lib/fckeditor/editor/plugins/fckEmbedMovies/fck_embedmovies.html
  77. 6
      main/inc/lib/fckeditor/editor/plugins/flvPlayer/flvPlayer.html
  78. 8
      main/inc/lib/fckeditor/editor/plugins/flvPlayer/flvPlayer.js
  79. 5
      main/inc/lib/fckeditor/editor/plugins/googlemaps/dialog/googleMaps.html
  80. 6
      main/inc/lib/fckeditor/editor/plugins/imgmap/popup.html
  81. 4
      main/inc/lib/fckeditor/editor/plugins/mimetex/mimetex.html
  82. 5
      main/inc/lib/fckeditor/editor/plugins/placeholder/fck_placeholder.html
  83. 7
      main/inc/lib/fckeditor/editor/plugins/prompt/fck_prompt.html
  84. 2
      main/inc/lib/fckeditor/editor/plugins/prompt/fckplugin.js
  85. 5
      main/inc/lib/fckeditor/editor/plugins/wikilink/fck_wikilink.html
  86. 5
      main/inc/lib/fckeditor/editor/plugins/youtube/youtube.html
  87. 8
      main/inc/lib/fckeditor/myconfig.js
  88. 38
      main/inc/lib/legal.lib.php
  89. 7
      main/inc/lib/main_api.lib.php
  90. 4
      main/inc/lib/pclzip/pclzip.lib.php
  91. 15
      main/inc/lib/sessionmanager.lib.php
  92. 150
      main/inc/lib/tracking.lib.php
  93. 24
      main/inc/local.inc.php
  94. 26
      main/install/compare_db.php
  95. 25
      main/install/configuration.dist.php
  96. 6
      main/install/dokeos_main_corp.sql
  97. 24
      main/install/install_db.inc.php
  98. 25
      main/install/install_files.inc.php
  99. 25
      main/install/install_upgrade.lib.php
  100. 2
      main/install/migrate-db-1.8.6-1.8.6.1-pre.sql
  101. Some files were not shown because too many files have changed in this diff Show More

@ -33,16 +33,26 @@
<li>An internationalization option has been added for improving sorting in arbitrary language. When the <a href="http://php.net/manual/en/book.intl.php" target="_blank">intl</a> php-extension has been installed, various sorting routines exploit it for better sorting. Rationale: The PHP5 run-time environment does not provide native and reliable way of sorting UTF-8 strings. (FS#306)</li>
<li>The installation sript: The page about system requilements has been updated. Also, at the very beginning, a check has been added whether the <a href="http://php.net/manual/en/book.mbstring.php" target="_blank">mbstring</a> php-extension is installed - see <a href="http://dokeos.com/forum/viewtopic.php?t=29548" target="_blank">the related forum topic</a>. (FS#306)</li>
<li>A new php-based configuration for the online editor has been implemented, see <i>dokeos/main/inc/lib/fckeditor/myconfig.php</i>. Also, toolbar definitions have been split in separate php-files within the directory <i>dokeos/main/inc/lib/fckeditor/toolbars/</i> . Customization of the editor is more convenient and flexible now. (FS#2867)</li>
<li>The online editor: A upgrade from FCKEditor 2.6.4 to <b>FCKEditor 2.6.4.1</b> has been implemented. (FS#4383)</li>
<li>The online editor: Several known bug-fixes from FCKEditor 2.6.5 SVN have been implemented, tickets <a href="http://dev.fckeditor.net/ticket/2821" target="_blank">#2821</a>, <a href="http://dev.fckeditor.net/ticket/2856" target="_blank">#2856</a>, <a href="http://dev.fckeditor.net/ticket/2915" target="_blank">#2915</a>, <a href="http://dev.fckeditor.net/ticket/3120" target="_blank">#3120</a>, <a href="http://dev.fckeditor.net/ticket/3181" target="_blank">#3181</a>, <a href="http://dev.fckeditor.net/ticket/3429" target="_blank">#3429</a>, <a href="http://dev.fckeditor.net/ticket/3439" target="_blank">#3439</a>, <a href="http://dev.fckeditor.net/ticket/3880" target="_blank">#3880</a>. (FS#2867)</li>
<li>The online editor: The simple file manager, the advanced file manager and the image manager have been integrated by default with the editor's dialog system. Thus, they work faster and in a more secure way. (FS#2867)</li>
<li>The online editor: Blocking copy/paste for trainees has been added. The feature is configurable through editing the toolbar definition files within the directory <i>dokeos/main/inc/lib/fckeditor/toolbars/</i> . (FS#2867)</li>
<li>The online editor: Preview tabs have been added to the dialogs for inserting video, flv-video, and YouTube video. (FS#2867)</li>
<li>The online editor: The <b>audio</b> plugin has been activated by default as an implementation of the "Insert audio / Audio properties" dialog. This new plugin is intended to replace the "MP3" plugin. (FS#2867)</li>
<li>The online editor: Configuration of the <b>mimetex</b> plugin has been reworked to gain simplicity. The procedure for configuration has been updated, see <a href="http://www.dokeos.com/forum/viewtopic.php?t=29594" target="_blank">the related forum topic</a>. (FS#2867)</li>
<li>The online editor: The toolbar icons have been upgraded to those from CKEditor 3.0. (FS#2867)</li>
<li>Online editor: A upgrade from FCKEditor 2.6.4 to <b>FCKEditor 2.6.4.1</b> has been implemented. (FS#4383)</li>
<li>Online editor: Several known bug-fixes from FCKEditor 2.6.5 SVN have been implemented, tickets <a href="http://dev.fckeditor.net/ticket/1537" target="_blank">#1537</a>, <a href="http://dev.fckeditor.net/ticket/2156" target="_blank">#2156</a>, <a href="http://dev.fckeditor.net/ticket/2689" target="_blank">#2689</a>, <a href="http://dev.fckeditor.net/ticket/2821" target="_blank">#2821</a>, <a href="http://dev.fckeditor.net/ticket/2856" target="_blank">#2856</a>, <a href="http://dev.fckeditor.net/ticket/2874" target="_blank">#2874</a>, <a href="http://dev.fckeditor.net/ticket/2915" target="_blank">#2915</a>, <a href="http://dev.fckeditor.net/ticket/3120" target="_blank">#3120</a>, <a href="http://dev.fckeditor.net/ticket/3181" target="_blank">#3181</a>, <a href="http://dev.fckeditor.net/ticket/3427" target="_blank">#3427</a>, <a href="http://dev.fckeditor.net/ticket/3429" target="_blank">#3429</a>, <a href="http://dev.fckeditor.net/ticket/3439" target="_blank">#3439</a>, <a href="http://dev.fckeditor.net/ticket/3446" target="_blank">#3446</a>, <a href="http://dev.fckeditor.net/ticket/3481" target="_blank">#3481</a>, <a href="http://dev.fckeditor.net/ticket/3677" target="_blank">#3677</a>, <a href="http://dev.fckeditor.net/ticket/3818" target="_blank">#3818</a>, <a href="http://dev.fckeditor.net/ticket/3880" target="_blank">#3880</a>, <a href="http://dev.fckeditor.net/ticket/3925" target="_blank">#3925</a>. (FS#2867)</li>
<li>Online editor: The simple file manager, the advanced file manager and the image manager have been integrated by default with the editor's dialog system. Thus, they work faster and in a more secure way. (FS#2867)</li>
<li>Online editor: Blocking copy/paste for trainees has been added. The feature is configurable through editing the toolbar definition files within the directory <i>dokeos/main/inc/lib/fckeditor/toolbars/</i> . (FS#2867)</li>
<li>Online editor: Preview tabs have been added to the dialogs for inserting video, flv-video, and YouTube video. (FS#2867)</li>
<li>Online editor: The <b>audio</b> plugin has been activated by default as an implementation of the "Insert audio / Audio properties" dialog. This new plugin is intended to replace the "MP3" plugin. (FS#2867)</li>
<li>Online editor: Configuration of the <b>mimetex</b> plugin has been reworked to gain simplicity. The procedure for configuration has been updated, see <a href="http://www.dokeos.com/forum/viewtopic.php?t=29594" target="_blank">the related forum topic</a>. (FS#2867)</li>
<li>Online editor: The toolbar icons have been upgraded to those from CKEditor 3.0. (FS#2867)</li>
<li>A solution has been implemented for fixing the <a href="http://bugs.adobe.com/jira/browse/FP-529" target="_blank">"__flash__removeCallback" bug</a>, which affects the media player on Internet Explorer browser. (FS#4378 and FS#2867)</li>
<li>Implement new sub-language feature by which language terms redefinition becomes possible through the admin section (FS#4321)</li>
<li>Social: Added possibility to define RSS feeds inside personal page of social network (need to define an 'rssfeeds' extra user text field)</li>
<li>Admin: Added courses from sessions inside AJAX popup of courses list in users list (SVN#22398)</li>
<li>Admin: Showing full-length course titles in list of courses while adding to sessions(SVN#22399)</li>
<li>Admin: Added session name in title of session edition pages(SVN#22400)</li>
</ul>
<br />
<h3>Known issues</h3>
<ul>
<li></li>
<li></li>
</ul>
<br />
<h3>Known issues</h3>

@ -1,26 +1,5 @@
<?php
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004-2009 Dokeos SPRL
Copyright (c) 2003 Ghent University (UGent)
Copyright (c) 2001 Universite catholique de Louvain (UCL)
Copyright (c) Olivier Brouckaert
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.
Contact: Dokeos, rue du Corbeau, 108, B-1030 Brussels, Belgium, info@dokeos.com
==============================================================================
*/
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
* @package dokeos.admin
@ -35,11 +14,11 @@ $language_file='admin';
$cidReset=true;
// including some necessary dokeos files
require('../inc/global.inc.php');
require '../inc/global.inc.php';
// including additonal libraries
require_once ('../inc/lib/xajax/xajax.inc.php');
require_once (api_get_path(LIBRARY_PATH).'sessionmanager.lib.php');
require_once '../inc/lib/xajax/xajax.inc.php';
require_once api_get_path(LIBRARY_PATH).'sessionmanager.lib.php';
$xajax = new xajax();
//$xajax->debugOn();
$xajax -> registerFunction ('search_courses');
@ -164,7 +143,7 @@ function search_courses($needle,$type)
while($course = Database :: fetch_array($rs)) {
$course_list[] = $course['code'];
$course_title=str_replace("'","\'",$course_title);
$return .= '<option value="'.$course['code'].'">'.$course['title'].' ('.$course['visual_code'].')</option>';
$return .= '<option value="'.$course['code'].'" title="'.htmlspecialchars($course['title'].' ('.$course['visual_code'].')',ENT_QUOTES).'">'.$course['title'].' ('.$course['visual_code'].')</option>';
}
$return .= '</select>';
@ -301,8 +280,9 @@ echo '<div class="actions">';
echo $link_add_type_unique.$link_add_type_multiple;
echo '</div>';
// the form header
echo '<div class="row"><div class="form_header">'.$tool_name.'</div></div>';
// the form header
$session_info = SessionManager::fetch($id_session);
echo '<div class="row"><div class="form_header">'.$tool_name.' ('.$session_info['name'].')</div></div>';
/*$sql = 'SELECT COUNT(1) FROM '.$tbl_course;
@ -436,7 +416,7 @@ else
foreach($nosessionCourses as $enreg)
{
?>
<option value="<?php echo $enreg['code']; ?>" <?php if(in_array($enreg['code'],$CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?></option>
<option value="<?php echo $enreg['code']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?></option>
<?php
}
?> </select></div> <?php
@ -447,8 +427,7 @@ unset($nosessionCourses);
</select></td>
<td width="10%" valign="middle" align="center">
<?php
if($ajax_search)
{
if ($ajax_search) {
?>
<input type="button" onclick="remove_item(document.getElementById('destination'))" value="<<" />
<?php
@ -480,7 +459,7 @@ unset($nosessionCourses);
foreach($sessionCourses as $enreg)
{
?>
<option value="<?php echo $enreg['code']; ?>"><?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?></option>
<option value="<?php echo $enreg['code']; ?>" title="<?php echo htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES); ?>"><?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?></option>
<?php
}

@ -1,26 +1,5 @@
<?php
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004-2009 Dokeos SPRL
Copyright (c) 2003 Ghent University (UGent)
Copyright (c) 2001 Universite catholique de Louvain (UCL)
Copyright (c) Olivier Brouckaert
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.
Contact: Dokeos, rue du Corbeau, 108, B-1030 Brussels, Belgium, info@dokeos.com
==============================================================================
*/
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
* @package dokeos.admin
@ -275,8 +254,9 @@ if($_POST['form_sent']) {
}
}
$session_info = SessionManager::fetch($id_session);
Display::display_header($tool_name);
api_display_tool_title($tool_name);
api_display_tool_title($tool_name.' ('.$session_info['name'].')');
$nosessionUsersList = $sessionUsersList = array();
/*$sql = 'SELECT COUNT(1) FROM '.$tbl_user;

@ -5,7 +5,7 @@ require_once '../inc/lib/course.lib.php';
$user_id=intval($_POST['user_id']);
$list_course_all_info=array();
$list_course=array();
$list_course_all_info=CourseManager::get_courses_list_by_user_id($user_id);
$list_course_all_info=CourseManager::get_courses_list_by_user_id($user_id,true);
for ($i=0;$i<count($list_course_all_info);$i++) {
$list_course[]=$list_course_all_info[$i]['title'];
}
@ -25,4 +25,4 @@ if (count($list_course)==0) {
<td><?php echo api_convert_encoding($list_course[$k],'UTF-8',$charset);?></td>
</tr>
<?php }?>
</table>
</table>

@ -1,5 +1,5 @@
<?php
// $Id: inscription.php 22368 2009-07-24 23:25:57Z iflorespaz $
// $Id: inscription.php 22567 2009-08-02 23:10:29Z iflorespaz $
/*
==============================================================================
Dokeos - elearning and course management software
@ -317,12 +317,13 @@ if (get_setting('allow_terms_conditions')=='true') {
// Version and language //password
$form->addElement('hidden', 'legal_accept_type',$term_preview['version'].':'.$term_preview['language_id']);
$form->addElement('hidden', 'legal_info',$term_preview['legal_id'].':'.$term_preview['language_id']);
if (isset($_SESSION['info_current_user'][1]) && isset($_SESSION['info_current_user'][2])) {
$form->addElement('hidden', 'login',$_SESSION['info_current_user'][1]);
$form->addElement('hidden', 'password',$_SESSION['info_current_user'][2]);
$form->addElement('hidden', 'password',$_SESSION['info_current_user'][2]);
}
if($term_preview['type'] == 1) {
$form->addElement('checkbox', 'legal_accept', null, get_lang('IhaveReadAndAgree').'&nbsp;<a href="inscription.php?legal" target="_blank">'.get_lang('TermsAndConditions').'</a>');
$form->addElement('checkbox', 'legal_accept', null, get_lang('IHaveReadAndAgree').'&nbsp;<a href="inscription.php?legal" target="_blank">'.get_lang('TermsAndConditions').'</a>');
$form->addRule('extra_legal_accept', get_lang('ThisFieldIsRequired'), 'required');
} else {
if (!empty($term_preview['content'])) {

@ -1,4 +1,4 @@
<?php // $Id: slideshowoptions.php 21107 2009-05-30 16:27:09Z iflorespaz $
<?php // $Id: slideshowoptions.php 22565 2009-08-02 21:12:59Z yannoo $
/*
==============================================================================
Dokeos - elearning and course management software
@ -158,7 +158,7 @@ echo '</div>';
}
?>>
</div>
<div class="formw"><?php echo get_lang('_no_resizing');?><br><?php echo get_lang('_no_resizing_comment');?>
<div class="formw"><?php echo get_lang('_no_resizing');?><br /><?php echo get_lang('_no_resizing_comment');?>
</div>
</div>
@ -178,32 +178,28 @@ echo '</div>';
?>>
</div>
<div class="formw">
<?php echo get_lang('_resizing');?><br><?php echo get_lang('_resizing_comment');?><br>
<?php echo get_lang('_resizing');?><br /><?php echo get_lang('_resizing_comment');?><br />
<?php echo get_lang('_width');?>:
&nbsp;<input name="width" type="text" id="width"
<?php
if ($image_resizing=="resizing")
{
if ($image_resizing=="resizing") {
echo " value='".$width."'";
echo " class=\"enabled_input\"";
}
else
{echo " class=\"disabled_input\""; }
} else {
echo " class=\"disabled_input\"";
}
?> >
<br>
<br />
<?php echo get_lang('_height');?>:
&nbsp;&nbsp;&nbsp;&nbsp;<input name="height" type="text" id="height"
<?php
if ($image_resizing=="resizing")
{
if ($image_resizing=="resizing") {
echo " value='".$height."'";
echo " class=\"enabled_input\"";
}
else
{echo " class=\"disabled_input\""; }
?>
>
} else {
echo " class=\"disabled_input\"";
}
?> >
</div>
</div>
<div class="row">
@ -216,5 +212,4 @@ echo '</div>';
</div>
</form>
<?php
Display::display_footer();
?>
Display::display_footer();

@ -1,12 +1,10 @@
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
/**
* This file contains additional dropbox functions. Initially there were some
* functions in the init files also but I have moved them over
* to one file -- Patrick Cool <patrick.cool@UGent.be>, Ghent University
*/
/**
* This function is a wrapper function for the multiple actions feature.
* @return Mixed If there is a problem, return a string message, otherwise nothing
@ -137,13 +135,13 @@ function delete_category($action, $id)
// step 1: delete the category
$sql="DELETE FROM ".$dropbox_cnf['tbl_category']." WHERE cat_id='".Database::escape_string($id)."' AND $sentreceived='1'";
$result=api_sql_query($sql);
$result=Database::query($sql,__FILE__,__LINE__);
// step 2: delete all the documents in this category
$sql="SELECT * FROM ".$entries_table." WHERE cat_id='".Database::escape_string($id)."'";
$result=api_sql_query($sql);
$result=Database::query($sql,__FILE__,__LINE__);
while ($row=mysql_fetch_array($result))
while ($row=Database::fetch_array($result))
{
$dropboxfile=new Dropbox_Person( $_user['user_id'], $is_courseAdmin, $is_courseTutor);
if ($action=='deletereceivedcategory')
@ -170,8 +168,8 @@ function display_move_form($part, $id, $target=array())
{
echo '<div class="row"><div class="form_header">'.get_lang('MoveFileTo').'</div></div>';
echo '<form name="form1" method="post" action="'.api_get_self().'?view_received_category='.$_GET['view_received_category'].'&view_sent_category='.$_GET['view_sent_category'].'&view='.$_GET['view'].'">';
echo '<input type="hidden" name="id" value="'.$id.'">';
echo '<input type="hidden" name="part" value="'.$part.'">';
echo '<input type="hidden" name="id" value="'.Security::remove_XSS($id).'">';
echo '<input type="hidden" name="part" value="'.Security::remove_XSS($part).'">';
echo '
<div class="row">
<div class="label">
@ -227,7 +225,7 @@ function store_move($id, $target, $part)
WHERE dest_user_id='".Database::escape_string($_user['user_id'])."'
AND file_id='".Database::escape_string($id)."'
";
api_sql_query($sql,__FILE__,__LINE__);
Database::query($sql,__FILE__,__LINE__);
$return_message=get_lang('ReceivedFileMoved');
}
if ($part=='sent')
@ -236,7 +234,7 @@ function store_move($id, $target, $part)
WHERE uploader_id='".Database::escape_string($_user['user_id'])."'
AND id='".Database::escape_string($id)."'
";
api_sql_query($sql,__FILE__,__LINE__);
Database::query($sql,__FILE__,__LINE__);
$return_message=get_lang('SentFileMoved');
}
}
@ -278,7 +276,7 @@ function display_action_options($part, $categories, $current_category=0)
echo '</optgroup>';
}
echo '</select>';
echo '<input type="submit" name="do_actions_'.$part.'" value="'.get_lang('Ok').'" />';
echo '<input type="submit" name="do_actions_'.Security::remove_XSS($part).'" value="'.get_lang('Ok').'" />';
}
/**
@ -299,7 +297,7 @@ function display_file_checkbox($id, $part)
{
$checked='checked';
}
$return_value='<input type="checkbox" name="'.$part.'_'.$id.'" value="'.$id.'" '.$checked.' />';
$return_value='<input type="checkbox" name="'.Security::remove_XSS($part).'_'.Security::remove_XSS($id).'" value="'.Security::remove_XSS($id).'" '.$checked.' />';
return $return_value;
}
@ -325,8 +323,8 @@ function get_dropbox_categories($filter='')
$sql="SELECT * FROM ".$dropbox_cnf['tbl_category']." WHERE user_id='".$_user['user_id']."'";
$result=api_sql_query($sql);
while ($row=mysql_fetch_array($result))
$result=Database::query($sql,__FILE__,__LINE__);
while ($row=Database::fetch_array($result))
{
if(($filter=='sent' AND $row['sent']==1) OR ($filter=='received' AND $row['received']==1) OR $filter=='')
{
@ -382,7 +380,7 @@ function store_addcategory()
{
// step 3a, we check if the category doesn't already exist
$sql="SELECT * FROM ".$dropbox_cnf['tbl_category']." WHERE user_id='".$_user['user_id']."' AND cat_name='".Database::escape_string(Security::remove_XSS($_POST['category_name']))."' AND received='".$received."' AND sent='".$sent."'";
$result=api_sql_query($sql);
$result=Database::query($sql,__FILE__,__LINE__);
// step 3b, we add the category if it does not exist yet.
@ -390,7 +388,7 @@ function store_addcategory()
{
$sql="INSERT INTO ".$dropbox_cnf['tbl_category']." (cat_name, received, sent, user_id)
VALUES ('".Database::escape_string(Security::remove_XSS($_POST['category_name']))."', '".Database::escape_string($received)."', '".Database::escape_string($sent)."', '".Database::escape_string($_user['user_id'])."')";
api_sql_query($sql);
Database::query($sql,__FILE__,__LINE__);
return array('type' => 'confirmation', 'message'=>get_lang('CategoryStored'));
}
else
@ -403,7 +401,7 @@ function store_addcategory()
$sql="UPDATE ".$dropbox_cnf['tbl_category']." SET cat_name='".Database::escape_string(Security::remove_XSS($_POST['category_name']))."', received='".Database::escape_string($received)."' , sent='".Database::escape_string($sent)."'
WHERE user_id='".Database::escape_string($_user['user_id'])."'
AND cat_id='".Database::escape_string(Security::remove_XSS($_POST['edit_id']))."'";
api_sql_query($sql);
Database::query($sql,__FILE__,__LINE__);
return array('type' => 'confirmation', 'message'=>get_lang('CategoryModified'));
}
}
@ -427,7 +425,7 @@ function display_addcategory_form($category_name='', $id='',$action)
{
// retrieve the category we are editing
$sql="SELECT * FROM ".$dropbox_cnf['tbl_category']." WHERE cat_id='".Database::escape_string($id)."'";
$result=api_sql_query($sql);
$result=Database::query($sql,__FILE__,__LINE__);
$row=Database::fetch_array($result);
if ($category_name=='') // after an edit with an error we do not want to return to the original name but the name we already modified. (happens when createinrecievedfiles AND createinsentfiles are not checked)
@ -485,7 +483,7 @@ function display_addcategory_form($category_name='', $id='',$action)
{
echo '<span class="form_error">'.get_lang('CategoryAlreadyExistsEditIt').'<span><br />';
}
echo ' <input type="text" name="category_name" value="'.$category_name.'" />
echo ' <input type="text" name="category_name" value="'.Security::remove_XSS($category_name).'" />
</div>
</div>';
@ -503,7 +501,7 @@ function display_addcategory_form($category_name='', $id='',$action)
<span class="form_required">*</span> <small>'.get_lang('ThisFieldIsRequired').'</small>
</div>
</div>';
echo "</form>";
echo '</form>';
echo '<div style="clear: both;"></div>';
}
@ -520,7 +518,7 @@ function display_add_form()
$token = Security::get_token();
$dropbox_person = new Dropbox_Person( $_user['user_id'], $is_courseAdmin, $is_courseTutor);
?>
<form method="post" action="index.php?view_received_category=<?php echo $_GET['view_received_category']; ?>&view_sent_category=<?php echo $_GET['view_sent_category']; ?>&view=<?php echo $_GET['view']; ?>&<?php echo "origin=$origin"."&".api_get_cidreq(); ?>" enctype="multipart/form-data" onsubmit="return checkForm(this)">
<form method="post" action="index.php?view_received_category=<?php echo Security::remove_XSS($_GET['view_received_category']); ?>&view_sent_category=<?php echo Security::remove_XSS($_GET['view_sent_category']); ?>&view=<?php echo Security::remove_XSS($_GET['view']); ?>&<?php echo "origin=$origin"."&".api_get_cidreq(); ?>" enctype="multipart/form-data" onsubmit="return checkForm(this)">
<div class="row"><div class="form_header"><?php echo get_lang('UploadNewFile'); ?></div></div>
@ -536,7 +534,7 @@ function display_add_form()
<?php
if ($origin=='learnpath')
{
echo "<input type='hidden' name='origin' value='learnpath' />";
echo '<input type="hidden" name="origin" value="learnpath" />';
}
?>
</div>
@ -686,12 +684,12 @@ function getUserNameFromId ( $id) // RH: Mailing: return 'Mailing ' + id
{
return dropbox_lang("mailingAsUsername", "noDLTT") . $mailingId;
}
$id = intval($id);
$sql = "SELECT CONCAT(lastname,' ', firstname) AS name
FROM " . dropbox_cnf("tbl_user") . "
WHERE user_id='" . addslashes( $id) . "'";
$result = api_sql_query($sql,__FILE__,__LINE__);
$res = mysql_fetch_array( $result);
WHERE user_id='$id'";
$result = Database::query($sql,__FILE__,__LINE__);
$res = Database::fetch_array( $result);
if ( $res == FALSE) return FALSE;
return stripslashes( $res["name"]);
@ -703,11 +701,12 @@ function getUserNameFromId ( $id) // RH: Mailing: return 'Mailing ' + id
*/
function getLoginFromId ( $id)
{
$id = intval($id);
$sql = "SELECT username
FROM " . dropbox_cnf("tbl_user") . "
WHERE user_id='" . addslashes( $id) . "'";
$result =api_sql_query($sql,__FILE__,__LINE__);
$res = mysql_fetch_array( $result);
WHERE user_id='$id'";
$result =Database::query($sql,__FILE__,__LINE__);
$res = Database::fetch_array( $result);
if ( $res == FALSE) return FALSE;
return stripslashes( $res["username"]);
}
@ -736,14 +735,14 @@ function removeUnusedFiles( )
FROM " . dropbox_cnf("tbl_file") . " f
LEFT JOIN " . dropbox_cnf("tbl_person") . " p ON f.id = p.file_id
WHERE p.user_id IS NULL";
$result = api_sql_query($sql,__FILE__,__LINE__);
while ( $res = mysql_fetch_array( $result))
$result = Database::query($sql,__FILE__,__LINE__);
while ( $res = Database::fetch_array( $result))
{
//delete the selected files from the post and file tables
$sql = "DELETE FROM " . dropbox_cnf("tbl_post") . " WHERE file_id='" . $res['id'] . "'";
$result1 = api_sql_query($sql,__FILE__,__LINE__);
$result1 = Database::query($sql,__FILE__,__LINE__);
$sql = "DELETE FROM " . dropbox_cnf("tbl_file") . " WHERE id='" . $res['id'] . "'";
$result1 = api_sql_query($sql,__FILE__,__LINE__);
$result1 = Database::query($sql,__FILE__,__LINE__);
//delete file from server
@unlink( dropbox_cnf("sysPath") . "/" . $res["filename"]);
@ -759,19 +758,20 @@ function removeUnusedFiles( )
* Mailing content files have uploader_id == mailing pseudo_id, a normal recipient,
* and are visible initially to recipient and pseudo_id.
*
* @author Ren<EFBFBD> Haentjens, Ghent University
* @author René Haentjens, Ghent University
*
* @todo check if this function is still necessary.
*/
function getUserOwningThisMailing($mailingPseudoId, $owner = 0, $or_die = '')
{
$mailingPseudoId = intval($mailingPseudoId);
$sql = "SELECT f.uploader_id
FROM " . dropbox_cnf("tbl_file") . " f
LEFT JOIN " . dropbox_cnf("tbl_post") . " p ON f.id = p.file_id
WHERE p.dest_user_id = '" . $mailingPseudoId . "'";
$result = api_sql_query($sql,__FILE__,__LINE__);
$result = Database::query($sql,__FILE__,__LINE__);
if (!($res = mysql_fetch_array($result)))
if (!($res = Database::fetch_array($result)))
die(dropbox_lang("generalError")." (code 901)");
if ($owner == 0) return $res['uploader_id'];
@ -791,23 +791,23 @@ function removeMoreIfMailing($file_id)
// for all content files, delete mailingPseudoId from person-table
// 2. finding the owner (getUserOwningThisMailing) is no longer possible, so
// for all content files, replace mailingPseudoId by owner as uploader
$file_id = intval($file_id);
$sql = "SELECT p.dest_user_id
FROM " . dropbox_cnf("tbl_post") . " p
WHERE p.file_id = '" . $file_id . "'";
$result = api_sql_query($sql,__FILE__,__LINE__);
$result = Database::query($sql,__FILE__,__LINE__);
if ( $res = mysql_fetch_array( $result))
if ( $res = Database::fetch_array( $result))
{
$mailingPseudoId = $res['dest_user_id'];
if ( $mailingPseudoId > dropbox_cnf("mailingIdBase"))
{
$sql = "DELETE FROM " . dropbox_cnf("tbl_person") . " WHERE user_id='" . $mailingPseudoId . "'";
$result1 = api_sql_query($sql,__FILE__,__LINE__);
$result1 = Database::query($sql,__FILE__,__LINE__);
$sql = "UPDATE " . dropbox_cnf("tbl_file") .
" SET uploader_id='" . api_get_user_id() . "' WHERE uploader_id='" . $mailingPseudoId . "'";
$result1 = api_sql_query($sql,__FILE__,__LINE__);
$result1 = Database::query($sql,__FILE__,__LINE__);
}
}
}
@ -817,7 +817,7 @@ function removeMoreIfMailing($file_id)
*
* @todo check if this function is still necessary.
*
* @author Ren<EFBFBD> Haentjens, Ghent University
* @author René Haentjens, Ghent University
*/
function dropbox_lang($variable, $notrans = 'DLTT')
{
@ -1055,13 +1055,14 @@ function display_user_link($user_id, $name='')
{
$table_user = Database::get_main_table(TABLE_MAIN_USER);
$sql="SELECT * FROM $table_user WHERE user_id='".Database::escape_string($user_id)."'";
$result=api_sql_query($sql,__FILE__,__LINE__);
$row=mysql_fetch_array($result);
$result=Database::query($sql,__FILE__,__LINE__);
$row=Database::fetch_array($result);
return "<a href=\"../user/userInfo.php?uInfo=".$row['user_id']."\">".$row['firstname']." ".$row['lastname']."</a>";
}
else
{
return "<a href=\"../user/userInfo.php?uInfo=".$user_id."\">".$name."</a>";
$user_id = intval($user_id);
return "<a href=\"../user/userInfo.php?uInfo=".$user_id."\">".Security::remove_XSS($name)."</a>";
}
}
else
@ -1101,8 +1102,8 @@ function feedback($array)
function format_feedback($feedback)
{
$output.=display_user_link($feedback['author_user_id']);
$output.='&nbsp;&nbsp;['.$feedback['feedback_date'].']<br>';
$output.='<div style="padding-top:6px">'.nl2br($feedback['feedback']).'</div><hr size="1" noshade/><br>';
$output.='&nbsp;&nbsp;['.$feedback['feedback_date'].']<br />';
$output.='<div style="padding-top:6px">'.nl2br($feedback['feedback']).'</div><hr size="1" noshade/><br />';
return $output;
}
@ -1122,8 +1123,8 @@ function feedback_form()
// we now check if the other users have not delete this document yet. If this is the case then it is useless to see the
// add feedback since the other users will never get to see the feedback.
$sql="SELECT * FROM ".$dropbox_cnf["tbl_person"]." WHERE file_id='".Database::escape_string($_GET['id'])."'";
$result=api_sql_query($sql,__LINE__, __FILE__);
$number_users_who_see_file=mysql_num_rows($result);
$result=Database::query($sql,__LINE__, __FILE__);
$number_users_who_see_file=Database::num_rows($result);
if ($number_users_who_see_file>1)
{
$return .= '<textarea name="feedback" style="width: 80%; height: 80px;"></textarea><br /><button type="submit" class="add" name="store_feedback" value="'.get_lang('Ok').'"
@ -1160,7 +1161,7 @@ function store_feedback()
{
$sql="INSERT INTO ".$dropbox_cnf['tbl_feedback']." (file_id, author_user_id, feedback, feedback_date) VALUES
('".Database::escape_string($_GET['id'])."','".Database::escape_string($_user['user_id'])."','".Database::escape_string($_POST['feedback'])."',NOW())";
api_sql_query($sql);
Database::query($sql,__FILE__,__LINE__);
return get_lang('DropboxFeedbackStored');
}
}
@ -1206,8 +1207,8 @@ function zip_download ($array)
WHERE file.id IN (".implode(', ',$array).")
AND file.id=person.file_id
AND person.user_id='".$_user['user_id']."'";
$result=api_sql_query($sql,__FILE__,__LINE__);
while ($row=mysql_fetch_array($result))
$result=Database::query($sql,__FILE__,__LINE__);
while ($row=Database::fetch_array($result))
{
$files[$row['filename']]=array('filename'=>$row['filename'],'title'=>$row['title'], 'author'=>$row['author'], 'description'=>$row['description']);
}
@ -1454,8 +1455,8 @@ function get_total_number_feedback($file_id='')
global $dropbox_cnf;
$sql="SELECT COUNT(feedback_id) AS total, file_id FROM ".$dropbox_cnf['tbl_feedback']." GROUP BY file_id";
$result=api_sql_query($sql, __FILE__, __LINE__);
while ($row=mysql_fetch_array($result))
$result=Database::query($sql, __FILE__, __LINE__);
while ($row=Database::fetch_array($result))
{
$return[$row['file_id']]=$row['total'];
}
@ -1526,8 +1527,7 @@ function get_last_tool_access($tool, $course_code='', $user_id='')
AND access_tool='".Database::escape_string($tool)."'
ORDER BY access_date DESC
LIMIT 1";
$result=api_sql_query($sql,__FILE__,__LINE__);
$row=mysql_fetch_array($result);
$result=Database::query($sql,__FILE__,__LINE__);
$row=Database::fetch_array($result);
return $row['access_date'];
}
?>
}

@ -134,18 +134,12 @@ $lstrComment = GetComment($hotpotatoesName);
if($lstrComment=="")
$lstrComment = GetQuizName($hotpotatoesName,$documentPath);
if($lstrComment=="")
$lstrComment = GetFileName($hotpotatoesName,$documentPath);
$lstrComment = basename($hotpotatoesName,$documentPath);
echo $lstrComment;
echo "\" size=40>&nbsp;";
echo "<button type=\"submit\" class=\"save\" name=\"submit\" value=\"".get_lang('Ok')."\">".get_lang('Ok')."</button>";
echo "<button type=\"button\" class=\"cancel\" name=\"cancel\" value=\"".get_lang('Cancel')."\" onclick=\"javascript:document.form1.newName.value='';\">".get_lang('Cancel')."</button>";
echo "</form>";
?>
<?php
Display::display_footer();
?>
Display::display_footer();

@ -1066,7 +1066,7 @@ if ($show == 'test') {
$title = GetQuizName($path, $documentPath);
if ($title == '') {
$title = GetFileName($path);
$title = basename($path);
}
// prof only
if ($is_allowedToEdit) {
@ -1345,7 +1345,7 @@ if ($_configuration['tracking_enabled'] && ($show == 'result')) {
for ($i = 0; $i < sizeof($hpresults); $i++) {
$title = GetQuizName($hpresults[$i][1], $documentPath);
if ($title == '') {
$title = GetFileName($hpresults[$i][1]);
$title = basename($hpresults[$i][1]);
}
echo '<tr>';
if ($is_allowedToEdit) {

@ -196,7 +196,7 @@ class ExerciseResult
$title = GetQuizName($hpresults[$i][1],$document_path);
if ($title =='')
{
$title = GetFileName($hpresults[$i][1]);
$title = basename($hpresults[$i][1]);
}
if(empty($user_id))
{

@ -54,7 +54,7 @@ function GetQuizName($fname,$fpath) {
if (file_exists($fpath.$fname)) {
if (!($fp = fopen($fpath.$fname, "r"))) {
//die("could not open Quiz input");
return GetFileName($fname);
return basename($fname);
}
$contents = fread($fp, filesize($fpath.$fname));
@ -113,19 +113,6 @@ function SetComment($path,$comment) {
return "$result";
}
/**
* Get the name of the file from a path (without the extension)
*
* This assumes the path is made of elements split by '/', not '\' or '\\'
* @param string Path
* @return string File name
*/
function GetFileName($fname) {
$name = explode('/',$fname);
$name = $name[sizeof($name)-1];
return $name;
}
/**
* Reads the file contents into a string
* @param string Urlencoded path
@ -171,7 +158,6 @@ function WriteFileCont($full_file_path,$content) {
* Gets the name of an img whose path is given (without directories or extensions)
* @param string An image tag (<img src="...." ...>)
* @return string The image file name or an empty string
* @uses GetFileName No comment
*/
function GetImgName($imgtag) {
// select src tag from img tag
@ -186,7 +172,7 @@ function GetImgName($imgtag) {
if ($src=="") {
return "";
} else {
$tmp_src = GetFileName($src) ;
$tmp_src = basename($src) ;
if ($tmp_src == "") {
return $src;
} else {
@ -310,7 +296,7 @@ function ReplaceImgTag($content) {
else {
$prehref = $imgname;
$posthref = GetFileName($imgname);
$posthref = basename($imgname);
$newcontent = str_replace($prehref,$posthref,$newcontent);
}
}

@ -84,7 +84,7 @@ WriteFileCont($full_file_path.$_user['user_id'].".t.html",$newcontent);
$newcontent = str_replace($prehref,$posthref,$newcontent);
*/
$doc_url = GetFolderPath($doc_url).urlencode(GetFileName($doc_url));
$doc_url = GetFolderPath($doc_url).urlencode(basename($doc_url));
// echo $documentWebPath.$doc_url.$_user['user_id'].".t.html";
// exit;
?>

@ -18,7 +18,7 @@ $my_file=str_replace(array('../','\\..','\\0','..\\'),array('','','',''),urldeco
$title = GetQuizName($my_file,$documentPath);
if ($title =='') {
$title = GetFileName($my_file);
$title = basename($my_file);
}
$nameTools = $title;
$noPHP_SELF=true;

@ -3898,23 +3898,28 @@ function get_thread_user_post($course_db, $thread_id, $user_id )
$j=0;
$forums = get_forums();
krsort($forums);
$forum_results = '';
$forum_results = '';
foreach($forums as $forum) {
if ($j<=4) {
$threads = get_threads($forum['forum_id']);
$threads = get_threads($forum['forum_id']);
if (is_array($threads)) {
/*echo Display::return_icon('forum.gif');
echo $forum['forum_title'];*/
$my_course_db=explode('_',$course_db);
$my_course_code=$my_course_db[1];
//$my_course_db=explode('_',$course_db);
//$my_course_code=$my_course_db[1];
$my_course_code=CourseManager::get_course_id_by_database_name($course_db);
$i=0;
$hand_forums = '';
$post_counter = 0;
foreach($threads as $thread) {
if ($i<=4) {
$post_list = get_thread_user_post_limit($course_db, $thread['thread_id'], $user_id, 1);
$post_counter = count($post_list);
if (is_array($post_list) && count($post_list)>0) {
$hand_forums.= '<div id="social-thread">';
$hand_forums.= Display::return_icon('forumthread.gif');
$hand_forums.= $thread['thread_title'].' ';
@ -3930,17 +3935,18 @@ function get_thread_user_post($course_db, $thread_id, $user_id )
$hand_forums.= '</div>';
}
$i++;
}
if ($post_counter > 0 ) {
$forum_results .='<div id="social-forum">';
$forum_results .='<div class="clear"></div><br />';
$forum_results .='<div class="actions" style="margin-left:5px;margin-right:5px;">'.Display::return_icon('forum.gif').'&nbsp;&nbsp;&nbsp;&nbsp;'.$forum['forum_title'].'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<div style="float:right;margin-top:-18px"><a href="../forum/viewforum.php?cidReq='.$my_course_code.'&gidReq=&forum='.$forum['forum_id'].' " >'.get_lang('SeeForum').'</a></div></div>';
$forum_results .='<br / >';
$forum_results .=$hand_forums;
$forum_results .='</div>';
}
}
} $j++;
if ($post_counter > 0 ) {
$forum_results .='<div id="social-forum">';
$forum_results .='<div class="clear"></div><br />';
$forum_results .='<div class="actions" style="margin-left:5px;margin-right:5px;">'.Display::return_icon('forum.gif').'&nbsp;&nbsp;&nbsp;&nbsp;'.$forum['forum_title'].'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<div style="float:right;margin-top:-18px"><a href="../forum/viewforum.php?cidReq='.$my_course_code.'&gidReq=&forum='.$forum['forum_id'].' " >'.get_lang('SeeForum').'</a></div></div>';
$forum_results .='<br / >';
$forum_results .=$hand_forums;
$forum_results .='</div>';
}
}
} $j++;
}
}
return $forum_results;
}
@ -3957,7 +3963,7 @@ function get_thread_user_post_limit($course_db, $thread_id, $user_id, $limit=10)
AND posts.poster_id='".Database::escape_string($user_id)."'
ORDER BY posts.post_id DESC LIMIT $limit ";
$result=api_sql_query($sql, __FILE__, __LINE__);
while ($row=Database::fetch_array($result)) {
$row['status'] = '1';
$post_list[]=$row;

@ -177,7 +177,7 @@ class GradeBookResult
$return[$j+$i] = array();
$title = GetQuizName($hpresults[$i][1],$document_path);
if ($title =='') {
$title = GetFileName($hpresults[$i][1]);
$title = basename($hpresults[$i][1]);
}
if (empty($user_id)) {
$return[$j+$i]['user'] = $hpresults[$i][0];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -901,6 +901,7 @@ function update_Db_course($courseDbName)
//
$sql = "CREATE TABLE `".$TABLEWIKICONF . "` (
page_id int NOT NULL default 0,
task text NOT NULL,
feedback1 text NOT NULL,
feedback2 text NOT NULL,
feedback3 text NOT NULL,

@ -3026,11 +3026,12 @@ function get_blog_post_from_user($course_db_name, $user_id) {
ORDER BY post.date_creation DESC ";
$result = api_sql_query($sql, __FILE__, __LINE__);
$return_data = '';
$my_course_info=explode('_',$course_db_name);
//$my_course_info=explode('_',$course_db_name);
$my_course_id=CourseManager::get_course_id_by_database_name($course_db_name);
if (Database::num_rows($result)!=0) {
while ($row=Database::fetch_array($result)) {
$return_data.= '<div class="clear"></div><br />';
$return_data.= '<div class="actions" style="margin-left:5px;margin-right:5px;">'.$row['title'].'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<div style="float:right;margin-top:-18px"><a href="../blog/blog.php?blog_id='.$row['blog_id'].'&gidReq=&cidReq='.$my_course_info[1].' " >'.get_lang('SeeBlog').'</a></div></div>';
$return_data.= '<div class="actions" style="margin-left:5px;margin-right:5px;"><img src="../img/blog.gif" />'.$row['title'].'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<div style="float:right;margin-top:-18px"><a href="../blog/blog.php?blog_id='.$row['blog_id'].'&gidReq=&cidReq='.$my_course_id.' " >'.get_lang('SeeBlog').'</a></div></div>';
$return_data.= '<br / >';
//$return_data.= '<strong>'.$row['title'].'</strong>'; echo '<br>';
$return_data.= $row['full_text'];

@ -1895,18 +1895,32 @@ class CourseManager {
/**
* Get list of courses for a given user
* @param int user ID
* @param boolean Whether to include courses from session or not
* @return array List of codes and db names
* @author isaac flores paz
*/
public static function get_courses_list_by_user_id ($user_id) {
public static function get_courses_list_by_user_id ($user_id, $include_sessions=false) {
$course_list=array();
$codes = array();
$user_id = intval($user_id);
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$tbl_course_rel_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$sql='SELECT c.code,c.db_name,c.title FROM '.$tbl_course.' c inner join '.$tbl_course_rel_user.' cru on c.code=cru.course_code WHERE cru.user_id='.Database::escape_string($user_id);
$sql='SELECT c.code,c.db_name,c.title FROM '.$tbl_course.' c inner join '.$tbl_course_rel_user.' cru on c.code=cru.course_code WHERE cru.user_id='.$user_id;
$result=api_sql_query($sql,__FILE__,__LINE__);
while ($row=Database::fetch_array($result,'ASSOC')) {
$course_list[]=$row;
}
$course_list[]=$row;
$codes[] = $row['code'];
}
if ($include_sessions === true) {
$tbl_csu = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
$s = "SELECT distinct(c.code),c.db_name,c.title FROM $tbl_csu s, $tbl_course c WHERE id_user = $user_id AND s.course_code=c.code";
$r = Database::query($s,__FILE__,__LINE__);
while ($row=Database::fetch_array($r,'ASSOC')) {
if (!in_array($row['code'],$codes)) {
$course_list[]=$row;
}
}
}
return $course_list;
}
/**
@ -2115,5 +2129,16 @@ class CourseManager {
} else {
return false; //field not found
}
}
/**
* Get the course id of an course by the database name
* @param string The database name
* @return string The course id
*/
public static function get_course_id_by_database_name ($db_name) {
$t_course = Database::get_main_table(TABLE_MAIN_COURSE);
$sql='SELECT code FROM '.$t_course.' WHERE db_name="'.Database::escape_string($db_name).'"';
$rs=Database::query($sql,__FILE__,__LINE__);
return Database::result($rs,0,'code');
}
} //end class CourseManager

@ -40,7 +40,7 @@ var FCKDialogCommand = function( name, title, url, width, height, getStateFuncti
FCKDialogCommand.prototype.Execute = function()
{
FCKDialog.OpenDialog( 'FCKDialog_' + this.Name , this.Title, this.Url, this.Width, this.Height, this.CustomValue, null, this.Resizable ) ;
FCKDialog.OpenDialog( 'FCKDialog_' + this.Name , this.Title, this.Url, this.Width, this.Height, this.CustomValue, this.Resizable ) ;
}
FCKDialogCommand.prototype.GetState = function()
@ -186,7 +186,7 @@ FCKSourceCommand.prototype.Execute = function()
{
var iWidth = FCKConfig.ScreenWidth * 0.65 ;
var iHeight = FCKConfig.ScreenHeight * 0.65 ;
FCKDialog.OpenDialog( 'FCKDialog_Source', FCKLang.Source, 'dialog/fck_source.html', iWidth, iHeight, null, null, true ) ;
FCKDialog.OpenDialog( 'FCKDialog_Source', FCKLang.Source, 'dialog/fck_source.html', iWidth, iHeight, null, true ) ;
}
else
FCK.SwitchEditMode() ;

@ -193,9 +193,9 @@ FCKTextColorCommand.prototype._CreatePanelBody = function( targetDocument, targe
oDiv.innerHTML = '<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td nowrap align="center">' + FCKLang.ColorMoreColors + '</td></tr></table>' ;
FCKTools.AddEventListenerEx( oDiv, 'click', FCKTextColorCommand_MoreOnClick, this ) ;
// Dirty hack for Opera, Safari and Firefox 3.
if ( !FCKBrowserInfo.IsIE )
oDiv.style.width = '96%' ;
}
// Dirty hack for Opera, Safari and Firefox 3.
if ( !FCKBrowserInfo.IsIE )
oDiv.style.width = '96%' ;
}

@ -1,179 +1,179 @@
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2009 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Create the FCKeditorAPI object that is available as a global object in
* the page where the editor is placed in.
*/
var FCKeditorAPI ;
function InitializeAPI()
{
var oParentWindow = window.parent ;
if ( !( FCKeditorAPI = oParentWindow.FCKeditorAPI ) )
{
// Make the FCKeditorAPI object available in the parent window. Use
// eval so this core runs in the parent's scope and so it will still be
// available if the editor instance is removed ("Can't execute code
// from a freed script" error).
// Note: we check the existence of oEditor.GetParentForm because some external
// code (like JSON) can extend the Object prototype and we get then extra oEditor
// objects that aren't really FCKeditor instances.
var sScript =
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2009 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Create the FCKeditorAPI object that is available as a global object in
* the page where the editor is placed in.
*/
var FCKeditorAPI ;
function InitializeAPI()
{
var oParentWindow = window.parent ;
if ( !( FCKeditorAPI = oParentWindow.FCKeditorAPI ) )
{
// Make the FCKeditorAPI object available in the parent window. Use
// eval so this core runs in the parent's scope and so it will still be
// available if the editor instance is removed ("Can't execute code
// from a freed script" error).
// Note: we check the existence of oEditor.GetParentForm because some external
// code (like JSON) can extend the Object prototype and we get then extra oEditor
// objects that aren't really FCKeditor instances.
var sScript =
'window.FCKeditorAPI = {' +
'Version : "2.6.4.1",' +
'VersionBuild : "23195",' +
'Instances : window.FCKeditorAPI && window.FCKeditorAPI.Instances || {},' +
'GetInstance : function( name )' +
'{' +
'return this.Instances[ name ];' +
'},' +
'_FormSubmit : function()' +
'{' +
'for ( var name in FCKeditorAPI.Instances )' +
'{' +
'var oEditor = FCKeditorAPI.Instances[ name ] ;' +
'if ( oEditor.GetParentForm && oEditor.GetParentForm() == this )' +
'oEditor.UpdateLinkedField() ;' +
'}' +
'this._FCKOriginalSubmit() ;' +
'},' +
'_FunctionQueue : window.FCKeditorAPI && window.FCKeditorAPI._FunctionQueue || {' +
'Functions : new Array(),' +
'IsRunning : false,' +
'Add : function( f )' +
'{' +
'this.Functions.push( f );' +
'if ( !this.IsRunning )' +
'this.StartNext();' +
'},' +
'StartNext : function()' +
'{' +
'var aQueue = this.Functions ;' +
'if ( aQueue.length > 0 )' +
'{' +
'this.IsRunning = true;' +
'aQueue[0].call();' +
'}' +
'else ' +
'this.IsRunning = false;' +
'},' +
'Remove : function( f )' +
'{' +
'var aQueue = this.Functions;' +
'var i = 0, fFunc;' +
'while( (fFunc = aQueue[ i ]) )' +
'{' +
'if ( fFunc == f )' +
'aQueue.splice( i,1 );' +
'i++ ;' +
'}' +
'this.StartNext();' +
'}' +
'}' +
'}' ;
// In IE, the "eval" function is not always available (it works with
// the JavaScript samples, but not with the ASP ones, for example).
// So, let's use the execScript instead.
if ( oParentWindow.execScript )
oParentWindow.execScript( sScript, 'JavaScript' ) ;
else
{
if ( FCKBrowserInfo.IsGecko10 )
{
// FF 1.0.4 gives an error with the request bellow. The
// following seams to work well.
eval.call( oParentWindow, sScript ) ;
}
else if( FCKBrowserInfo.IsAIR )
{
FCKAdobeAIR.FCKeditorAPI_Evaluate( oParentWindow, sScript ) ;
}
else if ( FCKBrowserInfo.IsSafari )
{
// oParentWindow.eval in Safari executes in the calling window
// environment, instead of the parent one. The following should
// make it work.
var oParentDocument = oParentWindow.document ;
var eScript = oParentDocument.createElement('script') ;
eScript.appendChild( oParentDocument.createTextNode( sScript ) ) ;
oParentDocument.documentElement.appendChild( eScript ) ;
}
else
oParentWindow.eval( sScript ) ;
}
FCKeditorAPI = oParentWindow.FCKeditorAPI ;
// The __Instances properly has been changed to the public Instances,
// but we should still have the "deprecated" version of it.
FCKeditorAPI.__Instances = FCKeditorAPI.Instances ;
}
// Add the current instance to the FCKeditorAPI's instances collection.
FCKeditorAPI.Instances[ FCK.Name ] = FCK ;
}
// Attach to the form onsubmit event and to the form.submit().
function _AttachFormSubmitToAPI()
{
// Get the linked field form.
var oForm = FCK.GetParentForm() ;
if ( oForm )
{
// Attach to the onsubmit event.
FCKTools.AddEventListener( oForm, 'submit', FCK.UpdateLinkedField ) ;
// IE sees oForm.submit function as an 'object'.
if ( !oForm._FCKOriginalSubmit && ( typeof( oForm.submit ) == 'function' || ( !oForm.submit.tagName && !oForm.submit.length ) ) )
{
// Save the original submit.
oForm._FCKOriginalSubmit = oForm.submit ;
// Create our replacement for the submit.
oForm.submit = FCKeditorAPI._FormSubmit ;
}
}
}
function FCKeditorAPI_Cleanup()
{
if ( window.FCKConfig && FCKConfig.MsWebBrowserControlCompat
&& !window.FCKUnloadFlag )
return ;
delete FCKeditorAPI.Instances[ FCK.Name ] ;
}
function FCKeditorAPI_ConfirmCleanup()
{
if ( window.FCKConfig && FCKConfig.MsWebBrowserControlCompat )
window.FCKUnloadFlag = true ;
}
FCKTools.AddEventListener( window, 'unload', FCKeditorAPI_Cleanup ) ;
FCKTools.AddEventListener( window, 'beforeunload', FCKeditorAPI_ConfirmCleanup) ;
'Version : "2.6.4.1",' +
'VersionBuild : "23405",' +
'Instances : window.FCKeditorAPI && window.FCKeditorAPI.Instances || {},' +
'GetInstance : function( name )' +
'{' +
'return this.Instances[ name ];' +
'},' +
'_FormSubmit : function()' +
'{' +
'for ( var name in FCKeditorAPI.Instances )' +
'{' +
'var oEditor = FCKeditorAPI.Instances[ name ] ;' +
'if ( oEditor.GetParentForm && oEditor.GetParentForm() == this )' +
'oEditor.UpdateLinkedField() ;' +
'}' +
'this._FCKOriginalSubmit() ;' +
'},' +
'_FunctionQueue : window.FCKeditorAPI && window.FCKeditorAPI._FunctionQueue || {' +
'Functions : new Array(),' +
'IsRunning : false,' +
'Add : function( f )' +
'{' +
'this.Functions.push( f );' +
'if ( !this.IsRunning )' +
'this.StartNext();' +
'},' +
'StartNext : function()' +
'{' +
'var aQueue = this.Functions ;' +
'if ( aQueue.length > 0 )' +
'{' +
'this.IsRunning = true;' +
'aQueue[0].call();' +
'}' +
'else ' +
'this.IsRunning = false;' +
'},' +
'Remove : function( f )' +
'{' +
'var aQueue = this.Functions;' +
'var i = 0, fFunc;' +
'while( (fFunc = aQueue[ i ]) )' +
'{' +
'if ( fFunc == f )' +
'aQueue.splice( i,1 );' +
'i++ ;' +
'}' +
'this.StartNext();' +
'}' +
'}' +
'}' ;
// In IE, the "eval" function is not always available (it works with
// the JavaScript samples, but not with the ASP ones, for example).
// So, let's use the execScript instead.
if ( oParentWindow.execScript )
oParentWindow.execScript( sScript, 'JavaScript' ) ;
else
{
if ( FCKBrowserInfo.IsGecko10 )
{
// FF 1.0.4 gives an error with the request bellow. The
// following seams to work well.
eval.call( oParentWindow, sScript ) ;
}
else if( FCKBrowserInfo.IsAIR )
{
FCKAdobeAIR.FCKeditorAPI_Evaluate( oParentWindow, sScript ) ;
}
else if ( FCKBrowserInfo.IsSafari )
{
// oParentWindow.eval in Safari executes in the calling window
// environment, instead of the parent one. The following should
// make it work.
var oParentDocument = oParentWindow.document ;
var eScript = oParentDocument.createElement('script') ;
eScript.appendChild( oParentDocument.createTextNode( sScript ) ) ;
oParentDocument.documentElement.appendChild( eScript ) ;
}
else
oParentWindow.eval( sScript ) ;
}
FCKeditorAPI = oParentWindow.FCKeditorAPI ;
// The __Instances properly has been changed to the public Instances,
// but we should still have the "deprecated" version of it.
FCKeditorAPI.__Instances = FCKeditorAPI.Instances ;
}
// Add the current instance to the FCKeditorAPI's instances collection.
FCKeditorAPI.Instances[ FCK.Name ] = FCK ;
}
// Attach to the form onsubmit event and to the form.submit().
function _AttachFormSubmitToAPI()
{
// Get the linked field form.
var oForm = FCK.GetParentForm() ;
if ( oForm )
{
// Attach to the onsubmit event.
FCKTools.AddEventListener( oForm, 'submit', FCK.UpdateLinkedField ) ;
// IE sees oForm.submit function as an 'object'.
if ( !oForm._FCKOriginalSubmit && ( typeof( oForm.submit ) == 'function' || ( !oForm.submit.tagName && !oForm.submit.length ) ) )
{
// Save the original submit.
oForm._FCKOriginalSubmit = oForm.submit ;
// Create our replacement for the submit.
oForm.submit = FCKeditorAPI._FormSubmit ;
}
}
}
function FCKeditorAPI_Cleanup()
{
if ( window.FCKConfig && FCKConfig.MsWebBrowserControlCompat
&& !window.FCKUnloadFlag )
return ;
delete FCKeditorAPI.Instances[ FCK.Name ] ;
}
function FCKeditorAPI_ConfirmCleanup()
{
if ( window.FCKConfig && FCKConfig.MsWebBrowserControlCompat )
window.FCKUnloadFlag = true ;
}
FCKTools.AddEventListener( window, 'unload', FCKeditorAPI_Cleanup ) ;
FCKTools.AddEventListener( window, 'beforeunload', FCKeditorAPI_ConfirmCleanup) ;

@ -955,6 +955,38 @@ function _FCK_EditingArea_OnLoad()
FCKTools.AddEventListener( FCK.EditorDocument, 'mousemove', _FCK_MouseEventsListener ) ;
FCKTools.AddEventListener( FCK.EditorDocument, 'mousedown', _FCK_MouseEventsListener ) ;
FCKTools.AddEventListener( FCK.EditorDocument, 'mouseup', _FCK_MouseEventsListener ) ;
if ( FCKBrowserInfo.IsSafari )
{
// #3481: WebKit has a bug with paste where the paste contents may leak
// outside table cells. So add padding nodes before and after the paste.
FCKTools.AddEventListener( FCK.EditorDocument, 'paste', function( evt )
{
var range = new FCKDomRange( FCK.EditorWindow );
var nodeBefore = FCK.EditorDocument.createTextNode( '\ufeff' );
var nodeAfter = FCK.EditorDocument.createElement( 'a' );
nodeAfter.id = 'fck_paste_padding';
nodeAfter.innerHTML = '&#65279;';
range.MoveToSelection();
range.DeleteContents();
// Insert padding nodes.
range.InsertNode( nodeBefore );
range.Collapse();
range.InsertNode( nodeAfter );
// Move the selection to between the padding nodes.
range.MoveToPosition( nodeAfter, 3 );
range.Select();
// Remove the padding nodes after the paste is done.
setTimeout( function()
{
nodeBefore.parentNode.removeChild( nodeBefore );
nodeAfter = FCK.EditorDocument.getElementById( 'fck_paste_padding' );
nodeAfter.parentNode.removeChild( nodeAfter );
}, 0 );
} );
}
// Most of the CTRL key combos do not work under Safari for onkeydown and onkeypress (See #1119)
// But we can use the keyup event to override some of these...

@ -375,6 +375,16 @@ FCK.InsertHtml = function( html )
range = new FCKDomRange( this.EditorWindow ) ;
range.MoveToSelection() ;
// If the first element (if exists) of the document fragment is a block
// element, then split the current block. (#1537)
var currentNode = docFrag.RootNode.firstChild ;
while ( currentNode && currentNode.nodeType != 1 )
currentNode = currentNode.nextSibling ;
if ( currentNode && FCKListsLib.BlockElements[ currentNode.nodeName.toLowerCase() ] )
range.SplitBlock() ;
range.DeleteContents() ;
range.InsertNode( docFrag.RootNode ) ;

@ -172,7 +172,12 @@ FCK.InsertHtml = function( html )
oSel.createRange().pasteHTML( html ) ;
// Remove the fake node
FCK.EditorDocument.getElementById('__fakeFCKRemove__').removeNode( true ) ;
var fake = FCK.EditorDocument.getElementById('__fakeFCKRemove__') ;
// If the span is the only child of a node (so the inserted HTML is beyond that),
// remove also that parent that isn't needed. #1537
if (fake.parentNode.childNodes.length == 1)
fake = fake.parentNode ;
fake.removeNode( true ) ;
FCKDocumentProcessor.Process( FCK.EditorDocument ) ;
@ -373,22 +378,27 @@ FCK.CreateLink = function( url, noUndo )
{
// Creates the array that will be returned. It contains one or more created links (see #220).
var aCreatedLinks = new Array() ;
var isControl = FCKSelection.GetType() == 'Control' ;
var selectedElement = isControl && FCKSelection.GetSelectedElement() ;
// Remove any existing link in the selection.
FCK.ExecuteNamedCommand( 'Unlink', null, false, !!noUndo ) ;
// IE BUG: Unlinking a floating control selection that is not inside a link
// will collapse the selection. (#3677)
if ( !( isControl && !FCKTools.GetElementAscensor( selectedElement, 'a' ) ) )
FCK.ExecuteNamedCommand( 'Unlink', null, false, !!noUndo ) ;
if ( url.length > 0 )
{
// If there are several images, and you try to link each one, all the images get inside the link:
// <img><img> -> <a><img></a><img> -> <a><img><img></a> due to the call to 'CreateLink' (bug in IE)
if (FCKSelection.GetType() == 'Control')
if ( isControl )
{
// Create a link
var oLink = this.EditorDocument.createElement( 'A' ) ;
oLink.href = url ;
// Get the selected object
var oControl = FCKSelection.GetSelectedElement() ;
var oControl = selectedElement ;
// Put the link just before the object
oControl.parentNode.insertBefore(oLink, oControl) ;
// Move the object inside the link

@ -79,7 +79,7 @@ var FCKDialog = ( function()
/**
* Opens a dialog window using the standard dialog template.
*/
OpenDialog : function( dialogName, dialogTitle, dialogPage, width, height, customValue, parentWindow, resizable )
OpenDialog : function( dialogName, dialogTitle, dialogPage, width, height, customValue, resizable )
{
if ( !topDialog )
this.DisplayMainCover() ;

@ -488,18 +488,46 @@ var FCKDomTools =
for ( var i = 0 ; i < attributes.length ; i++ )
{
if ( FCKBrowserInfo.IsIE && attributes[i].nodeName == 'class' )
if ( FCKBrowserInfo.IsIE )
{
// IE has a strange bug. If calling removeAttribute('className'),
// the attributes collection will still contain the "class"
// attribute, which will be marked as "specified", even if the
// outerHTML of the element is not displaying the class attribute.
// Note : I was not able to reproduce it outside the editor,
// but I've faced it while working on the TC of #1391.
if ( element.className.length > 0 )
return true ;
var attributeNodeName = attributes[i].nodeName ;
if ( attributeNodeName.StartsWith( '_fck' ) )
{
/**
* There are places in the FCKeditor code where HTML element objects
* get values stored as properties (e.g. _fckxhtmljob). In Internet
* Explorer, these are interpreted as attempts to set attributes on
* the element.
*
* http://msdn.microsoft.com/en-us/library/ms533026(VS.85).aspx#Accessing_Element_Pr
*
* Counting these as HTML attributes cripples
* FCK.Style.RemoveFromRange() once FCK.GetData() has been called.
*
* The above conditional prevents these internal properties being
* counted as attributes.
*
* refs #2156 and #2834
*/
continue ;
}
if ( attributeNodeName == 'class' )
{
// IE has a strange bug. If calling removeAttribute('className'),
// the attributes collection will still contain the "class"
// attribute, which will be marked as "specified", even if the
// outerHTML of the element is not displaying the class attribute.
// Note : I was not able to reproduce it outside the editor,
// but I've faced it while working on the TC of #1391.
if ( element.className.length > 0 )
return true ;
continue ;
}
}
else if ( attributes[i].specified )
if ( attributes[i].specified )
return true ;
}

@ -56,6 +56,23 @@ FCKXHtml.GetXHTML = function( node, includeNode, format )
else
this._AppendChildNodes( this.MainNode, node, false ) ;
/**
* FCKXHtml._AppendNode() marks DOM element objects it has
* processed by adding a property called _fckxhtmljob,
* setting it equal to the value of FCKXHtml.CurrentJobNum.
* On Internet Explorer, if an element object has such a
* property, it will show up in the object's attributes
* NamedNodeMap, and the corresponding Attr object in
* that collection will have is specified property set
* to true. This trips up code elsewhere that checks to
* see if an element is free of attributes before proceeding
* with an edit operation (c.f. FCK.Style.RemoveFromRange())
*
* refs #2156 and #2834
*/
if ( FCKBrowserInfo.IsIE )
FCKXHtml._RemoveXHtmlJobProperties( node ) ;
// Get the resulting XHTML as a string.
var sXHTML = this._GetMainXmlString() ;

@ -92,6 +92,42 @@ FCKXHtml._AppendAttributes = function( xmlNode, htmlNode, node, nodeName )
}
}
/**
* Used to clean up HTML that has been processed FCKXHtml._AppendNode().
*
* For objects corresponding to HTML elements, Internet Explorer will
* treat a property as if it were an attribute set on that element.
*
* http://msdn.microsoft.com/en-us/library/ms533026(VS.85).aspx#Accessing_Element_Pr
*
* FCKXHtml._AppendNode() sets the property _fckxhtmljob on node objects
* corresponding HTML elements to mark them as having been processed.
* Counting these properties as attributes will cripple style removal
* because FCK.Styles.RemoveFromSelection() will not remove an element
* as long as it still has attributes.
*
* refs #2156 and #2834
*/
FCKXHtml._RemoveXHtmlJobProperties = function ( node )
{
// Select only nodes of type ELEMENT_NODE
if (!node || !node.nodeType || node.nodeType != 1)
return ;
// Clear the _fckhtmljob attribute.
if ( typeof node._fckxhtmljob !== 'undefined' )
node.removeAttribute('_fckxhtmljob') ;
// Recurse upon child nodes.
if ( node.hasChildNodes() )
{
var childNodes = node.childNodes ;
for ( var i = childNodes.length - 1 ; i >= 0 ; i-- )
FCKXHtml._RemoveXHtmlJobProperties( childNodes.item(i) ) ;
}
}
// On very rare cases, IE is loosing the "align" attribute for DIV. (right align and apply bulleted list)
FCKXHtml.TagProcessors['div'] = function( node, htmlNode )
{

@ -216,7 +216,7 @@ function OpenFileBrowser( url, width, height )
}
else
{
FCKDialog.OpenDialog( 'FCKDialog_FileManager' , FCKLang['BrowseServer'], url, width, height, '', window, true ) ;
FCKDialog.OpenDialog( 'FCKDialog_FileManager' , FCKLang['BrowseServer'], url, width, height, '', true ) ;
}
}

@ -65,6 +65,11 @@ window.onload = function()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="overflow: hidden">
<div id="divAbout">
@ -79,7 +84,7 @@ window.onload = function()
<span fcklang="DlgAboutVersion">version</span>
<br />
<b>2.6.4.1</b><br />
Build 23195</td>
Build 23405</td>
</tr>
</table>
</td>

@ -200,6 +200,11 @@ function ReadjustLinksToAnchor( sCurrent, sNew )
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="overflow: hidden">
<table height="100%" width="100%">

@ -68,6 +68,11 @@ function Ok()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="overflow: hidden">
<table width="100%" style="height: 100%">

@ -75,6 +75,11 @@ function Ok()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="OVERFLOW: hidden" scroll="no">
<table height="100%" width="100%">

@ -142,6 +142,11 @@ function Ok()
return true ;
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden">
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">

@ -319,6 +319,11 @@ function Ok()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="overflow: hidden">
<div id="divGeneral">

@ -21,11 +21,11 @@
*
* Link dialog window.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="noindex, nofollow" name="robots" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<meta content="noindex, nofollow" name="robots" >
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript">
@ -374,11 +374,11 @@ function SelectColor( wich )
{
switch ( wich )
{
case 'Back' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectBackColor, window ) ; return ;
case 'ColorText' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorText, window ) ; return ;
case 'ColorLink' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorLink, window ) ; return ;
case 'ColorVisited' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorVisited, window ) ; return ;
case 'ColorActive' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorActive, window ) ; return ;
case 'Back' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectBackColor ) ; return ;
case 'ColorText' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorText ) ; return ;
case 'ColorLink' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorLink ) ; return ;
case 'ColorVisited' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorVisited ) ; return ;
case 'ColorActive' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorActive ) ; return ;
}
}
@ -394,6 +394,11 @@ function SetUrl( url )
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="overflow: hidden">
<table cellspacing="0" cellpadding="0" width="100%" border="0" style="height: 100%">
@ -458,22 +463,22 @@ function SetUrl( url )
<span fcklang="DlgDocDocType">Document Type Heading</span><br />
<select id="selDocType" onchange="CheckOther( this, 'txtDocType' );">
<option value="" selected="selected"></option>
<option value='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'>HTML
<option value='&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;'>HTML
4.01 Transitional</option>
<option value='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'>
<option value='&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;'>
HTML 4.01 Strict</option>
<option value='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">'>
<option value='&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"&gt;'>
HTML 4.01 Frameset</option>
<option value='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'>
<option value='&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;'>
XHTML 1.0 Transitional</option>
<option value='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'>
<option value='&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;'>
XHTML 1.0 Strict</option>
<option value='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">'>
<option value='&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"&gt;'>
XHTML 1.0 Frameset</option>
<option value='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'>
<option value='&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;'>
XHTML 1.1</option>
<option value='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">'>HTML 3.2</option>
<option value='<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">'>HTML 2.0</option>
<option value='&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"&gt;'>HTML 3.2</option>
<option value='&lt;!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"&gt;'>HTML 2.0</option>
<option value="..." fcklang="DlgOpOther">&lt;Other&gt;</option>
</select>
</td>

@ -26,7 +26,7 @@
<title>Document Properties - Preview</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<script language="javascript">
<script type="text/javascript">
var eBase = parent.FCK.EditorDocument.getElementsByTagName( 'BASE' ) ;
if ( eBase.length > 0 && eBase[0].href.length > 0 )

@ -33,6 +33,11 @@
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ;
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body scroll="no" style="OVERFLOW: hidden">
<div id="divInfo">

@ -74,6 +74,11 @@ function Ok()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="overflow: hidden">
<table width="100%" style="height: 100%">

@ -89,6 +89,11 @@ function Ok()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="overflow: hidden" scroll="no">
<table height="100%" width="100%">

@ -33,6 +33,11 @@
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ;
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body scroll="no" style="overflow: hidden">
<div id="divInfo">

@ -28,6 +28,11 @@
<meta name="robots" content="noindex, nofollow" />
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script src="fck_link/fck_link.js" type="text/javascript"></script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body scroll="no" style="OVERFLOW: hidden">
<div id="divInfo" style="DISPLAY: none">

@ -82,6 +82,11 @@ function Ok()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="overflow: hidden">
<table width="100%" style="height: 100%">

@ -305,6 +305,11 @@ function CleanWord( oNode, bIgnoreFont, bRemoveStyles )
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="overflow: hidden">
<table cellspacing="0" cellpadding="0" width="100%" border="0" style="height: 98%">

@ -75,6 +75,11 @@ function Ok()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="OVERFLOW: hidden" scroll="no">
<table height="100%" width="100%">

@ -577,6 +577,11 @@ window.onunload = function()
}
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body onload="OnLoad()" style="overflow: hidden">
<div id="divFind" style="display: none">

@ -115,6 +115,11 @@ function Ok()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="overflow: hidden">
<table width="100%" height="100%">

@ -77,6 +77,11 @@ function out(td)
td.className = 'DarkBackground Hand' ;
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="overflow: hidden">
<table cellpadding="2" cellspacing="2" align="center" border="0" width="100%" height="100%">

@ -57,6 +57,11 @@ function Ok()
return true ;
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body scroll="no" style="OVERFLOW: hidden">
<table width="100%" height="100%">

@ -75,6 +75,11 @@ function setDefaults()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 13px; }
</style>
</head>
<body onload="setDefaults()" style="overflow: hidden">
<table cellpadding="0" cellspacing="0" width="100%" height="100%">

@ -62,6 +62,11 @@ function oSpeller_OnFinished( numberOCorrections )
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="OVERFLOW: hidden" scroll="no" style="padding:0px;">
<input type="hidden" id="txtHtml" value="">

@ -1,148 +0,0 @@
<cfsetting enablecfoutputonly="true">
<!---
This code uses a CF User Defined Function and should work in CF version 5.0
and up without alteration.
Also if you are hosting your site at an ISP, you will have to check with them
to see if the use of <CFEXECUTE> is allowed. In most cases ISP will not allow
the use of that tag for security reasons. Clients would be able to access each
others files in certain cases.
--->
<!--- The following variables values must reflect your installation. --->
<cfset aspell_dir = "C:\Program Files\Aspell\bin">
<cfset lang = "en_US">
<cfset aspell_opts = "-a --lang=#lang# --encoding=utf-8 -H --rem-sgml-check=alt">
<cfset tempfile_in = GetTempFile(GetTempDirectory(), "spell_")>
<cfset tempfile_out = GetTempFile(GetTempDirectory(), "spell_")>
<cfset spellercss = "../spellerStyle.css">
<cfset word_win_src = "../wordWindow.js">
<cfset form.checktext = form["textinputs[]"]>
<!--- make no difference between URL and FORM scopes --->
<cfparam name="url.checktext" default="">
<cfparam name="form.checktext" default="#url.checktext#">
<!--- Takes care of those pesky smart quotes from MS apps, replaces them with regular quotes --->
<cfset submitted_text = ReplaceList(form.checktext,"%u201C,%u201D","%22,%22")>
<!--- submitted_text now is ready for processing --->
<!--- use carat on each line to escape possible aspell commands --->
<cfset text = "">
<cfset CRLF = Chr(13) & Chr(10)>
<cfloop list="#submitted_text#" index="field" delimiters=",">
<cfset text = text & "%" & CRLF
& "^A" & CRLF
& "!" & CRLF>
<!--- Strip all tags for the text. (by FredCK - #339 / #681) --->
<cfset field = REReplace(URLDecode(field), "<[^>]+>", " ", "all")>
<cfloop list="#field#" index="line" delimiters="#CRLF#">
<cfset text = ListAppend(text, "^" & Trim(JSStringFormat(line)), CRLF)>
</cfloop>
</cfloop>
<!--- create temp file from the submitted text, this will be passed to aspell to be check for misspelled words --->
<cffile action="write" file="#tempfile_in#" output="#text#" charset="utf-8">
<!--- execute aspell in an UTF-8 console and redirect output to a file. UTF-8 encoding is lost if done differently --->
<cfexecute name="cmd.exe" arguments='/c type "#tempfile_in#" | "#aspell_dir#\aspell.exe" #aspell_opts# > "#tempfile_out#"' timeout="100"/>
<!--- read output file for further processing --->
<cffile action="read" file="#tempfile_out#" variable="food" charset="utf-8">
<!--- remove temp files --->
<cffile action="delete" file="#tempfile_in#">
<cffile action="delete" file="#tempfile_out#">
<cfset texts = StructNew()>
<cfset texts.textinputs = "">
<cfset texts.words = "">
<cfset texts.abort = "">
<!--- Generate Text Inputs --->
<cfset i = 0>
<cfloop list="#submitted_text#" index="textinput">
<cfset texts.textinputs = ListAppend(texts.textinputs, 'textinputs[#i#] = decodeURIComponent("#textinput#");', CRLF)>
<cfset i = i + 1>
</cfloop>
<!--- Generate Words Lists --->
<cfset word_cnt = 0>
<cfset input_cnt = -1>
<cfloop list="#food#" index="aspell_line" delimiters="#CRLF#">
<cfset leftChar = Left(aspell_line, 1)>
<cfif leftChar eq "*">
<cfset input_cnt = input_cnt + 1>
<cfset word_cnt = 0>
<cfset texts.words = ListAppend(texts.words, "words[#input_cnt#] = [];", CRLF)>
<cfset texts.words = ListAppend(texts.words, "suggs[#input_cnt#] = [];", CRLF)>
<cfelse>
<cfif leftChar eq "&" or leftChar eq "##">
<!--- word that misspelled --->
<cfset bad_word = Trim(ListGetAt(aspell_line, 2, " "))>
<cfset bad_word = Replace(bad_word, "'", "\'", "ALL")>
<!--- sugestions --->
<cfset sug_list = Trim(ListRest(aspell_line, ":"))>
<cfset sug_list = ListQualify(Replace(sug_list, "'", "\'", "ALL"), "'")>
<!--- javascript --->
<cfset texts.words = ListAppend(texts.words, "words[#input_cnt#][#word_cnt#] = '#bad_word#';", CRLF)>
<cfset texts.words = ListAppend(texts.words, "suggs[#input_cnt#][#word_cnt#] = [#sug_list#];", CRLF)>
<cfset word_cnt = word_cnt + 1>
</cfif>
</cfif>
</cfloop>
<cfif texts.words eq "">
<cfset texts.abort = "alert('Spell check complete.\n\nNo misspellings found.'); top.window.close();">
</cfif>
<cfcontent type="text/html; charset=utf-8">
<cfoutput><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="#spellercss#" />
<script language="javascript" src="#word_win_src#"></script>
<script language="javascript">
var suggs = new Array();
var words = new Array();
var textinputs = new Array();
var error;
#texts.textinputs##CRLF#
#texts.words#
#texts.abort#
var wordWindowObj = new wordWindow();
wordWindowObj.originalSpellings = words;
wordWindowObj.suggestions = suggs;
wordWindowObj.textInputs = textinputs;
function init_spell() {
// check if any error occured during server-side processing
if( error ) {
alert( error );
} else {
// call the init_spell() function in the parent frameset
if (parent.frames.length) {
parent.init_spell( wordWindowObj );
} else {
alert('This page was loaded outside of a frameset. It might not display properly');
}
}
}
</script>
</head>
<body onLoad="init_spell();">
<script type="text/javascript">
wordWindowObj.writeBody();
</script>
</body>
</html></cfoutput>
<cfsetting enablecfoutputonly="false">

@ -1,181 +0,0 @@
#!/usr/bin/perl
use CGI qw/ :standard /;
use File::Temp qw/ tempfile tempdir /;
# my $spellercss = '/speller/spellerStyle.css'; # by FredCK
my $spellercss = '../spellerStyle.css'; # by FredCK
# my $wordWindowSrc = '/speller/wordWindow.js'; # by FredCK
my $wordWindowSrc = '../wordWindow.js'; # by FredCK
my @textinputs = param( 'textinputs[]' ); # array
# my $aspell_cmd = 'aspell'; # by FredCK (for Linux)
my $aspell_cmd = '"C:\Program Files\Aspell\bin\aspell.exe"'; # by FredCK (for Windows)
my $lang = 'en_US';
# my $aspell_opts = "-a --lang=$lang --encoding=utf-8"; # by FredCK
my $aspell_opts = "-a --lang=$lang --encoding=utf-8 -H --rem-sgml-check=alt"; # by FredCK
my $input_separator = "A";
# set the 'wordtext' JavaScript variable to the submitted text.
sub printTextVar {
for( my $i = 0; $i <= $#textinputs; $i++ ) {
print "textinputs[$i] = decodeURIComponent('" . escapeQuote( $textinputs[$i] ) . "')\n";
}
}
sub printTextIdxDecl {
my $idx = shift;
print "words[$idx] = [];\n";
print "suggs[$idx] = [];\n";
}
sub printWordsElem {
my( $textIdx, $wordIdx, $word ) = @_;
print "words[$textIdx][$wordIdx] = '" . escapeQuote( $word ) . "';\n";
}
sub printSuggsElem {
my( $textIdx, $wordIdx, @suggs ) = @_;
print "suggs[$textIdx][$wordIdx] = [";
for my $i ( 0..$#suggs ) {
print "'" . escapeQuote( $suggs[$i] ) . "'";
if( $i < $#suggs ) {
print ", ";
}
}
print "];\n";
}
sub printCheckerResults {
my $textInputIdx = -1;
my $wordIdx = 0;
my $unhandledText;
# create temp file
my $dir = tempdir( CLEANUP => 1 );
my( $fh, $tmpfilename ) = tempfile( DIR => $dir );
# temp file was created properly?
# open temp file, add the submitted text.
for( my $i = 0; $i <= $#textinputs; $i++ ) {
$text = url_decode( $textinputs[$i] );
# Strip all tags for the text. (by FredCK - #339 / #681)
$text =~ s/<[^>]+>/ /g;
@lines = split( /\n/, $text );
print $fh "\%\n"; # exit terse mode
print $fh "^$input_separator\n";
print $fh "!\n"; # enter terse mode
for my $line ( @lines ) {
# use carat on each line to escape possible aspell commands
print $fh "^$line\n";
}
}
# exec aspell command
my $cmd = "$aspell_cmd $aspell_opts < $tmpfilename 2>&1";
open ASPELL, "$cmd |" or handleError( "Could not execute `$cmd`\\n$!" ) and return;
# parse each line of aspell return
for my $ret ( <ASPELL> ) {
chomp( $ret );
# if '&', then not in dictionary but has suggestions
# if '#', then not in dictionary and no suggestions
# if '*', then it is a delimiter between text inputs
if( $ret =~ /^\*/ ) {
$textInputIdx++;
printTextIdxDecl( $textInputIdx );
$wordIdx = 0;
} elsif( $ret =~ /^(&|#)/ ) {
my @tokens = split( " ", $ret, 5 );
printWordsElem( $textInputIdx, $wordIdx, $tokens[1] );
my @suggs = ();
if( $tokens[4] ) {
@suggs = split( ", ", $tokens[4] );
}
printSuggsElem( $textInputIdx, $wordIdx, @suggs );
$wordIdx++;
} else {
$unhandledText .= $ret;
}
}
close ASPELL or handleError( "Error executing `$cmd`\\n$unhandledText" ) and return;
}
sub escapeQuote {
my $str = shift;
$str =~ s/'/\\'/g;
return $str;
}
sub handleError {
my $err = shift;
print "error = '" . escapeQuote( $err ) . "';\n";
}
sub url_decode {
local $_ = @_ ? shift : $_;
defined or return;
# change + signs to spaces
tr/+/ /;
# change hex escapes to the proper characters
s/%([a-fA-F0-9]{2})/pack "H2", $1/eg;
return $_;
}
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Display HTML
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
print <<EOF;
Content-type: text/html; charset=utf-8
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="$spellercss"/>
<script src="$wordWindowSrc"></script>
<script type="text/javascript">
var suggs = new Array();
var words = new Array();
var textinputs = new Array();
var error;
EOF
printTextVar();
printCheckerResults();
print <<EOF;
var wordWindowObj = new wordWindow();
wordWindowObj.originalSpellings = words;
wordWindowObj.suggestions = suggs;
wordWindowObj.textInputs = textinputs;
function init_spell() {
// check if any error occured during server-side processing
if( error ) {
alert( error );
} else {
// call the init_spell() function in the parent frameset
if (parent.frames.length) {
parent.init_spell( wordWindowObj );
} else {
error = "This page was loaded outside of a frameset. ";
error += "It might not display properly";
alert( error );
}
}
}
</script>
</head>
<body onLoad="init_spell();">
<script type="text/javascript">
wordWindowObj.writeBody();
</script>
</body>
</html>
EOF

@ -155,28 +155,6 @@ function Ok()
SetAttribute( table, 'cellSpacing' , GetE('txtCellSpacing').value ) ;
SetAttribute( table, 'summary' , GetE('txtSummary').value ) ;
var eCaption = oEditor.FCKDomTools.GetFirstChild( table, 'CAPTION' ) ;
if ( document.getElementById('txtCaption').value != '')
{
if ( !eCaption )
{
eCaption = oDoc.createElement( 'CAPTION' ) ;
table.insertBefore( eCaption, table.firstChild ) ;
}
eCaption.innerHTML = document.getElementById('txtCaption').value ;
}
else if ( bExists && eCaption )
{
// TODO: It causes an IE internal error if using removeChild or
// table.deleteCaption() (see #505).
if ( oEditor.FCKBrowserInfo.IsIE )
eCaption.innerHTML = '' ;
else
eCaption.parentNode.removeChild( eCaption ) ;
}
var headers = GetE('selHeaders').value ;
if ( bExists )
{
@ -307,10 +285,37 @@ function Ok()
oEditor.FCK.InsertElement( table ) ;
}
var eCaption = oEditor.FCKDomTools.GetFirstChild( table, 'CAPTION' ) ;
if ( document.getElementById('txtCaption').value != '' )
{
if ( !eCaption )
{
eCaption = oDoc.createElement( 'CAPTION' ) ;
table.insertBefore( eCaption, table.firstChild ) ;
}
eCaption.innerHTML = document.getElementById('txtCaption').value ;
}
else if ( bExists && eCaption )
{
// TODO: It causes an IE internal error if using removeChild or
// table.deleteCaption() (see #505).
if ( oEditor.FCKBrowserInfo.IsIE )
eCaption.innerHTML = '' ;
else
eCaption.parentNode.removeChild( eCaption ) ;
}
return true ;
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="overflow: hidden">
<table id="otable" cellspacing="0" cellpadding="0" width="100%" border="0" style="height: 100%">

@ -139,10 +139,15 @@ function SelectBorderColor( color )
function SelectColor( wich )
{
oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, wich == 'Back' ? SelectBackColor : SelectBorderColor, window ) ;
oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, wich == 'Back' ? SelectBackColor : SelectBorderColor ) ;
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body scroll="no" style="overflow: hidden">
<table cellspacing="0" cellpadding="0" width="100%" border="0" height="100%">
@ -224,8 +229,8 @@ function SelectColor( wich )
<span fcklang="DlgCellType">Cell Type</span>:</td>
<td colspan="2">
&nbsp; <select id="selCellType">
<option fcklang="DlgCellTypeData" value="td" />Data
<option fcklang="DlgCellTypeHeader" value="th" />Header
<option fcklang="DlgCellTypeData" value="td">Data</option>
<option fcklang="DlgCellTypeHeader" value="th">Header</option>
</select>
</tr>
<tr>

@ -208,6 +208,11 @@ function SelectTemplate( index )
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body scroll="no" style="overflow: hidden; background-color: #ffffff;">
<table width="100%" style="height: 100%;" valign="top">

@ -69,6 +69,11 @@ function Ok()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="overflow: hidden">
<table height="100%" width="100%">

@ -85,6 +85,11 @@ function Ok()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body style="overflow: hidden">
<table width="100%" style="height: 100%">

@ -86,3 +86,5 @@ body, td, input, select
.fullHeight {
height: 100%;
}
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }

@ -94,14 +94,14 @@ function OpenFile( fileUrl )
if ( window.parent.opener )
{
// The file manager has been opened in a new window.
window.parent.opener.SetUrl( encodeURI( fileUrl ).replace( /#/g, '%23' ) ) ;
window.parent.opener.SetUrl( fileUrl ) ;
window.parent.close() ;
window.parent.opener.focus() ;
}
else if ( window.parent.parent && typeof (window.parent.parent.ParentDialog) == 'function' )
{
// The file manager is inside a dialog.
window.parent.parent.ParentDialog().contentWindow.frames['frmMain'].SetUrl( encodeURI( fileUrl ).replace( /#/g, '%23' ) ) ;
window.parent.parent.ParentDialog().contentWindow.frames['frmMain'].SetUrl( fileUrl ) ;
window.parent.parent.CloseDialog() ;
}
return true ;
@ -163,7 +163,7 @@ function GetFoldersAndFilesCallBack( fckXml )
// Get the optional "url" attribute. If not available, build the url.
var oFileUrlAtt = oNodes[j].attributes.getNamedItem('url') ;
var sFileUrl = oFileUrlAtt != null ? oFileUrlAtt.value : sCurrentFolderUrl + sFileName ;
var sFileUrl = oFileUrlAtt != null ? oFileUrlAtt.value : encodeURI( sCurrentFolderUrl + sFileName ).replace( /#/g, '%23' ) ;
oHtml.Append( oListManager.GetFileRowHtml( sFileName, sFileUrl, sFileSize ) ) ;
}

@ -65,8 +65,8 @@ function CreateXmlFooter()
function SendError( $number, $text )
{
if ( $_GET['Command'] == 'FileUpload' )
SendUploadResults( $number, "", "", $text ) ;
if ( $_GET['Command'] == 'FileUpload' )
SendUploadResults( $number, "", "", $text ) ;
if ( isset( $GLOBALS['HeaderSent'] ) && $GLOBALS['HeaderSent'] )
{
@ -94,6 +94,6 @@ function SendErrorNode( $number, $text )
if ($text)
echo '<Error number="' . $number . '" text="' . htmlspecialchars( $text ) . '" />' ;
else
echo '<Error number="' . $number . '" />' ;
echo '<Error number="' . $number . '" />' ;
}
?>

@ -94,6 +94,7 @@ function GetFoldersAndFiles( $resourceType, $currentFolder )
&& ( $in_group || ( !$in_group && strpos( $sFile, '_groupdocs' ) === false ) )
&& (!$in_shared_folder || ($in_shared_folder && (!$is_dir || ($is_dir && $sFile == $user_id))))
&& $sFile != '.thumbs'
&& strpos( $sFile, '.editor_' ) === false
&& $sFile != '.svn' )
{
if ( $is_dir )

@ -1,4 +1,4 @@
<?php
<?php
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2009 Frederico Caldeira Knabben

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -53,7 +53,7 @@ is.js Found: 428 Missing: 0
it.js Found: 410 Missing: 18
ja.js Found: 420 Missing: 8
km.js Found: 370 Missing: 58
ko.js Found: 390 Missing: 38
ko.js Found: 391 Missing: 37
lt.js Found: 428 Missing: 0
lv.js Found: 381 Missing: 47
mn.js Found: 411 Missing: 17
@ -61,7 +61,7 @@ ms.js Found: 352 Missing: 76
nb.js Found: 414 Missing: 14
nl.js Found: 420 Missing: 8
no.js Found: 414 Missing: 14
pl.js Found: 411 Missing: 17
pl.js Found: 412 Missing: 16
pt-br.js Found: 411 Missing: 17
pt.js Found: 381 Missing: 47
ro.js Found: 410 Missing: 18

@ -307,7 +307,7 @@ DlgTableHeight : "높이",
DlgTableCellSpace : "셀 간격",
DlgTableCellPad : "셀 여백",
DlgTableCaption : "캡션",
DlgTableSummary : "Summary", //MISSING
DlgTableSummary : "요약",
DlgTableHeaders : "Headers", //MISSING
DlgTableHeadersNone : "None", //MISSING
DlgTableHeadersColumn : "First column", //MISSING

@ -308,7 +308,7 @@ DlgTableCellSpace : "Odstęp pomiędzy komórkami",
DlgTableCellPad : "Margines wewnętrzny komórek",
DlgTableCaption : "Tytuł",
DlgTableSummary : "Podsumowanie",
DlgTableHeaders : "Headers", //MISSING
DlgTableHeaders : "Nagłówki",
DlgTableHeadersNone : "None", //MISSING
DlgTableHeadersColumn : "First column", //MISSING
DlgTableHeadersRow : "First Row", //MISSING
@ -512,7 +512,7 @@ DlgDocMeCopy : "Prawa autorskie",
DlgDocPreview : "Podgląd",
// Templates Dialog
Templates : "Sablony",
Templates : "Szablony",
DlgTemplatesTitle : "Szablony zawartości",
DlgTemplatesSelMsg : "Wybierz szablon do otwarcia w edytorze<br>(obecna zawartość okna edytora zostanie utracona):",
DlgTemplatesLoading : "Ładowanie listy szablonów. Proszę czekać...",

@ -119,6 +119,10 @@ body {
/*]]>*/
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body onload="javascript: Init();">

@ -129,6 +129,10 @@ body {
/*]]>*/
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body onload="javascript: Init();">

@ -34,6 +34,11 @@
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ;
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body scroll="no" style="overflow: hidden">
<div id="divInfo">

@ -182,7 +182,7 @@ FCKToolbarButton.prototype.ClickFrame = function()
FCKDialogCommand.prototype.ExecuteFrame = function()
{
return FCKDialog.OpenDialogFrame( 'FCKDialog_' + this.Name, this.Title, this.Url, this.Width, this.Height, this.CustomValue, null, this.Resizable ) ;
return FCKDialog.OpenDialogFrame( 'FCKDialog_' + this.Name, this.Title, this.Url, this.Width, this.Height, this.CustomValue, this.Resizable ) ;
};
var FCKDialog = ( function()
@ -243,7 +243,7 @@ var FCKDialog = ( function()
/**
* Opens a dialog window using the standard dialog template.
*/
OpenDialog : function( dialogName, dialogTitle, dialogPage, width, height, customValue, parentWindow, resizable )
OpenDialog : function( dialogName, dialogTitle, dialogPage, width, height, customValue, resizable )
{
if ( !topDialog )
this.DisplayMainCover() ;
@ -305,7 +305,7 @@ var FCKDialog = ( function()
***************************************************************************************
*/
OpenDialogFrame: function( dialogName, dialogTitle, dialogPage, width, height, customValue, parentWindow, resizable )
OpenDialogFrame: function( dialogName, dialogTitle, dialogPage, width, height, customValue, resizable )
{
//if ( !topDialog )
// this.DisplayMainCover() ;

@ -11,6 +11,11 @@
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ;
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body scroll="no" style="overflow: hidden">
<div id="divInfo">

@ -12,9 +12,11 @@
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ;
</script>
<style>
body, td, input, textarea, select, label {font-family: Verdana, Geneva, Arial, helvetica, sans-serif; font-size: 10px; }
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body scroll="no" style="overflow: hidden">
<div id="divInfo">

@ -657,22 +657,22 @@ Media.prototype.getInnerHTML = function ( objectId )
function SelectColor1()
{
oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectBackColor, window ) ;
oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectBackColor ) ;
}
function SelectColor2()
{
oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectToolColor, window ) ;
oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectToolColor ) ;
}
function SelectColor3()
{
oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectToolTextColor, window ) ;
oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectToolTextColor ) ;
}
function SelectColor4()
{
oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectToolTextRColor, window ) ;
oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectToolTextRColor ) ;
}
function SelectBackColor( color )

@ -26,6 +26,11 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="noindex, nofollow" name="robots">
<script src="googleMaps.js" type="text/javascript"></script>
<style type="text/css">
body, td, input, textarea, select, label {font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
<style type="text/css">
div.box {
height: 60px;

@ -11,6 +11,10 @@
<link rel="stylesheet" href="css/imgmap.css" type="text/css"/>
<meta http-equiv="imagetoolbar" content="no"/>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body>
@ -25,7 +29,7 @@
</div>
<div style="float: right">
<input type="button" id="remove" name="remove" fckLang="imgmapBtnRemove" value="Remove Map" onclick="removeMap();" class="Button" />
<input type="button" id="remove" name="remove" fckLang="imgmapBtnRemove" value="Remove Map" onclick="removeMap();" />
</div>
</fieldset>

@ -559,6 +559,10 @@ function Ok()
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ;
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
<!--solved a problem with iexplorer 7 by jc -->
<style type="text/css">
div.helpers

@ -85,6 +85,11 @@ function Ok()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body scroll="no" style="OVERFLOW: hidden">
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">

@ -58,9 +58,14 @@ window.onload = function()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body scroll="no" style="overflow: hidden;">
<div style="margin-top: 30px; margin-bottom: 30px; margin-right: auto; margin-left: auto; width: 100%;" align="center">
<div style="margin-top: 25px; margin-bottom: 25px; margin-right: auto; margin-left: auto; width: 100%;" align="center">
<span id="message"></span><br />
<input id="inputfield" type="text" style="width: 100%;"/>
</div>

@ -41,7 +41,7 @@ FCKDialog.Prompt = function( message, default_value, action, title, width, heigh
if ( !height )
{
height = 235 ;
height = 200 ;
}
var custom_value = {} ;

@ -87,6 +87,11 @@ function Ok()
}
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body scroll="no" style="OVERFLOW: hidden">
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">

@ -11,6 +11,11 @@
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ;
</script>
<style type="text/css">
body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
</style>
</head>
<body scroll="no" style="overflow: hidden">
<div id="divInfo">

@ -116,11 +116,3 @@ FCKConfig.VideoUploadDeniedExtensions = '' ;
FCKConfig.MediaUploadAllowedExtensions = '.(flv|mp4)$' ;
FCKConfig.MediaUploadDeniedExtensions = '' ;
// Note: These lists get combined with the platform's white and black lists.
/*
* Other settings.
*/
// TODO: This setting seems obsolete. To be checked for removal.
FCKConfig.UserStatus = 'teacher' ;

@ -2,12 +2,11 @@
/*
==============================================================================
*/
class LegalManager
{
private function __construct() {
class LegalManager {
private function __construct () {
//void
}
function add($language, $content, $type, $changes) {
public function add ($language, $content, $type, $changes) {
$legal_table = Database::get_main_table(TABLE_MAIN_LEGAL);
$last = self::get_last_condition($language);
$language = Database::escape_string($language);
@ -43,7 +42,7 @@ class LegalManager
}
}
function delete($id) {
public function delete ($id) {
/*
$legal_table = Database::get_main_table(TABLE_MAIN_LEGAL);
$id = intval($id);
@ -51,7 +50,7 @@ class LegalManager
*/
}
function get_last_condition_version($language){
public function get_last_condition_version ($language) {
$legal_conditions_table = Database::get_main_table(TABLE_MAIN_LEGAL);
$language= Database::escape_string($language);
$sql = "SELECT version FROM $legal_conditions_table WHERE language_id = '".$language."' ORDER BY legal_id DESC LIMIT 1 ";
@ -64,7 +63,7 @@ class LegalManager
}
}
function get_last_condition($language) {
public function get_last_condition ($language) {
$legal_conditions_table = Database::get_main_table(TABLE_MAIN_LEGAL);
$language= Database::escape_string($language);
$sql = "SELECT * FROM $legal_conditions_table WHERE language_id = '".$language."' ORDER BY version DESC LIMIT 1 ";
@ -72,8 +71,7 @@ class LegalManager
return Database::fetch_array($result);
}
function show_last_condition($term_preview)
{
public function show_last_condition ($term_preview) {
$preview = '';
switch ($term_preview['type']) {
/*// scroll box
@ -103,7 +101,7 @@ class LegalManager
// html
case 0:
$preview = '<div class="legal-terms"> '.$term_preview['content'].' </div>';
$preview .= '<br/>'.get_lang('ByClickingAccept');
$preview .= '<br/>'.get_lang('ByClickingRegisterYouAgreeTermsAndConditions');
break;
// page link
case 1:
@ -124,7 +122,7 @@ class LegalManager
}
return $preview;
}
function get_last_version($language){
public function get_last_version ($language) {
$legal_conditions_table = Database::get_main_table(TABLE_MAIN_LEGAL);
$language= Database::escape_string($language);
$sql = "SELECT version FROM $legal_conditions_table WHERE language_id = '".$language."' ORDER BY version DESC LIMIT 1 ";
@ -138,7 +136,7 @@ class LegalManager
}
}
function get_legal_data($from, $number_of_items, $column) {
public function get_legal_data ($from, $number_of_items, $column) {
$legal_conditions_table = Database::get_main_table(TABLE_MAIN_LEGAL);
$lang_table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$from = intval($from);
@ -169,7 +167,7 @@ class LegalManager
return $legals;
}
function count() {
public function count() {
$legal_conditions_table = Database::get_main_table(TABLE_MAIN_LEGAL);
$sql = "SELECT count(*) as count_result FROM $legal_conditions_table ORDER BY legal_id DESC ";
$result = Database::query($sql, __FILE__, __LINE__);
@ -177,4 +175,18 @@ class LegalManager
$result = $url['count_result'];
return $result;
}
/**
* Get type of terms and conditions
* @param int The legal id
* @param int The language id
* @return int The current type of terms and conditions
*/
public function get_type_of_terms_and_conditions ($legal_id,$language_id) {
$legal_conditions_table = Database::get_main_table(TABLE_MAIN_LEGAL);
$legal_id=Database::escape_string($legal_id);
$language_id=Database::escape_string($language_id);
$sql='SELECT type FROM '.$legal_conditions_table.' WHERE legal_id="'.$legal_id.'" AND language_id="'.$language_id.'"';
$rs=Database::query($sql,__FILE__,__LINE__);
return Database::result($rs,0,'type');
}
}

@ -183,7 +183,6 @@ define('LOG_USER_DELETE', 'user_deleted');
define('LOG_USER_CREATE', 'user_created');
define('LOG_SESSION_CREATE', 'session_created');
define('LOG_SESSION_DELETE', 'session_deleted');
define('LOG_SESSION_DELETE', 'session_deleted');
define('LOG_CONFIGURATION_SETTINGS_CHANGE', 'settings_changed');
define('LOG_SUBSCRIBE_USER_TO_COURSE', 'user_subscribed');
define('LOG_UNSUBSCRIBE_USER_FROM_COURSE', 'user_unsubscribed');
@ -462,11 +461,6 @@ function api_get_path($path_type) {
return api_get_path(WEB_CODE_PATH).'img/';
break;
case GARBAGE_PATH :
// example: /var/www/dokeos/main/garbage/
return $GLOBALS['garbageRepositorySys'];
break;
case SYS_PLUGIN_PATH :
// example: /var/www/dokeos/plugin/
return api_get_path(SYS_PATH).'plugin/';
@ -477,6 +471,7 @@ function api_get_path($path_type) {
return api_get_path(WEB_PATH).'plugin/';
break;
case GARBAGE_PATH : //now set to be same as archive
case SYS_ARCHIVE_PATH :
// example: /var/www/dokeos/archive/
return api_get_path(SYS_PATH).'archive/';

@ -22,7 +22,7 @@
// The use of this software is at the risk of the user.
//
// --------------------------------------------------------------------------------
// $Id: pclzip.lib.php 21315 2009-06-09 13:50:25Z ndieschburg $
// $Id: pclzip.lib.php 22578 2009-08-03 04:32:32Z yannoo $
// --------------------------------------------------------------------------------
// ----- Constants
@ -63,7 +63,7 @@
// define( 'PCLZIP_TEMPORARY_DIR', '/temp/' );
// define( 'PCLZIP_TEMPORARY_DIR', 'C:/Temp/' );
if (!defined('PCLZIP_TEMPORARY_DIR')) {
define( 'PCLZIP_TEMPORARY_DIR', $garbageRepositorySys );
define( 'PCLZIP_TEMPORARY_DIR', api_get_path(SYS_ARCHIVE_PATH) );
}
// --------------------------------------------------------------------------------

@ -1,4 +1,4 @@
<?php
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
@ -13,6 +13,19 @@ class SessionManager {
private function __construct() {
}
/**
* Fetches a session from the database
* @param int Session ID
* @return array Session details (id, id_coach, name, nbr_courses, nbr_users, nbr_classes, date_start, date_end, nb_days_access_before_beginning,nb_days_access_after_end, session_admin_id)
*/
public static function fetch($id) {
$t = Database::get_main_table(TABLE_MAIN_SESSION);
if ($id != strval(intval($id))) { return array(); }
$s = "SELECT * FROM $t WHERE id = $id";
$r = Database::query($s,__FILE__,__LINE__);
if (Database::num_rows($r) != 1) { return array(); }
return Database::fetch_array($r,'ASSOC');
}
/**
* Create a session
* @author Carlos Vargas <carlos.vargas@dokeos.com>,from existing code

@ -211,7 +211,7 @@ class Tracking {
//If the last connection is > than 7 days, the text is red
//345600 = 7 days in seconds
if ($currentTimestamp - $timestamp > 604800) {
return '<span style="color: #F00;">' . format_locale_date(get_lang('DateFormatLongWithoutDay'), strtotime($last_login_date)) . ' <a href="'.api_get_path(REL_CODE_PATH).'announcements/announcements.php?action=add&remind_inactive='.$student_id.'" title="'.get_lang('RemindInactiveUser').'"><img align="middle" src="'.api_get_path(WEB_IMG_PATH).'messagebox_warning.gif" /></a></span>';
return '<span style="color: #F00;">' . format_locale_date(get_lang('DateFormatLongWithoutDay'), strtotime($last_login_date)) . (api_is_allowed_to_edit()?' <a href="'.api_get_path(REL_CODE_PATH).'announcements/announcements.php?action=add&remind_inactive='.$student_id.'" title="'.get_lang('RemindInactiveUser').'"><img align="middle" src="'.api_get_path(WEB_IMG_PATH).'messagebox_warning.gif" /></a>':'').'</span>';
} else {
return format_locale_date(get_lang('DateFormatLongWithoutDay'), strtotime($last_login_date));
}
@ -369,15 +369,14 @@ class Tracking {
* @param Array limit average to listed lp ids
* @return string value (number %) Which represents a round integer explain in got in 3.
*/
function get_avg_student_score($student_id, $course_code, $lp_ids=array()) {
function get_avg_student_score($student_id, $course_code, $lp_ids=array()) {
$course_table = Database :: get_main_table(TABLE_MAIN_COURSE);
$course_user_table = Database :: get_main_table(TABLE_MAIN_COURSE_USER);
$table_session_course_user = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
$tbl_stats_exercices = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_EXERCICES);
$tbl_stats_attempts= Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
$course = CourseManager :: get_course_information($course_code);
$course = CourseManager :: get_course_information($course_code);
if (!empty($course['db_name'])) {
$tbl_quiz_questions= Database :: get_course_table(TABLE_QUIZ_QUESTION,$course['db_name']);
@ -387,67 +386,108 @@ class Tracking {
$lp_item_view_table = Database :: get_course_table(TABLE_LP_ITEM_VIEW,$course['db_name']);
$sql_course_lp = 'SELECT id FROM '.$lp_table;
if(count($lp_ids)!=0)
{
if(count($lp_ids)!=0) {
$sql_course_lp.=' WHERE id IN ('.implode(',',$lp_ids).')';
}
$sql_result_lp = api_sql_query($sql_course_lp, __FILE__, __LINE__);
$lp_scorm_score_total = 0;
$lp_scorm_weighting_total = 0;
$lp_scorm_result_score_total = 0;
$lp_scorm_loop=0;
$lp_count = 0;
$progress = 0;
if(Database::num_rows($sql_result_lp)>0){
//Scorm test
while($a_learnpath = Database::fetch_array($sql_result_lp)){
//Scorm test
while($a_learnpath = Database::fetch_array($sql_result_lp)) {
//We get the last view id of this LP
$sql='SELECT max(id) as id FROM '.$lp_view_table.' WHERE lp_id='.$a_learnpath['id'].' AND user_id="'.intval($student_id).'"';
//We get the last view id of this LP (with the higher id)
$sql='SELECT max(id) as id FROM '.$lp_view_table.'
WHERE lp_id='.$a_learnpath['id'].' AND user_id="'.intval($student_id).'"';
$rs_last_lp_view_id = api_sql_query($sql, __FILE__, __LINE__);
$lp_view_id = Database::result($rs_last_lp_view_id,0,'id');
$lp_view_id = Database::result($rs_last_lp_view_id,0,'id'); // THE view
$sql_max_score='SELECT lp_iv.score as score,lp_i.max_score
FROM '.$lp_item_view_table.' as lp_iv
INNER JOIN '.$lp_item_table.' as lp_i
ON lp_i.id = lp_iv.lp_item_id
AND lp_i.item_type="sco"
WHERE lp_view_id="'.$lp_view_id.'"';
//$rs = api_sql_query($sql, __FILE__, __LINE__);
//$sql_max_score='SELECT max_score FROM '.$lp_item_view_table.' WHERE lp_view_id="'.$lp_view_id.'" ';
$res_max_score=Database::query($sql_max_score,__FILE__,__LINE__);
$count_total_loop=0;
$num_rows_max_score=Database::num_rows($res_max_score);
if ($num_rows_max_score==1) {
while ($row_max_score=Database::fetch_array($res_max_score)) {
if ($row_max_score['max_score']==0) {
//when there's no max score, we assume 100 as the max score, as the SCORM 1.2 says that the value should always be between 0 and 100.
$lp_scorm_result_score_total+=($row_max_score['score']/100);
} else {
$lp_scorm_result_score_total+=($row_max_score['score']/$row_max_score['max_score']);
}
$count_total_loop++;
}
} elseif ($num_rows_max_score>1) {
while ($row_max_score=Database::fetch_array($res_max_score)) {
if ($row_max_score['max_score']==0) {
$lp_scorm_result_score_total+=($row_max_score['score']/100);
} else {
$lp_scorm_result_score_total+=($row_max_score['score']/$row_max_score['max_score']);
}
$count_total_loop++;
}
}
if ($count_total_loop==0) {
$count_total_loop=1;
}
$score_of_scorm_calculate=round((($lp_scorm_result_score_total/$count_total_loop)*100),2);
if ($lp_view_id != '') {
// we get the progress
$sql='SELECT progress FROM '.$lp_view_table.' WHERE id="'.$lp_view_id.'"';
$rs = api_sql_query($sql, __FILE__, __LINE__);
$progress = Database::result($rs,0,'progress');
// item's list of an scorm
$sql_max_score='SELECT lp_iv.score as score,lp_i.max_score
FROM '.$lp_item_view_table.' as lp_iv
INNER JOIN '.$lp_item_table.' as lp_i
ON lp_i.id = lp_iv.lp_item_id
AND lp_i.item_type="sco"
WHERE lp_view_id="'.$lp_view_id.'"';
//$rs = api_sql_query($sql, __FILE__, __LINE__);
//$sql_max_score='SELECT max_score FROM '.$lp_item_view_table.' WHERE lp_view_id="'.$lp_view_id.'" ';
$res_max_score=Database::query($sql_max_score,__FILE__,__LINE__);
$count_total_loop=0;
$num_rows_max_score=Database::num_rows($res_max_score);
if ($num_rows_max_score==1) {
while ($row_max_score=Database::fetch_array($res_max_score)) {
echo $row_max_score['score'].' - '.$row_max_score['max_score'];
if ($row_max_score['max_score']==0) {
//when there's no max score, we assume 100 as the max score, as the SCORM 1.2 says that the value should always be between 0 and 100.
$lp_scorm_result_score_total+=($row_max_score['score']/100);
$current_value = $row_max_score['score']/100;
} else {
$lp_scorm_result_score_total+=($row_max_score['score']/$row_max_score['max_score']);
$current_value = $row_max_score['score']/$row_max_score['max_score'];
}
$count_total_loop++;
}
} elseif ($num_rows_max_score > 1) {
//echo ' ---- <br>';
while ($row_max_score=Database::fetch_array($res_max_score)) {
//echo $row_max_score['score'].' - '.$row_max_score['max_score'];
//echo '<br>';
if ($row_max_score['max_score']==0) {
$lp_scorm_result_score_total+=($row_max_score['score']/100);
$current_value = $row_max_score['score']/100;
} else {
//when there's no max score, we assume 100 as the max score, as the SCORM 1.2 says that the value should always be between 0 and 100.
$lp_scorm_result_score_total+=($row_max_score['score']/$row_max_score['max_score']);
$current_value = $row_max_score['score']/$row_max_score['max_score'];
}
$count_total_loop++;
}
}
if ($num_rows_max_score > 0 && ($progress > 0 || $current_value > 0 )) {
$lp_count++;
}
if ($count_total_loop==0) {
$count_total_loop=1;
}
$score_of_scorm_calculate=round((($lp_scorm_result_score_total/$count_total_loop)*100),2);
} else {
$score_of_scorm_calculate = 0;
}
}
//The next call to a MySQL fetch function, such as mysql_fetch_assoc(), would return that row.
mysql_data_seek($sql_result_lp,0);
if ($lp_count==0) {
$lp_count=1;
}
if(count($lp_ids)==0 ) {
$score_of_scorm_calculate=round((($score_of_scorm_calculate/$lp_count)),2);
}
$lp_scorm_score_total = $score_of_scorm_calculate;
//Quizz in a LP
while($a_learnpath = Database::fetch_array($sql_result_lp)){
while($a_learnpath = Database::fetch_array($sql_result_lp)) {
//we got the maxscore this is wrong
/*
echo $sql = 'SELECT id as item_id, max_score
@ -528,8 +568,8 @@ class Tracking {
$total_weighting += $maxscore;
if($total_weighting>0 && $maxscore>0) {
//echo $total_score.' - '.$maxscore; echo '<br>';
//echo $lp_scorm_score_total += ($total_score/$total_weighting)*100;
$lp_scorm_score_total += ($total_score/$maxscore)*100;
//echo $lp_scorm_score_total += ($total_score/$total_weighting)*100;
$lp_scorm_score_total += ($total_score/$maxscore)*100;
$lp_scorm_weighting_total+=100;
}
}
@ -538,14 +578,14 @@ class Tracking {
}
}
$totalScore = $lp_scorm_score_total;
$totalScore = $lp_scorm_score_total;
$pourcentageScore = 0;
if($lp_scorm_weighting_total>0) {
//i.e 10.52
$pourcentageScore = round( (($totalScore * 100) / $lp_scorm_weighting_total),2);
return $pourcentageScore;
} elseif ($score_of_scorm_calculate>0) {
//echo '<br>'.$score_of_scorm_calculate;
return $score_of_scorm_calculate;
} else {
return null;
@ -1308,4 +1348,4 @@ class Tracking {
return $avg_student_score;
}
}
?>
?>

@ -10,7 +10,8 @@
Copyright (c) Roan Embrechts (Vrije Universiteit Brussel)
Copyright (c) Patrick Cool
Copyright (c) Julio Montoya Armas
Copyright (c) Isaac flores paz
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
@ -159,6 +160,7 @@ The course id is stored in $_cid session variable.
// verified if exists the username and password in session current
if (isset($_SESSION['info_current_user'][1]) && isset($_SESSION['info_current_user'][2])) {
require_once (api_get_path(LIBRARY_PATH).'usermanager.lib.php');
require_once (api_get_path(LIBRARY_PATH).'legal.lib.php');
}
// parameters passed via GET
$logout = isset($_GET["logout"]) ? $_GET["logout"] : '';
@ -210,11 +212,23 @@ if (get_setting('allow_terms_conditions')=='true') {
$user_id=$_SESSION['update_term_and_condition'][1]; // user id
// update the terms & conditions
if ((isset($_POST['legal_accept']) && $_POST['legal_accept']=='1') || !isset($_POST['legal_accept'])) {
//verify type of terms and conditions
$info_legal = explode(':',$_POST['legal_info']);
$legal_type=LegalManager::get_type_of_terms_and_conditions($info_legal[0],$info_legal[1]);
//is necessary verify check
if ($legal_type==1) {
if ((isset($_POST['legal_accept']) && $_POST['legal_accept']=='1')) {
$legal_option=true;
} else {
$legal_option=false;
}
}
//no is check option
if ($legal_type==0) {
$legal_option=true;
} else {
$legal_option=false;
}
if (isset($_POST['legal_accept_type']) && $legal_option===true) {

@ -1,27 +1,5 @@
<?php // $Id: compare_db.php 16653 2008-11-03 22:49:07Z ivantcholakov $
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2006 Yannick Warnier <yannick.warnier@dokeos.com>
Copyright (c) 2004 Dokeos S.A.
Copyright (c) 2003 Ghent University (UGent)
Copyright (c) 2001 Universite catholique de Louvain (UCL)
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.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
<?php // $Id: compare_db.php 22577 2009-08-03 04:31:24Z yannoo $
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
* This script allows you to know which tables have been modified

@ -1,28 +1,7 @@
<?php
# DOKEOS version {DOKEOS_VERSION}
# File generated by /install/index.php script - {DATE_GENERATED}
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004-2005 Dokeos S.A.
Copyright (c) 2003 Ghent University (UGent)
Copyright (c) 2001 Universite catholique de Louvain (UCL)
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.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
/* For licensing terms, see /dokeos_license.txt */
/*
==============================================================================
Configuration of virtual campus
@ -116,8 +95,6 @@ $rootAdminSys = $clarolineRepositorySys.$rootAdminAppend;
$rootAdminWeb = $clarolineRepositoryWeb.$rootAdminAppend;
// directory to store archived courses
$archiveDirName = "archive";
// change this to a place out of web if you can
$garbageRepositorySys = '{GARBAGE_DIR}';
// URL to your phpMyAdmin installation.
// If not empty, a link will be available in the Platform Administration
$phpMyAdminPath = '';

@ -44,3 +44,9 @@ search_did INT NOT NULL
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('allow_message_tool', NULL, 'radio', 'Tools', 'false', 'AllowMessageToolTitle', 'AllowMessageToolComment', NULL, NULL);
INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_message_tool', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_message_tool', 'false', 'No');
-- to make a DRH have the same rights as a tutor
-- INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('drhCourseManagerRights',null,'radio','Platform','true','DrhCourseManagerRightsTitle','DrhCoursManagerRightsComment',null,null,1,0);
-- enable RSS feeds in social page
INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable) values (1, 'rssfeeds','RSS feeds',0,0);

@ -1,27 +1,5 @@
<?php
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004-2005 Dokeos S.A.
Copyright (c) 2003 Ghent University (UGent)
Copyright (c) 2001 Universite catholique de Louvain (UCL)
Copyright (c) various contributors
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.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
* Install the Dokeos database

@ -1,26 +1,5 @@
<?php // $Id: install_files.inc.php 11139 2007-02-17 15:43:14Z yannoo $
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004 Dokeos S.A.
Copyright (c) 2003 Ghent University (UGent)
Copyright (c) 2001 Universite catholique de Louvain (UCL)
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.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
<?php // $Id: install_files.inc.php 22577 2009-08-03 04:31:24Z yannoo $
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
* Install the Dokeos files

@ -1,26 +1,5 @@
<?php
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004-2008 Dokeos S.P.R.L
Copyright (c) Roan Embrechts, Vrije Universiteit Brussel
Copyright (c) Bart Mollet, Hogeschool Gent
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.
Contact address: Dokeos, rue du Corbeau, 108, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
* This file contains functions used by the install and upgrade scripts.

@ -46,5 +46,5 @@ INSERT INTO settings_options (variable, value, display_text) VALUES ('show_teach
-- xxCOURSExx
ALTER TABLE wiki CHANGE title title varchar(255), CHANGE reflink reflink varchar(255), ADD time_edit datetime NOT NULL default '0000-00-00 00:00:00' AFTER is_editing, ADD INDEX (title), ADD INDEX (reflink), ADD INDEX (group_id), ADD INDEX (page_id);
ALTER TABLE wiki_conf DROP id, ADD fprogress3 varchar(3) NOT NULL AFTER feedback3, ADD fprogress2 varchar(3) NOT NULL AFTER feedback3, ADD fprogress1 varchar(3) NOT NULL AFTER feedback3, ADD INDEX(page_id);
ALTER TABLE wiki_conf DROP id, ADD task text NOT NULL BEFORE feedback1, ADD fprogress3 varchar(3) NOT NULL AFTER feedback3, ADD fprogress2 varchar(3) NOT NULL AFTER feedback3, ADD fprogress1 varchar(3) NOT NULL AFTER feedback3, ADD INDEX(page_id);
ALTER TABLE link ADD COLUMN target char(10) DEFAULT '_self';

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save