1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 11:36:08 +02:00

Code cleanup

This commit is contained in:
Cameron
2020-12-18 19:55:12 -08:00
parent 2b8a3cff60
commit 5b82c292b1
80 changed files with 1888 additions and 1731 deletions

View File

@@ -119,10 +119,10 @@ class list_forum
{
$LASTPOST = substr($thread_lastuser, 2);
}
else
{
//else
// {
//$LASTPOST = NFPM_L16;
}
// }
}
$LASTPOST .= " ".LIST_FORUM_6." <span class='smalltext'>$r_datestamp</span>";
}

View File

@@ -286,10 +286,10 @@ function parse_subs($forumList, $id, $lastpost_datestamp)
return $ret;
}
if (e_QUERY == 'track')
{
//if (e_QUERY == 'track')
//{
}
//}
if (e_QUERY == 'new')
{

View File

@@ -704,12 +704,12 @@ class e107forum
$tmp[$row['forum_parent']] = 1;
}
ksort($tmp);
if($key == 'post')
{
//if($key == 'post')
// {
//echo "<h3>Raw Perms</h3>";
// echo "Qry: ".$qryList['post'];
// print_a($tmp);
}
// }
$this->permList[$key] = array_keys($tmp);
$this->permList[$key.'_list'] = implode(',', array_keys($tmp));
}
@@ -2068,10 +2068,10 @@ class e107forum
// return $row['thread_id'];
}
else
{
//else
// {
// e107::getMessage()->addDebug(ucfirst($which)." Thread Qry Returned Nothing: ".$qry);
}
// }
return false;
}

View File

@@ -1710,11 +1710,11 @@ class forum_post_handler
return $ret;
}
else
{
//else
// {
// e107::getMessage()->addError('There was a problem with the attachment.');
// e107::getMessage()->addDebug(print_a($_FILES['file_userfile'],true));
}
// }
}
/* no file uploaded at all, proceed with creating the topic or reply
// TODO don't call process_upload() when no attachments are uploaded.. (check user input first, then call if needed)

View File

@@ -66,10 +66,10 @@ class forum_setup
}
$legacyMenuPref = e107::getConfig('menu')->getPref();
if(isset($legacyMenuPref['newforumposts_caption']))
{
//if(isset($legacyMenuPref['newforumposts_caption']))
//{
}
// }
return false;
}

View File

@@ -503,11 +503,7 @@ function step5()
$sefs[$forum_sef] = true;
// $tmp['_FIELD_TYPES'] = $ftypes['_FIELD_TYPES'];
if ($sql -> insert('forum_new', $tmp))
{
}
else
if (!$sql -> insert('forum_new', $tmp))
{
$mes->addDebug("Insert failed on " . print_a($tmp, true));
$mes->addError($sql->getLastErrorText());
@@ -1687,21 +1683,21 @@ class forumUpgrade
//Copy was successful, let's delete the original files now.
// $r = true;
// $r = unlink($old);
if (!$r)
{
//if (!$r)
// {
// $error = 'Was unable to delete old attachment: '.$old;
// return false;
}
if ($oldThumb)
{
// }
// if ($oldThumb)
// {
// $r = true;
// $r = unlink($oldThumb);
if (!$r)
{
//if (!$r)
// {
// $error = 'Was unable to delete old thumb: '.$oldThumb;
// return false;
}
}
// }
// }
return true;
}

View File

@@ -362,7 +362,7 @@
{
if(THEME_LEGACY === true && ($stuck === false || $unstuck === true))
{
// do nothing.
$doNothing; // do nothing.
}
elseif(!empty($FORUM_NORMAL_ROW))
{
@@ -521,11 +521,11 @@
$text .= "<li class='text-right'><a class='dropdown-item' href='{$moveUrl}'>" . LAN_FORUM_2042 . " " . $tp->toGlyph('move') . "</a></li>";
if(e_DEVELOPER)
{
//if(e_DEVELOPER)
// {
// $text .= "<li class='text-right'><a href='{$splitUrl}'>Split ".$tp->toGlyph('scissors')."</i></a></li>";
// print_a($thread_info);
}
// }
/*
$text .= "<li><input type='image' ".IMAGE_admin_delete." name='deleteThread_{$threadId}' value='thread_action' onclick=\"return confirm_({$threadId})\" /> Delete</li>";