Skip to content

Commit

Permalink
- ported to Smarty 3
Browse files Browse the repository at this point in the history
  • Loading branch information
chilek committed Oct 14, 2011
1 parent 4d7deb0 commit c88d8a7
Show file tree
Hide file tree
Showing 283 changed files with 1,660 additions and 1,628 deletions.
2 changes: 1 addition & 1 deletion contrib/customer/customer.html
Expand Up @@ -151,7 +151,7 @@ <H1>{if $customerinfo.balance < 0}<FONT COLOR="RED"><B>{$customerinfo.balance|mo
<IMG SRC="lms-powered.png" ALT="Powered by LMS!">
</TD>
<TD COLSPAN="2" WIDTH="99%" ALIGN="RIGHT">
<FONT CLASS="BLEND">{t 0=$layout.lmsv}Generated by LMS $0{/t}<BR>
<FONT CLASS="BLEND">{t a=$layout.lmsv}Generated by LMS $a{/t}<BR>
&copy; 2001-2011 LMS Developers - <A HREF="http://www.lms.org.pl">http://www.lms.org.pl</A>
</FONT>
</TD>
Expand Down
10 changes: 5 additions & 5 deletions contrib/customer/index.php
Expand Up @@ -95,17 +95,17 @@

// set some template and layout variables

$SMARTY->assign_by_ref('_LANG', $_LANG);
$SMARTY->assign_by_ref('LANGDEFS', $LANGDEFS);
$SMARTY->assign_by_ref('_ui_language', $LMS->ui_lang);
$SMARTY->assign_by_ref('_language', $LMS->lang);
$SMARTY->assignByRef('_LANG', $_LANG);
$SMARTY->assignByRef('LANGDEFS', $LANGDEFS);
$SMARTY->assignByRef('_ui_language', $LMS->ui_lang);
$SMARTY->assignByRef('_language', $LMS->lang);
$SMARTY->template_dir = getcwd();
$SMARTY->compile_dir = SMARTY_COMPILE_DIR;
@include('locale/'.$LMS->ui_lang.'/strings.php');

$layout['lmsv'] = '1.11-cvs';

$SMARTY->assign_by_ref('layout', $layout);
$SMARTY->assignByRef('layout', $layout);

header('X-Powered-By: LMS/'.$layout['lmsv']);

Expand Down
2 changes: 1 addition & 1 deletion contrib/customer/locale/pl/strings.php
Expand Up @@ -27,7 +27,7 @@
$_LANG['Balance Sheet:'] = 'Bilans finansowy:';
$_LANG['Customer Information'] = 'Informacje o kliencie';
$_LANG['Name/Surname:'] = 'Nazwa/Nazwisko:';
$_LANG['Generated by LMS $0'] = 'Wygenerowano przy użyciu LMS $0';
$_LANG['Generated by LMS $a'] = 'Wygenerowano przy użyciu LMS $a';
$_LANG['Monthly payments:'] = 'Miesięczne opłaty:';
$_LANG['No such operations.'] = 'Brak operacji.';
$_LANG['Your IP address was not recognized by system. Please to ensure that you are using computer connected to our network, and you are not using proxy servers. Information about your balance are accessible only from registered computer.'] = 'Państwa adres IP nie został rozpoznany przez system. Proszę się upewnić, że korzystacie Państwo z komputera podłaczonego do naszej sieci i czy nie korzystacie z serwera proxy. Informacje o Państwa bilansie są dostępne tylko z zarejestrowanego komputera.';
Expand Down
4 changes: 2 additions & 2 deletions contrib/customer_otherip/balanceview.html
Expand Up @@ -10,7 +10,7 @@
</head>
<body bgcolor="#EBE4D6" link="#800000" vlink="#800000" alink="#336600">

<CENTER><H1>{t 0=$customerinfo.customername}Customer Logon: $0{/t}</H1></CENTER>
<CENTER><H1>{t a=$customerinfo.customername}Customer Logon: $a{/t}</H1></CENTER>
<BR>
<TABLE WIDTH="100%" CELLPADDING="3">
<TR>
Expand All @@ -25,7 +25,7 @@ <H1>{t}Customer Account:{/t}</H1>
<TR CLASS="DARK">
<TD class="fleftu">
<IMG src="img/money.gif" border="0" alt="" align="absmiddle">
<B>{t}Customer Account:{/t} ({t 0=$limit}last $0 transactions{/t})</B>
<B>{t}Customer Account:{/t} ({t a=$limit}last $a transactions{/t})</B>
</TD>
<TD class="frightu"></TD>
</TR>
Expand Down
2 changes: 1 addition & 1 deletion contrib/customer_otherip/balanceviewaccount.html
Expand Up @@ -19,7 +19,7 @@
<IMG SRC="img/money.gif" BORDER="0" ALT="">
</TD>
<TD WIDTH="99%" CLASS="FRIGHT">
{if $customerinfo.balance < 0}<FONT COLOR="RED"><H2>{t 0=$customerinfo.balance*-1|money_format 1=$customerinfo.id}We are please for punctual payment in value: <B>$0</B> with comment: $1{/t}</FONT></H2>{elseif $customerinfo.balance > 0}{t 0=$customerinfo.balance|money_format}You have overpayments on value: $0, they will be moved as payments for future subscriptions or services.{/t}{else}{t}You have no outstandings towards as.{/t}{/if}
{if $customerinfo.balance < 0}<FONT COLOR="RED"><H2>{t a=($customerinfo.balance*-1)|money_format b=$customerinfo.id}We are please for punctual payment in value: <B>$a</B> with comment: $b{/t}</FONT></H2>{elseif $customerinfo.balance > 0}{t 0=$customerinfo.balance|money_format}You have overpayments on value: $a, they will be moved as payments for future subscriptions or services.{/t}{else}{t}You have no outstandings towards as.{/t}{/if}
</TD>
</TR>
<TR CLASS="LIGHT">
Expand Down
12 changes: 6 additions & 6 deletions contrib/customer_otherip/class.php
Expand Up @@ -96,18 +96,18 @@

// set some template and layout variables

$SMARTY->assign_by_ref('_LANG', $_LANG);
$SMARTY->assign_by_ref('LANGDEFS', $LANGDEFS);
$SMARTY->assign_by_ref('_ui_language', $LMS->ui_lang);
$SMARTY->assign_by_ref('_language', $LMS->lang);
$SMARTY->assignByRef('_LANG', $_LANG);
$SMARTY->assignByRef('LANGDEFS', $LANGDEFS);
$SMARTY->assignByRef('_ui_language', $LMS->ui_lang);
$SMARTY->assignByRef('_language', $LMS->lang);
$SMARTY->template_dir = getcwd();
$SMARTY->compile_dir = SMARTY_COMPILE_DIR;

@include('locale/'.$LMS->ui_lang.'/strings.php');

$layout['lmsv'] = '1.11-cvs';

$SMARTY->assign_by_ref('layout', $layout);
$SMARTY->assign_by_ref('_config', $CONFIG);
$SMARTY->assignByRef('layout', $layout);
$SMARTY->assignByRef('_config', $CONFIG);

?>
2 changes: 1 addition & 1 deletion contrib/customer_otherip/invoice.php
Expand Up @@ -50,7 +50,7 @@
$invoice = $LMS->GetInvoiceContent($_GET['id']);

$ntempl = docnumber($invoice['number'], $invoice['template'], $invoice['cdate']);
$layout['pagetitle'] = trans('Invoice No. $0', $ntempl);
$layout['pagetitle'] = trans('Invoice No. $a', $ntempl);
$invoice['last'] = TRUE;
$SMARTY->assign('invoice',$invoice);
$SMARTY->display(SMARTY_TEMPLATES_DIR.'/clearheader.html');
Expand Down
12 changes: 6 additions & 6 deletions contrib/customer_otherip/invoice_pdf.php
Expand Up @@ -55,7 +55,7 @@ function invoice_simple_form_fill($x,$y,$scale)
text_autosize(15*$scale+$x,322*$scale+$y,30*$scale, iconv("UTF-8","ISO-8859-2",$invoice['zip']." ".$invoice['city']),350*$scale);

$tmp = docnumber($invoice['number'], $invoice['template'], $invoice['cdate']);
text_autosize(15*$scale+$x,215*$scale+$y,30*$scale,iconv("UTF-8","ISO-8859-2",trans('Payment for invoice No. $0',$tmp)),350*$scale);
text_autosize(15*$scale+$x,215*$scale+$y,30*$scale,iconv("UTF-8","ISO-8859-2",trans('Payment for invoice No. $a',$tmp)),350*$scale);

}

