mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
Merge pull request #3121 from yesszus/patch-2
Issue #6 Update userposts.php
This commit is contained in:
@@ -49,7 +49,8 @@ class news {
|
||||
if(empty($news['news_title']))
|
||||
{
|
||||
$error = true;
|
||||
$emessage->add('Validation error: News title can\'t be empty!', E_MESSAGE_ERROR, $smessages);
|
||||
$message = LAN_ERROR_47;
|
||||
$emessage->add(LAN_ERROR_47, E_MESSAGE_ERROR, $smessages);
|
||||
if(!empty($news['news_sef']))
|
||||
{
|
||||
$news['news_sef'] = eHelper::secureSef($news['news_sef']);
|
||||
@@ -72,18 +73,21 @@ class news {
|
||||
if(empty($news['news_sef']))
|
||||
{
|
||||
$error = true;
|
||||
$emessage->add('Validation error: News SEF URL value is required field and can\'t be empty!', E_MESSAGE_ERROR, $smessages);
|
||||
$message = LAN_ERROR_48;
|
||||
$emessage->add(LAN_ERROR_48, E_MESSAGE_ERROR, $smessages);
|
||||
}
|
||||
elseif($sql->db_Count('news', '(news_id)', ($news['news_sef'] ? 'news_id<>'.intval($news['news_id']).' AND ' : '')."news_sef='".$tp->toDB($news['news_sef'])."'"))
|
||||
{
|
||||
$error = true;
|
||||
$emessage->add('Validation error: News SEF URL is unique field - current value already in use! Please choose another SEF URL value.', E_MESSAGE_ERROR, $smessages);
|
||||
$message = LAN_ERROR_49;
|
||||
$emessage->add(LAN_ERROR_49, E_MESSAGE_ERROR, $smessages);
|
||||
}
|
||||
|
||||
if(empty($news['news_category']))
|
||||
{
|
||||
$error = true;
|
||||
$emessage->add('Validation error: News category can\'t be empty!', E_MESSAGE_ERROR, $smessages);
|
||||
$message = LAN_ERROR_50;
|
||||
$emessage->add(LAN_ERROR_50, E_MESSAGE_ERROR, $smessages);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -64,4 +64,8 @@ define("LAN_ERROR_44", "Site logo");
|
||||
|
||||
define("LAN_ERROR_45", "What can you do now?");
|
||||
define("LAN_ERROR_46", "Check log for details.");
|
||||
define("LAN_ERROR_47", "Validation error: News title can't be empty!");
|
||||
define("LAN_ERROR_48", "Validation error: News SEF URL value is required field and can't be empty!");
|
||||
define("LAN_ERROR_49", "Validation error: News SEF URL is unique field - current value already in use! Please choose another SEF URL value.");
|
||||
define("LAN_ERROR_50", "Validation error: News category can't be empty!");
|
||||
?>
|
||||
|
@@ -11,8 +11,8 @@
|
||||
*/
|
||||
define("PAGE_NAME", "User Posts");
|
||||
|
||||
define("UP_LAN_0", "All Forum Posts for ");
|
||||
define("UP_LAN_1", "All Comments for ");
|
||||
define("UP_LAN_0", "All Forum Posts for [x]");
|
||||
define("UP_LAN_1", "All Comments for [x]");
|
||||
define("UP_LAN_2", "Thread");
|
||||
define("UP_LAN_3", "Views");
|
||||
define("UP_LAN_4", "Replies");
|
||||
|
@@ -70,7 +70,8 @@ if ($action == "comments")
|
||||
$sql2 = e107::getDb('sql2');
|
||||
if($user_name)
|
||||
{
|
||||
$ccaption = UP_LAN_1.$user_name;
|
||||
// $ccaption = UP_LAN_1.$user_name;
|
||||
$ccaption = str_replace('[x]', $user_name, UP_LAN_1);
|
||||
/*$sql->db_Select("user", "user_comments", "user_id=".$id);
|
||||
$row = $sql->db_Fetch();
|
||||
$ctotal = $row['user_comments'];*/
|
||||
@@ -159,7 +160,8 @@ elseif ($action == 'forums')
|
||||
exit;
|
||||
}
|
||||
|
||||
$fcaption = UP_LAN_0.' '.$user_name;
|
||||
// $fcaption = UP_LAN_0.' '.$user_name;
|
||||
$fcaption = str_replace('[x]', $user_name, UP_LAN_0);
|
||||
/*
|
||||
if (!$USERPOSTS_FORUM_TABLE)
|
||||
{
|
||||
|
Reference in New Issue
Block a user