1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-27 18:00:30 +02:00

Mostly some LANs relating to 'comments' to synchronize with v1. USERJOINED constant added to sync with v1 also.

This commit is contained in:
CaMer0n
2012-07-21 03:55:04 +00:00
parent 794783b692
commit 09f789b09d
8 changed files with 41 additions and 8 deletions

View File

@@ -1549,6 +1549,7 @@ function init_session()
define('USEREMAIL', ''); define('USEREMAIL', '');
define('USERCLASS_LIST', ''); define('USERCLASS_LIST', '');
define('USERCLASS', ''); define('USERCLASS', '');
define('USERJOINED', '');
return; return;
} }
@@ -1580,12 +1581,14 @@ function init_session()
// we shouldn't use getValue() here, it's there for e.g. shortcodes, profile page render etc. // we shouldn't use getValue() here, it's there for e.g. shortcodes, profile page render etc.
define('USERID', $user->getId()); define('USERID', $user->getId());
define('USERNAME', $user->get('user_name')); define('USERNAME', $user->get('user_name'));
// define('USERURL', $user->get('user_homepage', false)); OLD? define('USERURL', $user->get('user_homepage', false)); //required for BC
define('USEREMAIL', $user->get('user_email')); define('USEREMAIL', $user->get('user_email'));
define('USER', true); define('USER', true);
define('USERCLASS', $user->get('user_class')); define('USERCLASS', $user->get('user_class'));
define('USERIMAGE', $user->get('user_image')); define('USERIMAGE', $user->get('user_image'));
define('USERPHOTO', $user->get('user_sess')); define('USERPHOTO', $user->get('user_sess'));
define('USERJOINED', $user->get('user_join'));
define('USERVISITS', $user->get('user_visits'));
define('ADMIN', $user->isAdmin()); define('ADMIN', $user->isAdmin());
define('ADMINID', $user->getAdminId()); define('ADMINID', $user->getAdminId());

View File

@@ -995,8 +995,8 @@ class users_admin_ui extends e_admin_ui
</tr> </tr>
<tr> <tr>
<td>Signatures may be entered by:</td> <td>".USRLAN_194.":</td>
<td>". // TODO LAN <td>".
e107::getForm()->uc_select('signature_access',$pref['signature_access'],"member,admin,main,classes,nobody") e107::getForm()->uc_select('signature_access',$pref['signature_access'],"member,admin,main,classes,nobody")
."</td> ."</td>
</tr> </tr>
@@ -1006,7 +1006,7 @@ class users_admin_ui extends e_admin_ui
<tr> <tr>
<td style='vertical-align:top'>".USRLAN_190.":</td> <td style='vertical-align:top'>".USRLAN_190.":</td>
<td> <td>
<input class='tbox' type='text' name='user_new_period' size='10' value='".varset($pref['user_new_period'],0)."' maxlength='5' /> ".USRLAN_192." <input class='tbox' type='text' name='user_new_period' size='10' value='".varset($pref['user_new_period'],0)."' maxlength='5' /> ".LANDT_04s."
<div class='field-help'>".USRLAN_191."</div> <div class='field-help'>".USRLAN_191."</div>
</td></tr> </td></tr>

View File

@@ -535,6 +535,17 @@ class comment
} }
function moderateComment($var)
{
if ($var == e_UC_MEMBER) // different behavior to check_class();
{
return (USER == TRUE && ADMIN == FALSE) ? TRUE : FALSE;
}
return check_class($var);
}
@@ -650,7 +661,7 @@ class comment
'comment_author_email' => $tp->toDB($cuser_mail), 'comment_author_email' => $tp->toDB($cuser_mail),
'comment_datestamp' => $_t, 'comment_datestamp' => $_t,
'comment_comment' => $comment, 'comment_comment' => $comment,
'comment_blocked' => (check_class($pref['comments_moderate']) ? 2 : 0), 'comment_blocked' => ($this->moderateComment($pref['comments_moderate']) ? 2 : 0),
'comment_ip' => $ip, 'comment_ip' => $ip,
'comment_type' => $tp->toDB($type, true), 'comment_type' => $tp->toDB($type, true),
'comment_lock' => 0 //Not locked by default 'comment_lock' => 0 //Not locked by default

View File

