[geeklog-cvs] geeklog-1.3/public_html/admin moderation.php,1.50,1.51 story.php,1.125,1.126
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Mon Aug 16 06:44:48 EDT 2004
- Previous message (by thread): [geeklog-cvs] geeklog-1.3/system lib-story.php,NONE,1.1
- Next message (by thread): [geeklog-cvs] geeklog-1.3/public_html article.php,1.50,1.51 index.php,1.62,1.63 lib-common.php,1.360,1.361 submit.php,1.72,1.73
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/geeklog-1.3/public_html/admin
In directory www:/tmp/cvs-serv16589/public_html/admin
Modified Files:
moderation.php story.php
Log Message:
Moved story-related functions to new file system/lib-story.php
Index: story.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/admin/story.php,v
retrieving revision 1.125
retrieving revision 1.126
diff -C2 -d -r1.125 -r1.126
*** story.php 15 Aug 2004 19:57:48 -0000 1.125
--- story.php 16 Aug 2004 10:44:45 -0000 1.126
***************
*** 47,50 ****
--- 47,51 ----
*/
require_once ('../lib-common.php');
+ require_once ($_CONF['path_system'] . 'lib-story.php');
/**
***************
*** 132,136 ****
$display .= $LANG24[41];
$display .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));
! $display .= COM_article($A,n);
COM_accessLog("User {$_USER['username']} tried to illegally edit story $sid.");
return $display;
--- 133,137 ----
$display .= $LANG24[41];
$display .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));
! $display .= STORY_renderArticle ($A, 'n');
COM_accessLog("User {$_USER['username']} tried to illegally edit story $sid.");
return $display;
***************
*** 246,250 ****
$A['hits'] = 0;
}
! $display .= COM_article ($A, 'n');
$display .= COM_endBlock (COM_getBlockTemplate ('_admin_block', 'footer'));
}
--- 247,251 ----
$A['hits'] = 0;
}
! $display .= STORY_renderArticle ($A, 'n');
$display .= COM_endBlock (COM_getBlockTemplate ('_admin_block', 'footer'));
}
***************
*** 935,939 ****
// Get the related URLs
! $related = addslashes (COM_whatsRelated ("$introtext $bodytext", $uid, $tid));
// Clean up the text
--- 936,940 ----
// Get the related URLs
! $related = addslashes (STORY_whatsRelated ("$introtext $bodytext", $uid, $tid));
// Clean up the text
***************
*** 951,972 ****
for ($i = 1; $i <= count($delete); $i++) {
$ai_filename = DB_getItem ($_TABLES['article_images'],'ai_filename', "ai_sid = '$sid' AND ai_img_num = " . key ($delete));
! $curfile = $_CONF['path_images'] . 'articles/' . $ai_filename;
! if (!@unlink($curfile)) {
! echo COM_errorLog("Unable to delete image $curfile. Please check file permissions");
! }
!
! // remove unscaled image, if it exists
! $lFilename_large = substr_replace ($ai_filename, '_original.',
! strrpos ($ai_filename, '.'), 1);
! $lFilename_large_complete = $_CONF['path_images'] . 'articles/'
! . $lFilename_large;
! if (file_exists ($lFilename_large_complete)) {
! if (!@unlink ($lFilename_large_complete)) {
! echo COM_errorLog ('Unable to remove the following image from the article: ' . $lFilename_large_complete);
! }
! }
! DB_query("DELETE FROM {$_TABLES['article_images']} WHERE ai_sid = '$sid' AND ai_img_num = " . key($delete));
! next($delete);
}
--- 952,959 ----
for ($i = 1; $i <= count($delete); $i++) {
$ai_filename = DB_getItem ($_TABLES['article_images'],'ai_filename', "ai_sid = '$sid' AND ai_img_num = " . key ($delete));
! STORY_deleteImage ($ai_filename);
! DB_query ("DELETE FROM {$_TABLES['article_images']} WHERE ai_sid = '$sid' AND ai_img_num = " . key ($delete));
! next ($delete);
}
***************
*** 1125,1151 ****
}
! $result = DB_query ("SELECT ai_filename FROM {$_TABLES['article_images']} WHERE ai_sid = '$sid'");
! $nrows = DB_numRows ($result);
! for ($i = 1; $i <= $nrows; $i++) {
! $A = DB_fetchArray ($result);
! $filename = $_CONF['path_images'] . 'articles/' . $A['ai_filename'];
! if (!@unlink ($filename)) {
! // log the problem but don't abort the script
! echo COM_errorLog ('Unable to remove the following image from the article: ' . $filename);
! }
!
! // remove unscaled image, if it exists
! $lFilename_large = substr_replace ($A['ai_filename'], '_original.',
! strrpos ($A['ai_filename'], '.'), 1);
! $lFilename_large_complete = $_CONF['path_images'] . 'articles/'
! . $lFilename_large;
! if (file_exists ($lFilename_large_complete)) {
! if (!@unlink ($lFilename_large_complete)) {
! // again, log the problem but don't abort the script
! echo COM_errorLog ('Unable to remove the following image from the article: ' . $lFilename_large_complete);
! }
! }
! }
! DB_delete ($_TABLES['article_images'], 'ai_sid', $sid);
DB_delete ($_TABLES['comments'], 'sid', $sid);
DB_delete ($_TABLES['stories'], 'sid', $sid);
--- 1112,1116 ----
}
! STORY_deleteImages ($sid);
DB_delete ($_TABLES['comments'], 'sid', $sid);
DB_delete ($_TABLES['stories'], 'sid', $sid);
***************
*** 1219,1223 ****
$unixdate = strtotime("$publish_month/$publish_day/$publish_year $publish_hour:$publish_minute:$publish_second");
! if ($archiveflag =!= 1) {
$statuscode = 0;
}
--- 1184,1188 ----
$unixdate = strtotime("$publish_month/$publish_day/$publish_year $publish_hour:$publish_minute:$publish_second");
! if ($archiveflag != 1) {
$statuscode = 0;
}
Index: moderation.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/admin/moderation.php,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** moderation.php 15 May 2004 13:02:21 -0000 1.50
--- moderation.php 16 Aug 2004 10:44:45 -0000 1.51
***************
*** 35,41 ****
// $Id$
! require_once('../lib-common.php');
! require_once('auth.inc.php');
! require_once($_CONF['path_system'] . 'lib-user.php');
// Uncomment the line below if you need to debug the HTTP variables being passed
--- 35,42 ----
// $Id$
! require_once ('../lib-common.php');
! require_once ('auth.inc.php');
! require_once ($_CONF['path_system'] . 'lib-user.php');
! require_once ($_CONF['path_system'] . 'lib-story.php');
// Uncomment the line below if you need to debug the HTTP variables being passed
***************
*** 538,542 ****
$result = DB_query ("SELECT * FROM {$_TABLES['storysubmission']} where sid = '$mid[$i]'");
$A = DB_fetchArray ($result);
! $A['related'] = addslashes (COM_whatsRelated ($A['introtext'], $A['uid'], $A['tid']));
$A['owner_id'] = $A['uid'];
$A['title'] = addslashes ($A['title']);
--- 539,543 ----
$result = DB_query ("SELECT * FROM {$_TABLES['storysubmission']} where sid = '$mid[$i]'");
$A = DB_fetchArray ($result);
! $A['related'] = addslashes (STORY_whatsRelated ($A['introtext'], $A['uid'], $A['tid']));
$A['owner_id'] = $A['uid'];
$A['title'] = addslashes ($A['title']);
- Previous message (by thread): [geeklog-cvs] geeklog-1.3/system lib-story.php,NONE,1.1
- Next message (by thread): [geeklog-cvs] geeklog-1.3/public_html article.php,1.50,1.51 index.php,1.62,1.63 lib-common.php,1.360,1.361 submit.php,1.72,1.73
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the geeklog-cvs
mailing list