Expand All @@ -77,12 +77,12 @@ function invoice_main_form_fill($x,$y,$scale)
text_autosize(15*$scale+$x,555*$scale+$y,30*$scale,iconv("UTF-8","ISO-8859-2",$finances['account']),950*$scale);
$pdf->addtext(330*$scale+$x,495*$scale+$y,30*$scale,'X');
text_autosize(550*$scale+$x,495*$scale+$y,30*$scale,"*".number_format($invoice['total'],2,',','')."*",400*$scale);
text_autosize(15*$scale+$x,434*$scale+$y,30*$scale,iconv("UTF-8","ISO-8859-2",trans('$0 dollars $1 cents',to_words(floor($invoice['total'])),to_words(round(($invoice['total']-floor($invoice['total']))*100)))),950*$scale);
text_autosize(15*$scale+$x,434*$scale+$y,30*$scale,iconv("UTF-8","ISO-8859-2",trans('$a dollars $b cents',to_words(floor($invoice['total'])),to_words(round(($invoice['total']-floor($invoice['total']))*100)))),950*$scale);
text_autosize(15*$scale+$x,372*$scale+$y,30*$scale, iconv("UTF-8","ISO-8859-2",$invoice['name']),950*$scale);
text_autosize(15*$scale+$x,312*$scale+$y,30*$scale, iconv("UTF-8","ISO-8859-2",$invoice['address']." ".$invoice['zip']." ".$invoice['city']),950*$scale);

