+ Censorlist was extended - added replacement parametr
+ Fixed bug with DB Size in check_script.php + Deleted a lot of indexes in check_script_data.php + Deleted cache index and forum lastpost section in cache_index.php and cache_forum.php + Fixed other bugs in warnings + Fixed pagination in search.php + Replaced DSF logo to uForum logo + Moved differend elements in skin + Added "WHOIS" option in "Admin/Mod Pool" in view topic + Fixed bug in add warnings: couldn't add warn for admin/mod git-svn-id: https://svn.pioder.pl/uf-svn/uF@29 72ec579a-5ced-4fa4-82f3-afba5d98df2f
This commit is contained in:
@@ -57,7 +57,7 @@ switch($_GET['mode'])
|
||||
for($i=0;$i<count($item);$i++)
|
||||
{
|
||||
$word = $item[$i];
|
||||
DataBase::sql_query("INSERT INTO ".CENSORLIST_TABLE." VALUES ('$last','$word')",GENERAL,'Could not add censored word.');
|
||||
DataBase::sql_query("INSERT INTO ".CENSORLIST_TABLE." VALUES ('$last','$word','[censored]')",GENERAL,'Could not add censored word.');
|
||||
$last = $last +1;
|
||||
}
|
||||
admin_message_forum($lng['words_added'],'censorlist.php');
|
||||
@@ -90,20 +90,23 @@ switch($_GET['mode'])
|
||||
if (isset($_POST['word']))
|
||||
{
|
||||
$word = strip_tags($_POST['word']);
|
||||
$replace = (strlen($_POST['replace']) > 0) ? $_POST['replace'] : '[censored]';
|
||||
$sql = "SELECT `w_id` FROM ".CENSORLIST_TABLE." ORDER BY `w_id` DESC";
|
||||
$last = DataBase::fetch(DataBase::sql_query($sql,GENERAL,'Could not obtain last word id'));
|
||||
$last = $last['w_id'];
|
||||
$last= $last +1;
|
||||
DataBase::sql_query("INSERT INTO ".CENSORLIST_TABLE." VALUES ('$last','$word')",GENERAL,'Could not add censored word.');
|
||||
DataBase::sql_query("INSERT INTO ".CENSORLIST_TABLE." VALUES ('$last','$word','$replace')",GENERAL,'Could not add censored word.');
|
||||
admin_message_forum($lng['word_added'],'censorlist.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
$_POST['word']='';
|
||||
$_POST['replace']='';
|
||||
$skin = array(
|
||||
'action'=>'censorlist.php?mode=addword',
|
||||
'L.main_beam'=>$lng['add_word'],
|
||||
'L.word_name'=>$lng['word_name'],
|
||||
'L.replace_to'=>$lng['replace_to'],
|
||||
'L.save'=>$lng['submit'],
|
||||
'L.reset'=>$lng['reset'],
|
||||
'L.censorlist'=>$lng['admin_censorlist']
|
||||
@@ -120,7 +123,8 @@ switch($_GET['mode'])
|
||||
{
|
||||
$word = strip_tags(trim($_POST['word']));
|
||||
$wid = intval($_GET['w']);
|
||||
DataBase::sql_query("UPDATE ".CENSORLIST_TABLE." SET `word`='$word' WHERE `w_id`='$wid'",GENERAL,'Could not update censored word.');
|
||||
$replace = $_POST['replace'];
|
||||
DataBase::sql_query("UPDATE ".CENSORLIST_TABLE." SET `word`='$word', `replace`='$replace' WHERE `w_id`='$wid'",GENERAL,'Could not update censored word.');
|
||||
admin_message_forum($lng['word_edited'],'censorlist.php?mode=view');
|
||||
}
|
||||
else
|
||||
@@ -130,10 +134,12 @@ switch($_GET['mode'])
|
||||
$query = DataBase::sql_query($sql,CRITICAL,'Could not obtain censorlist words');
|
||||
$result = DataBase::fetch($query);
|
||||
$_POST['word']=$result['word'];
|
||||
$_POST['replace']=$result['replace'];
|
||||
$skin = array(
|
||||
'action'=>'censorlist.php?mode=edit&w='.$wid,
|
||||
'L.main_beam'=>$lng['edit_word'],
|
||||
'L.word_name'=>$lng['word_name'],
|
||||
'L.replace_to'=>$lng['replace_to'],
|
||||
'L.save'=>$lng['submit'],
|
||||
'L.reset'=>$lng['reset'],
|
||||
'L.censorlist'=>$lng['admin_censorlist']
|
||||
@@ -171,11 +177,12 @@ switch($_GET['mode'])
|
||||
{
|
||||
$skin = array(
|
||||
'L.word_name'=>$item['word'],
|
||||
'L.word_replacement'=>$item['replace'],
|
||||
'w_id'=>$item['w_id'],
|
||||
'L.delete'=>$lng['delete'],
|
||||
'L.edit'=>$lng['edit'],
|
||||
);
|
||||
include('./template/censorlist_word_add.tpl');
|
||||
include('./template/censorlist_list_word.tpl');
|
||||
}
|
||||
}
|
||||
include('./template/overall_footer.tpl');
|
||||
|
||||
Reference in New Issue
Block a user