|
From: Jon O. <jon...@us...> - 2006-09-17 20:16:02
|
Update of /cvsroot/mxbb/mx_simpledoc/simpledoc/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv32089/modules/mx_simpledoc/simpledoc/modules Modified Files: simpledoc__node.php simpledoc__tab-document-info.php simpledoc__tab-edit-content.php simpledoc__tab-save-content.php simpledoc__tab-view-content.php simpledoc__tab-view-publish.php Log Message: My god, this module is advanced... Index: simpledoc__tab-edit-content.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc__tab-edit-content.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** simpledoc__tab-edit-content.php 2 May 2006 23:29:00 -0000 1.2 --- simpledoc__tab-edit-content.php 17 Sep 2006 20:15:57 -0000 1.3 *************** *** 84,88 **** include_once( $module_root_path . 'simpledoc/simpledoc_common.' . $phpEx ); ! $id = urldecode($mx_simpledoc_functions->fix_charset(get('id'))); $path = $CONTENT.'/'.$id; --- 84,98 ---- include_once( $module_root_path . 'simpledoc/simpledoc_common.' . $phpEx ); ! if ($simpledoc_debug) ! { ! set_error_handler('myErrorHandler'); ! } ! else ! { ! set_error_handler('logError'); ! $LOGERROR = 'error.txt'; ! } ! ! $id = $mx_simpledoc->unicode_urldecode($mx_simpledoc_functions->fix_charset(get('id'))); $path = $CONTENT.'/'.$id; *************** *** 110,114 **** ?> <form name="simpleform" action="./modules/mx_simpledoc/simpledoc/modules/simpledoc__tab-save-content.php" method="post" onSubmit="ste.submit(); saveContent(this); this.blur();return false;"> ! <input type="hidden" id="id" name="id" value="<?php echo $id; ?>"> <input type="hidden" id="block_id" name="block_id" value="<?php echo $block_id; ?>"> <input type="hidden" id="page_id" name="page_id" value="<?php echo $page_id; ?>"> --- 120,124 ---- ?> <form name="simpleform" action="./modules/mx_simpledoc/simpledoc/modules/simpledoc__tab-save-content.php" method="post" onSubmit="ste.submit(); saveContent(this); this.blur();return false;"> ! <input type="hidden" id="id" name="id" value="<?php echo get('id'); ?>"> <input type="hidden" id="block_id" name="block_id" value="<?php echo $block_id; ?>"> <input type="hidden" id="page_id" name="page_id" value="<?php echo $page_id; ?>"> Index: simpledoc__node.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc__node.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** simpledoc__node.php 17 Sep 2006 14:47:56 -0000 1.4 --- simpledoc__node.php 17 Sep 2006 20:15:57 -0000 1.5 *************** *** 85,113 **** include_once( $module_root_path . 'simpledoc/simpledoc_common.' . $phpEx ); - // error handler function - function myErrorHandler($errno, $errstr, $errfile, $errline) - { - switch ($errno) - { - case E_USER_ERROR: - $Node->error = true; - echo "<b>My ERROR</b> [$errno] $errstr\n\n"; - echo "Fatal error in line $errline of file $errfile"; - echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")\n\n"; - echo "Aborting...\n"; - exit(1); - break; - case E_USER_WARNING: - echo "<b>My WARNING</b> [$errno] $errstr\n\n"; - break; - case E_USER_NOTICE: - echo "<b>My NOTICE</b> [$errno] $errstr\n\n"; - break; - default: - // echo "Unknown error type: [$errno] $errstr<br />\n"; - break; - } - } - if ($simpledoc_debug) { --- 85,88 ---- *************** *** 121,130 **** $do = get('do'); ! $id = urldecode(get('id')); // reverse the js encodeURIComponent ! $name = get('name'); ! $is_folder = get('is_folder'); ! $id = $mx_simpledoc_functions->fix_charset($id); ! $name = $mx_simpledoc_functions->fix_charset($name); switch ($do) --- 96,103 ---- $do = get('do'); ! $id = $mx_simpledoc->unicode_urldecode($mx_simpledoc_functions->fix_charset(get('id'))); ! $name = $mx_simpledoc->unicode_urldecode($mx_simpledoc_functions->fix_charset(get('name'))); ! $is_folder = get('is_folder'); switch ($do) Index: simpledoc__tab-view-content.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc__tab-view-content.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** simpledoc__tab-view-content.php 17 Sep 2006 14:39:24 -0000 1.3 --- simpledoc__tab-view-content.php 17 Sep 2006 20:15:57 -0000 1.4 *************** *** 84,88 **** include_once( $module_root_path . 'simpledoc/simpledoc_common.' . $phpEx ); ! $id = urldecode($mx_simpledoc_functions->fix_charset(get('id'))); $path = $CONTENT.'/'.$id; --- 84,98 ---- include_once( $module_root_path . 'simpledoc/simpledoc_common.' . $phpEx ); ! if ($simpledoc_debug) ! { ! set_error_handler('myErrorHandler'); ! } ! else ! { ! set_error_handler('logError'); ! $LOGERROR = 'error.txt'; ! } ! ! $id = $mx_simpledoc->unicode_urldecode($mx_simpledoc_functions->fix_charset(get('id'))); $path = $CONTENT.'/'.$id; *************** *** 110,112 **** ?> ! <?php echo $html ?> --- 120,122 ---- ?> ! <?php echo mx_decode($html,''); ?> Index: simpledoc__tab-view-publish.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc__tab-view-publish.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** simpledoc__tab-view-publish.php 17 Sep 2006 14:39:24 -0000 1.3 --- simpledoc__tab-view-publish.php 17 Sep 2006 20:15:57 -0000 1.4 *************** *** 84,88 **** include_once( $module_root_path . 'simpledoc/simpledoc_common.' . $phpEx ); ! $id = urldecode($mx_simpledoc_functions->fix_charset(get('id'))); $path = $PUBLISH.'/html/'.$id; --- 84,98 ---- include_once( $module_root_path . 'simpledoc/simpledoc_common.' . $phpEx ); ! if ($simpledoc_debug) ! { ! set_error_handler('myErrorHandler'); ! } ! else ! { ! set_error_handler('logError'); ! $LOGERROR = 'error.txt'; ! } ! ! $id = $mx_simpledoc->unicode_urldecode($mx_simpledoc_functions->fix_charset(get('id'))); $path = $PUBLISH.'/html/'.$id; *************** *** 135,137 **** <?php echo '<div id="parentTOC"></div>' ?> ! <?php echo $html; ?> --- 145,147 ---- <?php echo '<div id="parentTOC"></div>' ?> ! <?php echo mx_decode($html,''); ?> Index: simpledoc__tab-save-content.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc__tab-save-content.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** simpledoc__tab-save-content.php 2 May 2006 23:29:00 -0000 1.2 --- simpledoc__tab-save-content.php 17 Sep 2006 20:15:57 -0000 1.3 *************** *** 84,93 **** include_once( $module_root_path . 'simpledoc/simpledoc_common.' . $phpEx ); ! $id = $mx_request_vars->request('id', MX_TYPE_POST_VARS, ''); ! $body = $mx_request_vars->request('body', MX_TYPE_POST_VARS, ''); ! $id = $mx_simpledoc_functions->fix_charset($id); $path = $CONTENT.'/'.$id; ! $body = $mx_simpledoc_functions->fix_charset($body); if (!IoFile::exists($path)) { --- 84,101 ---- include_once( $module_root_path . 'simpledoc/simpledoc_common.' . $phpEx ); ! if ($simpledoc_debug) ! { ! set_error_handler('myErrorHandler'); ! } ! else ! { ! set_error_handler('logError'); ! $LOGERROR = 'error.txt'; ! } ! $id = $mx_simpledoc->unicode_urldecode($mx_simpledoc_functions->fix_charset(post('id'))); $path = $CONTENT.'/'.$id; ! ! $body = $mx_request_vars->request('body', MX_TYPE_POST_VARS, ''); if (!IoFile::exists($path)) { *************** *** 95,98 **** --- 103,107 ---- exit; } + IoFile::write($path, $body); Index: simpledoc__tab-document-info.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc__tab-document-info.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** simpledoc__tab-document-info.php 2 May 2006 23:29:00 -0000 1.2 --- simpledoc__tab-document-info.php 17 Sep 2006 20:15:57 -0000 1.3 *************** *** 84,88 **** include_once( $module_root_path . 'simpledoc/simpledoc_common.' . $phpEx ); ! $id = urldecode($mx_simpledoc_functions->fix_charset(get('id'))); $path = $CONTENT.'/'.$id; --- 84,98 ---- include_once( $module_root_path . 'simpledoc/simpledoc_common.' . $phpEx ); ! if ($simpledoc_debug) ! { ! set_error_handler('myErrorHandler'); ! } ! else ! { ! set_error_handler('logError'); ! $LOGERROR = 'error.txt'; ! } ! ! $id = $mx_simpledoc->unicode_urldecode($mx_simpledoc_functions->fix_charset(get('id'))); $path = $CONTENT.'/'.$id; |