$tmp = docnumber($invoice['number'], $invoice['template'], $invoice['cdate']);
text_autosize(15*$scale+$x,250*$scale+$y,30*$scale,iconv("UTF-8","ISO-8859-2",trans('Payment for invoice No. $0',$tmp)),950*$scale);
text_autosize(15*$scale+$x,250*$scale+$y,30*$scale,iconv("UTF-8","ISO-8859-2",trans('Payment for invoice No. $a',$tmp)),950*$scale);
}

function text_align_right($x,$y,$size,$text)
Expand Down Expand Up @@ -136,7 +136,7 @@ function invoice_buyer($x,$y)
$y=$y-text_align_left($x,$y,$font_size,iconv("UTF-8","ISO-8859-2",trans('TEN:')).' '.$invoice['ten']);
else if ($invoice['ssn'])
$y=$y-text_align_left($x,$y,$font_size,iconv("UTF-8","ISO-8859-2",trans('SSN:')).' '.$invoice['ssn']);
$y=$y-text_align_left($x,$y,$font_size,'<b>'.iconv("UTF-8","ISO-8859-2",trans('Customer No.: $0',sprintf('%04d',$invoice['customerid']))).'</b>');
$y=$y-text_align_left($x,$y,$font_size,'<b>'.iconv("UTF-8","ISO-8859-2",trans('Customer No.: $a',sprintf('%04d',$invoice['customerid']))).'</b>');
return $y;
}

