Minor - Format code

remotes/angel/1.11.x
jmontoyaa 9 years ago
parent 61d5e39dd3
commit ef6dc7d2b1
  1. 24
      main/inc/lib/legal.lib.php
  2. 26
      main/inc/lib/login.lib.php

@ -56,10 +56,14 @@ class LegalManager
return true; return true;
} else { } else {
return false; return false;
} }
} }
/**
* @param int $id
*/
public static function delete($id) public static function delete($id)
{ {
/* /*
@ -137,7 +141,7 @@ class LegalManager
/** /**
* Show the last condition * Show the last condition
* @param array with type and content i.e array('type'=>'1', 'content'=>'hola'); * @param array $term_preview with type and content i.e array('type'=>'1', 'content'=>'hola');
* *
* @return string html preview * @return string html preview
*/ */
@ -172,9 +176,9 @@ class LegalManager
/** /**
* Get the terms and condition table (only for maintenance) * Get the terms and condition table (only for maintenance)
* @param int offset * @param int $from
* @param int number of items * @param int $number_of_items
* @param int column * @param int $column
* @return array * @return array
*/ */
public static function get_legal_data($from, $number_of_items, $column) public static function get_legal_data($from, $number_of_items, $column)
@ -198,12 +202,14 @@ class LegalManager
//echo strlen($legal[1]); echo '<br>'; //echo strlen($legal[1]); echo '<br>';
$versions[] = $legal[0]; $versions[] = $legal[0];
$languages[] = $legal[1]; $languages[] = $legal[1];
if (strlen($legal[2])>2000) if (strlen($legal[2]) > 2000) {
$legal[2] = substr($legal[2], 0, 2000).' ... '; $legal[2] = substr($legal[2], 0, 2000).' ... ';
if ($legal[4]==0) }
if ($legal[4] == 0) {
$legal[4] = get_lang('HTMLText'); $legal[4] = get_lang('HTMLText');
elseif($legal[4]==1) } elseif ($legal[4] == 1) {
$legal[4] = get_lang('PageLink'); $legal[4] = get_lang('PageLink');
}
$legals[] = $legal; $legals[] = $legal;
} }
return $legals; return $legals;
@ -228,8 +234,8 @@ class LegalManager
/** /**
* Get type of terms and conditions * Get type of terms and conditions
* @param int The legal id * @param int $legal_id
* @param int The language id * @param int $language_id
* @return int The current type of terms and conditions * @return int The current type of terms and conditions
*/ */
public static function get_type_of_terms_and_conditions($legal_id, $language_id) public static function get_type_of_terms_and_conditions($legal_id, $language_id)

@ -99,7 +99,12 @@ class Login
$email_body = get_lang('YourAccountParam') . " " . $portal_url . "\n\n$user_account_list"; $email_body = get_lang('YourAccountParam') . " " . $portal_url . "\n\n$user_account_list";
// SEND MESSAGE // SEND MESSAGE
$sender_name = api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'), null, PERSON_NAME_EMAIL_ADDRESS); $sender_name = api_get_person_name(
api_get_setting('administratorName'),
api_get_setting('administratorSurname'),
null,
PERSON_NAME_EMAIL_ADDRESS
);
$email_admin = api_get_setting('emailAdministrator'); $email_admin = api_get_setting('emailAdministrator');
if (api_mail_html('', $email_to, $email_subject, $email_body, $sender_name, $email_admin) == 1) { if (api_mail_html('', $email_to, $email_subject, $email_body, $sender_name, $email_admin) == 1) {
@ -175,7 +180,10 @@ class Login
api_get_setting('administratorSurname') api_get_setting('administratorSurname')
) )
); );
$message = sprintf(get_lang('ThisPlatformWasUnableToSendTheEmailPleaseContactXForMoreInformation'), $admin_email); $message = sprintf(
get_lang('ThisPlatformWasUnableToSendTheEmailPleaseContactXForMoreInformation'),
$admin_email
);
return $message; return $message;
} }
@ -196,16 +204,12 @@ class Login
$url = api_get_path(WEB_CODE_PATH).'auth/reset.php?token='.$uniqueId; $url = api_get_path(WEB_CODE_PATH).'auth/reset.php?token='.$uniqueId;
$mailTemplate = new Template(null, false, false, false, false, false); //$mailTemplate = new Template(null, false, false, false, false, false);
$mailLayout = $mailTemplate->get_template('mail/reset_password.tpl'); //$mailLayout = $mailTemplate->get_template('mail/reset_password.tpl');
$mailTemplate->assign('complete_user_name', $user->getCompleteName()); //$mailTemplate->assign('complete_user_name', $user->getCompleteName());
$mailTemplate->assign('link', $url); //$mailTemplate->assign('link', $url);
$mailSubject = get_lang('ResetPasswordInstructions'); $mailSubject = get_lang('ResetPasswordInstructions');
$mailBody = $mailTemplate->fetch($mailLayout); //$mailBody = $mailTemplate->fetch($mailLayout);
$mailBody = nl2br($mailBody);
$mailBody = sprintf( $mailBody = sprintf(
get_lang('ResetPasswordCommentWithUrl'), get_lang('ResetPasswordCommentWithUrl'),

Loading…
Cancel
Save