@@ -495,6 +495,8 @@ class e107_db_debug {
$text .= "THEME: '".THEME."'<br />"; $text .= "THEME: '".THEME."'<br />";
$text .= "THEME_LAYOUT: '".THEME_LAYOUT."'<br />"; $text .= "THEME_LAYOUT: '".THEME_LAYOUT."'<br />";
$text .= "<br />"; $text .= "<br />";
$text .= "e_LANGUAGE: '".e_LANGUAGE."'<br />"; $text .= "e_LANGUAGE: '".e_LANGUAGE."'<br />";
$text .= "e_LAN: '".e_LAN."'<br />"; $text .= "e_LAN: '".e_LAN."'<br />";
@@ -505,6 +507,20 @@ class e107_db_debug {
$text .= "META_DESCRIPTION: '".META_DESCRIPTION."'<br />"; $text .= "META_DESCRIPTION: '".META_DESCRIPTION."'<br />";
$text .= "<br />"; $text .= "<br />";
$text .= "USERID: '".USERID."'<br />";
$text .= "USERNAME: '".USERNAME."'<br />";
$text .= "USERURL: '".USERURL."'<br />";
$text .= "USEREMAIL: '".USEREMAIL."'<br />";
$text .= "USERCLASS: '".USERCLASS."'<br />";
$text .= "USERREALM: '".USERREALM."'<br />";
$text .= "USERVIEWED: '".USERVIEWED."'<br />";
$text .= "USERVISITS: '".USERVISITS."'<br />";
$text .= "USERIMAGE: '".USERIMAGE."'<br />";
$text .= "USERSESS: '".USERSESS."'<br />";
$text .= "USERJOINED: '".USERJOINED."'<br />";
$text .= "<br />";
$text .= "SQL Language: '".$sql->mySQLlanguage."'<br />"; $text .= "SQL Language: '".$sql->mySQLlanguage."'<br />";
$text .= "<br />"; $text .= "<br />";
$text .= "\$_SERVER['PHP_SELF']: '".$_SERVER['PHP_SELF']."'<br />"; $text .= "\$_SERVER['PHP_SELF']: '".$_SERVER['PHP_SELF']."'<br />";

View File

@@ -258,7 +258,7 @@ class userlogin
return $cookieval; return $cookieval;
} }
if (in_array(e_UC_NEWUSER,$class_list)) if (in_array(e_UC_NEWUSER,$class_list))//XXX Why not just add a check in check_class ?
{ {
if (time() > ($this->userData['user_join'] + (varset($pref['user_new_period'],0)*86400))) if (time() > ($this->userData['user_join'] + (varset($pref['user_new_period'],0)*86400)))
{ // 'New user' probationary period expired - we can take them out of the class { // 'New user' probationary period expired - we can take them out of the class

View File

@@ -234,5 +234,7 @@ define('PRFLAN_218', 'If \'off\', puts users at increased risk of XSS exploits p
define('PRFLAN_219', 'Not allowed characters found in Cookie name (alphanumeric characters allowed only). Cookie name not saved.'); define('PRFLAN_219', 'Not allowed characters found in Cookie name (alphanumeric characters allowed only). Cookie name not saved.');
define('PRFLAN_220', 'HTML Abuse filter (experimental)'); define('PRFLAN_220', 'HTML Abuse filter (experimental)');
define('PRFLAN_221', 'Blocks some unmatched tags for those allowed to post HTML'); define('PRFLAN_221', 'Blocks some unmatched tags for those allowed to post HTML');
define('PRFLAN_222', 'Moderate Comments made by');
define('PRFLAN_223', 'Comments will require manual approval by an admin prior to being visible to other users');
?> ?>

View File

@@ -196,9 +196,9 @@ define('USRLAN_189', 'Error sending email');
define('USRLAN_190', 'New user probationary period (days)'); define('USRLAN_190', 'New user probationary period (days)');
define('USRLAN_191', '(admin can impose restrictions during this period in some areas)'); define('USRLAN_191', '(admin can impose restrictions during this period in some areas)');
define('USRLAN_192', 'days'); define('USRLAN_192', ''); // was 'days' use value in lan_date.php instead.
define('USRLAN_193', 'Nothing changed - not saved'); define('USRLAN_193', 'Nothing changed - not saved');
define('USRLAN_194', ''); define('USRLAN_194', 'Signature may be modified by');
define('USRLAN_195', ''); define('USRLAN_195', '');
//User Ranks phrases //User Ranks phrases

View File

@@ -55,6 +55,7 @@ define("COMLAN_327", 'Rating');
define("COMLAN_328", 'Comments are locked'); define("COMLAN_328", 'Comments are locked');
define("COMLAN_329", 'Unauthorized'); define("COMLAN_329", 'Unauthorized');
define("COMLAN_330", 'IP:'); define("COMLAN_330", 'IP:');
define("COMLAN_331", "Pending Approval");
define("COMLAN_TYPE_1", "news"); define("COMLAN_TYPE_1", "news");
define("COMLAN_TYPE_2", "download"); define("COMLAN_TYPE_2", "download");