Expand All @@ -158,7 +158,7 @@ function invoice_title($x,$y)
global $invoice,$pdf,$CONFIG,$type;
$font_size=16;
$tmp = docnumber($invoice['number'], $invoice['template'], $invoice['cdate']);
$y=$y-text_align_left($x,$y,$font_size,'<b>'.iconv("UTF-8","ISO-8859-2",trans('Invoice No. $0',$tmp)).'</b>');
$y=$y-text_align_left($x,$y,$font_size,'<b>'.iconv("UTF-8","ISO-8859-2",trans('Invoice No. $a',$tmp)).'</b>');
$y=$y-text_align_left($x,$y,$font_size,iconv("UTF-8","ISO-8859-2",$type));
return $y;
}
Expand Down Expand Up @@ -310,7 +310,7 @@ function invoice_to_pay($x,$y)
{
global $pdf, $invoice;
$y = $y - text_align_left($x,$y,14,iconv("UTF-8","ISO-8859-2",trans('To pay:')).' '.iconv("UTF-8","ISO-8859-2",moneyf($invoice['total'])));
$y = $y - text_align_left($x,$y,10,iconv("UTF-8","ISO-8859-2",trans('In words:')).' '.iconv("UTF-8","ISO-8859-2",trans('$0 dollars $1 cents',to_words(floor($invoice['total'])),to_words(round(($invoice['total']-floor($invoice['total']))*100)))));
$y = $y - text_align_left($x,$y,10,iconv("UTF-8","ISO-8859-2",trans('In words:')).' '.iconv("UTF-8","ISO-8859-2",trans('$a dollars $b cents',to_words(floor($invoice['total'])),to_words(round(($invoice['total']-floor($invoice['total']))*100)))));
return $y;
}

Expand Down
6 changes: 3 additions & 3 deletions contrib/customer_otherip/locale/pl/strings.php
Expand Up @@ -28,15 +28,15 @@
$_LANG['Bank:'] = 'Bank:';
$_LANG['Customer Information:'] = 'Informacje o kliencie:';
$_LANG['Customer Logon'] = 'Panel Klienta';
$_LANG['Customer Logon: $0'] = 'Panel Klienta: $0';
$_LANG['Customer Logon: $a'] = 'Panel Klienta: $a';
$_LANG['Errornous data was entered!'] = 'Wprowadzono niepoprawne dane!';
$_LANG['Form Printout'] = 'Wydruk formularza';
$_LANG['home page'] = 'strona domowa';
$_LANG['Payments:'] = 'Płatności:';
$_LANG['Please to fill following form with customer ID and PIN which was sent to your email.'] = 'Proszę wypełnić formularz podając ID klienta oraz PIN, który był wysłany e-mailem.';
$_LANG['Print<BR>Payment<BR>Form'] = 'Wydruk<BR>Formularza<BR>Wpłaty';
$_LANG['We are please for punctual payment in value: <B>$0</B> with comment: $1'] = 'Prosimy o terminową wpłatę w wysokości: <B>$0</B> z dopiskiem: $1';
$_LANG['We are please for punctual payment in value: <B>$a</B> with comment: $b'] = 'Prosimy o terminową wpłatę w wysokości: <B>$a</B> z dopiskiem: $b';
$_LANG['You have no outstandings towards as.'] = 'Nie posiadasz zaległości wobec nas.';
$_LANG['You have overpayments on value: $0, they will be moved as payments for future subscriptions or services.'] = 'Posiadasz nadpłaty w wysokości: $0, zostaną one rozliczone jako płatności za przyszły abonament lub usługę.';
$_LANG['You have overpayments on value: $a, they will be moved as payments for future subscriptions or services.'] = 'Posiadasz nadpłaty w wysokości: $a, zostaną one rozliczone jako płatności za przyszły abonament lub usługę.';

