|
From: Jon O. <jon...@us...> - 2006-06-30 11:17:28
|
Update of /cvsroot/mxbb/mx_simpledoc/simpledoc In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26055/modules/mx_simpledoc/simpledoc Modified Files: simpledoc_common.php Log Message: Adding Edit Lock and fixing some bugs Index: simpledoc_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/simpledoc_common.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simpledoc_common.php 23 Apr 2006 19:21:29 -0000 1.1 --- simpledoc_common.php 30 Jun 2006 11:17:24 -0000 1.2 *************** *** 31,40 **** if ( $mx_simpledoc_cache->exists( 'config' ) ) { ! $simpledoc_config = $mx_simpledoc_cache->get( 'config' ); } else { ! $simpledoc_config = $mx_simpledoc_functions->simpledoc_config(); ! $mx_simpledoc_cache->put( 'config', $simpledoc_config ); } --- 31,40 ---- if ( $mx_simpledoc_cache->exists( 'config' ) ) { ! //$simpledoc_config = $mx_simpledoc_cache->get( 'config' ); } else { ! //$simpledoc_config = $mx_simpledoc_functions->simpledoc_config(); ! //$mx_simpledoc_cache->put( 'config', $simpledoc_config ); } *************** *** 78,82 **** if(empty($simpledoc_projectName)) { ! die('No Project Name is set for this SimpleDoc. Please go to the admiCP/blockCP panel and fill out a Project Name.'); } --- 78,82 ---- if(empty($simpledoc_projectName)) { ! mx_message_die(GENERAL_MESSAGE, 'No Project Name is set for this SimpleDoc. Please go to the admiCP/blockCP panel and fill out a Project Name.'); } *************** *** 93,97 **** // If new Project - create // ! if (!IoDir::exists($PUBLISH)) { echo('Creating publish dir'); --- 93,97 ---- // If new Project - create // ! if (!IoDir::exists($PUBLISH)) { echo('Creating publish dir'); *************** *** 99,103 **** } ! if (!IoDir::exists($CONTENT)) { echo('Creating content dir'); --- 99,103 ---- } ! if (!IoDir::exists($CONTENT)) { echo('Creating content dir'); *************** *** 110,142 **** $error = array(); ! if (!IoDir::exists($PUBLISH) || !IoDir::isWritable($PUBLISH)) { $error[] = $PUBLISH; } ! if (IoDir::exists($CONTENT)) { if (!IoDir::isWritable($CONTENT)) $error[] = $CONTENT; $all = IoDir::readFull($CONTENT); ! foreach ($all as $v) { ! if (IoDir::exists($v)) { if (!IoDir::isWritable($v)) $error[] = $v; ! } ! else { if (!IoFile::isWritable($v)) $error[] = $v; } } ! if (count($error) == 0) { ! if (!IoFile::exists($CONTENT.'/'.$SORT)) { IoFile::create($CONTENT.'/'.$SORT, $CHMOD_FILE); } } ! } ! else { $error[] = $CONTENT; --- 110,142 ---- $error = array(); ! if (!IoDir::exists($PUBLISH) || !IoDir::isWritable($PUBLISH)) { $error[] = $PUBLISH; } ! if (IoDir::exists($CONTENT)) { if (!IoDir::isWritable($CONTENT)) $error[] = $CONTENT; $all = IoDir::readFull($CONTENT); ! foreach ($all as $v) { ! if (IoDir::exists($v)) { if (!IoDir::isWritable($v)) $error[] = $v; ! } ! else { if (!IoFile::isWritable($v)) $error[] = $v; } } ! if (count($error) == 0) { ! if (!IoFile::exists($CONTENT.'/'.$SORT)) { IoFile::create($CONTENT.'/'.$SORT, $CHMOD_FILE); } } ! } ! else { $error[] = $CONTENT; |