?>
2 changes: 1 addition & 1 deletion contrib/sqlpanel/sqlprint.html
Expand Up @@ -8,7 +8,7 @@ <H1>{$layout.pagetitle}</H1>
<TD WIDTH="50%" ALIGN="RIGHT">
LMS {$layout.lmsv} @ {$layout.hostname}<BR>
{$smarty.now|date_format:"%A, %x"}<BR>
{t 0=$layout.logname}Prepared by: $0{/t}
{t a=$layout.logname}Prepared by: $a{/t}
</TD>
</TR>
</TABLE>
Expand Down
10 changes: 5 additions & 5 deletions contrib/squid_redirector/index.php
Expand Up @@ -86,15 +86,15 @@

// set some template and layout variables

$SMARTY->assign_by_ref('_LANG', $_LANG);
$SMARTY->assign_by_ref('LANGDEFS', $LANGDEFS);
$SMARTY->assign_by_ref('_ui_language', $LMS->ui_lang);
$SMARTY->assign_by_ref('_language', $LMS->lang);
$SMARTY->assignByRef('_LANG', $_LANG);
$SMARTY->assignByRef('LANGDEFS', $LANGDEFS);
$SMARTY->assignByRef('_ui_language', $LMS->ui_lang);
$SMARTY->assignByRef('_language', $LMS->lang);
$SMARTY->template_dir = getcwd();
$SMARTY->compile_dir = SMARTY_COMPILE_DIR;
include('lang.php');

$SMARTY->assign_by_ref('layout', $layout);
$SMARTY->assignByRef('layout', $layout);

if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
Expand Down
2 changes: 1 addition & 1 deletion contrib/userpanel_modules/accounts/locale/pl/strings.php
Expand Up @@ -44,7 +44,7 @@
$_LANG['Runs problems solving center'] = 'Uruchamia centrum rozwiązywania problemów';
$_LANG['Select:'] = 'Wybierz:';
$_LANG['Submit'] = 'Zapisz';
$_LANG['There is no Help Center tree. Use $0this form$1 to add root item.'] = 'Nie ma jeszcze struktury Centrum Pomocy. Użyj $0tego formularza$1 aby dodać główną pozycję.';
$_LANG['There is no Help Center tree. Use $athis form$b to add root item.'] = 'Nie ma jeszcze struktury Centrum Pomocy. Użyj $atego formularza$b aby dodać główną pozycję.';
$_LANG['This cannot be empty'] = 'To nie może być puste';
$_LANG['This module is not configured yet.'] = 'Ten moduł nie jest jeszcze skonfigurowany.';
$_LANG['This module shows problems solving center'] = 'Moduł ten wyświetla centrum rozwiązywania problemów';
Expand Down
5 changes: 5 additions & 0 deletions doc/ChangeLog
Expand Up @@ -30,6 +30,11 @@ version ? (????-??-??):
- helpdesk: ticket categories introduced [chilan]
- documents: fixed aliases sql query in default template [chilan]
- userpanel/helpdesk: missed customer id in footer of the notification mail [chilan]
- ported to Smarty 3 [chilan]
-----------------------------------------------------------------
WARNING: This update changes required version of Smarty from 2.6 to 3.x.
It was quite strongly tested with Smarty 3.1.3
-----------------------------------------------------------------

version 1.11.13 Dira (2011-04-07)

Expand Down
27 changes: 18 additions & 9 deletions index.php
Expand Up @@ -99,8 +99,17 @@

// test for proper version of Smarty

if (version_compare('2.6.0', $SMARTY->_version) > 0)
die('<B>Wrong version of Smarty engine! We support only Smarty-2.x greater than 2.6.0.</B>');
if (constant('Smarty::SMARTY_VERSION'))
$ver_chunks = preg_split('/-/', Smarty::SMARTY_VERSION);
else
$ver_chunks = NULL;
if (count($ver_chunks) != 2 || version_compare('3.0', $ver_chunks[1]) > 0)
die('<B>Wrong version of Smarty engine! We support only Smarty-3.x greater than 3.0.</B>');

define('SMARTY_VERSION', $ver_chunks[1]);

// uncomment this line if you're not gonna change template files no more
//$SMARTY->compile_check = false;

// Read configuration of LMS-UI from database

Expand Down Expand Up @@ -147,19 +156,19 @@
$layout['logname'] = $AUTH->logname;
$layout['logid'] = $AUTH->id;
$layout['lmsdbv'] = $DB->_version;
$layout['smarty_version'] = $SMARTY->_version;
$layout['smarty_version'] = SMARTY_VERSION;
$layout['hostname'] = hostname();
$layout['lmsv'] = '1.11-cvs';
$layout['lmsvr'] = $LMS->_revision.'/'.$AUTH->_revision;
$layout['dberrors'] =& $DB->errors;
$layout['popup'] = isset($_GET['popup']) ? true : false;

$SMARTY->assign_by_ref('layout', $layout);
$SMARTY->assign_by_ref('_LANG', $_LANG);
$SMARTY->assign_by_ref('LANGDEFS', $LANGDEFS);
$SMARTY->assign_by_ref('_ui_language', $LMS->ui_lang);
$SMARTY->assign_by_ref('_language', $LMS->lang);
$SMARTY->assign_by_ref('_config',$CONFIG);
$SMARTY->assignByRef('layout', $layout);
$SMARTY->assignByRef('_LANG', $_LANG);
$SMARTY->assignByRef('LANGDEFS', $LANGDEFS);
$SMARTY->assignByRef('_ui_language', $LMS->ui_lang);
$SMARTY->assignByRef('_language', $LMS->lang);
$SMARTY->assignByRef('_config',$CONFIG);

$error = NULL; // initialize error variable needed for (almost) all modules

Expand Down
40 changes: 20 additions & 20 deletions lib/LMS.class.php
Expand Up @@ -1798,26 +1798,26 @@ function GetCustomerAssignments($id, $show_expired=false)
break;
case WEEKLY:
$row['at'] = strftime("%a",mktime(0,0,0,0,$row['at']+5,0));
$row['payday'] = trans('weekly ($0)', $row['at']);
$row['payday'] = trans('weekly ($a)', $row['at']);
$row['period'] = trans('weekly');
break;
case MONTHLY:
$row['payday'] = trans('monthly ($0)', $row['at']);
$row['payday'] = trans('monthly ($a)', $row['at']);
$row['period'] = trans('monthly');
break;
case QUARTERLY:
$row['at'] = sprintf('%02d/%02d', $row['at']%100, $row['at']/100+1);
$row['payday'] = trans('quarterly ($0)', $row['at']);
$row['payday'] = trans('quarterly ($a)', $row['at']);
$row['period'] = trans('quarterly');
break;
case HALFYEARLY:
$row['at'] = sprintf('%02d/%02d', $row['at']%100, $row['at']/100+1);
$row['payday'] = trans('half-yearly ($0)', $row['at']);
$row['payday'] = trans('half-yearly ($a)', $row['at']);
$row['period'] = trans('half-yearly');
break;
case YEARLY:
$row['at'] = date('d/m',($row['at']-1)*86400);
$row['payday'] = trans('yearly ($0)', $row['at']);
$row['payday'] = trans('yearly ($a)', $row['at']);
$row['period'] = trans('yearly');
break;
}
Expand Down Expand Up @@ -2671,19 +2671,19 @@ function GetPaymentList()
$row['payday'] = trans('daily');
break;
case WEEKLY:
$row['payday'] = trans('weekly ($0)', strftime("%a",mktime(0,0,0,0,$row['at']+5,0)));
$row['payday'] = trans('weekly ($a)', strftime("%a",mktime(0,0,0,0,$row['at']+5,0)));
break;
case MONTHLY:
$row['payday'] = trans('monthly ($0)',$row['at']);
$row['payday'] = trans('monthly ($a)',$row['at']);
break;
case QUARTERLY:
$row['payday'] = trans('quarterly ($0)', sprintf('%02d/%02d', $row['at']%100, $row['at']/100+1));
$row['payday'] = trans('quarterly ($a)', sprintf('%02d/%02d', $row['at']%100, $row['at']/100+1));
break;
case HALFYEARLY:
$row['payday'] = trans('half-yearly ($0)', sprintf('%02d/%02d', $row['at']%100, $row['at']/100+1));
$row['payday'] = trans('half-yearly ($a)', sprintf('%02d/%02d', $row['at']%100, $row['at']/100+1));
break;
case YEARLY:
$row['payday'] = trans('yearly ($0)', date('d/m',($row['at']-1)*86400));
$row['payday'] = trans('yearly ($a)', date('d/m',($row['at']-1)*86400));
break;
}

Expand All @@ -2705,19 +2705,19 @@ function GetPayment($id)
$payment['payday'] = trans('daily');
break;
case WEEKLY:
$payment['payday'] = trans('weekly ($0)', strftime("%a",mktime(0,0,0,0,$payment['at']+5,0)));
$payment['payday'] = trans('weekly ($a)', strftime("%a",mktime(0,0,0,0,$payment['at']+5,0)));
break;
case MONTHLY:
$payment['payday'] = trans('monthly ($0)',$payment['at']);
$payment['payday'] = trans('monthly ($a)',$payment['at']);
break;
case QUARTERLY:
$payment['payday'] = trans('quarterly ($0)', sprintf('%02d/%02d', $payment['at']%100, $payment['at']/100+1));
$payment['payday'] = trans('quarterly ($a)', sprintf('%02d/%02d', $payment['at']%100, $payment['at']/100+1));
break;
case HALFYEARLY:
$payment['payday'] = trans('half-yearly ($0)', sprintf('%02d/%02d', $payment['at']%100, $payment['at']/100+1));
$payment['payday'] = trans('half-yearly ($a)', sprintf('%02d/%02d', $payment['at']%100, $payment['at']/100+1));
break;
case YEARLY:
$payment['payday'] = trans('yearly ($0)', date('d/m',($payment['at']-1)*86400));
$payment['payday'] = trans('yearly ($a)', date('d/m',($payment['at']-1)*86400));
break;
}
return $payment;
Expand Down Expand Up @@ -2846,7 +2846,7 @@ function GetPrefixList()
for($i=30;$i>15;$i--)
{
$prefixlist['id'][] = $i;
$prefixlist['value'][] = trans('$0 ($1 addresses)', $i, pow(2,32-$i));
$prefixlist['value'][] = trans('$a ($b addresses)', $i, pow(2,32-$i));
}

return $prefixlist;
Expand Down Expand Up @@ -3891,7 +3891,7 @@ function CheckOption($var, $value)
case 'print_balance_list_limit':
case 'networkhosts_pagelimit':
if($value<=0)
return trans('Value of option "$0" must be a number grater than zero!' ,$var);
return trans('Value of option "$a" must be a number grater than zero!' ,$var);
break;
case 'reload_type':
if($value != 'sql' && $value != 'exec')
Expand Down Expand Up @@ -4352,9 +4352,9 @@ function SendSMS($number, $message, $messageid=0)
$dir = !empty($this->CONFIG['sms']['smstools_outdir']) ? $this->CONFIG['sms']['smstools_outdir'] : '/var/spool/sms/outgoing';

if(!file_exists($dir))
return trans('SMSTools outgoing directory not exists ($0)!', $dir);
return trans('SMSTools outgoing directory not exists ($a)!', $dir);
if(!is_writable($dir))
return trans('Unable to write to SMSTools outgoing directory ($0)!', $dir);
return trans('Unable to write to SMSTools outgoing directory ($a)!', $dir);

$filename = $dir.'/lms-'.$messageid.'-'.$number;
$message = clear_utf($message);
Expand All @@ -4366,7 +4366,7 @@ function SendSMS($number, $message, $messageid=0)
fclose($fp);
}
else
return trans('Unable to create file $0!', $filename);
return trans('Unable to create file $a!', $filename);

return MSG_NEW;
break;
Expand Down

0 comments on commit c88d8a7

Please sign in to comment.