Update gettext : add spaces
DomCi : remove line too longs on all the files git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5280 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
35
mail.php
35
mail.php
@@ -109,7 +109,7 @@ class mail
|
||||
private function sectionAddChild ($sectionIDParent, $sectionIDchild)
|
||||
{
|
||||
if (! array_key_exists ($sectionIDParent, $this->sections))
|
||||
throw new \Exception (dgettext("domframework",
|
||||
throw new \Exception (dgettext ("domframework",
|
||||
"Section parent not found"), 404);
|
||||
$this->sections[$sectionIDParent]["_partsIDchild"][] = $sectionIDchild;
|
||||
$this->sections[$sectionIDchild]["_parentID"] = $sectionIDParent;
|
||||
@@ -122,7 +122,7 @@ class mail
|
||||
private function sectionAddChildFirst ($sectionIDParent, $sectionIDchild)
|
||||
{
|
||||
if (! array_key_exists ($sectionIDParent, $this->sections))
|
||||
throw new \Exception (dgettext("domframework",
|
||||
throw new \Exception (dgettext ("domframework",
|
||||
"Section parent not found"), 404);
|
||||
array_unshift ($this->sections[$sectionIDParent]["_partsIDchild"],
|
||||
$sectionIDchild);
|
||||
@@ -136,7 +136,7 @@ class mail
|
||||
private function sectionDelChilds ($sectionID)
|
||||
{
|
||||
if (! array_key_exists ($sectionID, $this->sections))
|
||||
throw new \Exception (dgettext("domframework",
|
||||
throw new \Exception (dgettext ("domframework",
|
||||
"Section not found"), 404);
|
||||
unset ($this->sections[$sectionID]["_partsIDchild"]);
|
||||
}
|
||||
@@ -148,9 +148,10 @@ class mail
|
||||
private function sectionUpdate ($sectionID, $param)
|
||||
{
|
||||
if (! array_key_exists ($sectionID, $this->sections))
|
||||
throw new \Exception (dgettext("domframework", "Section not found"), 404);
|
||||
throw new \Exception (dgettext ("domframework", "Section not found"),
|
||||
404);
|
||||
if (! is_array ($param))
|
||||
throw new \Exception (dgettext("domframework",
|
||||
throw new \Exception (dgettext ("domframework",
|
||||
"Param provided to sectionUpdate is not array"), 406);
|
||||
foreach ($param as $key=>$val)
|
||||
{
|
||||
@@ -189,7 +190,7 @@ class mail
|
||||
private function sectionGet ($sectionID)
|
||||
{
|
||||
if (! array_key_exists ($sectionID, $this->sections))
|
||||
throw new \Exception (dgettext("domframework",
|
||||
throw new \Exception (dgettext ("domframework",
|
||||
"Section not found"), 404);
|
||||
return $this->sections[$sectionID];
|
||||
}
|
||||
@@ -264,7 +265,7 @@ class mail
|
||||
$boundaryCR = array_shift ($boundaryArray);
|
||||
}
|
||||
if ($boundary === false)
|
||||
throw new \Exception (dgettext("domframework",
|
||||
throw new \Exception (dgettext ("domframework",
|
||||
"Can't find boundary in multipart/"), 406);
|
||||
$boundary = substr ($boundary, 2);
|
||||
unset ($boundaryArray);
|
||||
@@ -433,10 +434,10 @@ class mail
|
||||
public function __construct ()
|
||||
{
|
||||
if (! function_exists ("finfo_buffer"))
|
||||
throw new \Exception (dgettext("domframework",
|
||||
throw new \Exception (dgettext ("domframework",
|
||||
"Missing FileInfo PHP Extension"), 500);
|
||||
if (! function_exists ("openssl_random_pseudo_bytes"))
|
||||
throw new \Exception (dgettext("domframework",
|
||||
throw new \Exception (dgettext ("domframework",
|
||||
"Missing OpenSSL PHP Extension"), 500);
|
||||
// Define default headers
|
||||
$this->addHeader ("Date", date ("r"));
|
||||
@@ -532,7 +533,7 @@ class mail
|
||||
if ($sectionIDtoChange === "")
|
||||
{
|
||||
// No existing section found : need to create one
|
||||
throw new \Exception (dgettext("domframework",
|
||||
throw new \Exception (dgettext ("domframework",
|
||||
"Can't find the place to store the HTML"), 500);
|
||||
}
|
||||
$htmlContent = iconv ("utf-8", $charset, $htmlContent);
|
||||
@@ -618,7 +619,7 @@ class mail
|
||||
if ($sectionIDtoChange === "")
|
||||
{
|
||||
// No existing section found : need to create one
|
||||
throw new \Exception (dgettext("domframework",
|
||||
throw new \Exception (dgettext ("domframework",
|
||||
"Can't find the place to store the TEXT"), 500);
|
||||
}
|
||||
$textContent = iconv ("utf-8", $charset, $textContent);
|
||||
@@ -875,7 +876,7 @@ class mail
|
||||
{
|
||||
$attachmentIDs = $this->getAttachmentID ($inline);
|
||||
if (! array_key_exists ($number, $attachmentIDs))
|
||||
throw new \Exception (sprintf (dgettext("domframework",
|
||||
throw new \Exception (sprintf (dgettext ("domframework",
|
||||
"Attachment '%d' not found"), $number), 404);
|
||||
$part = $this->sectionGet ($attachmentIDs[$number]);
|
||||
$encoding = $this->getHeaderValue ("Content-Transfer-Encoding",
|
||||
@@ -892,7 +893,7 @@ class mail
|
||||
{
|
||||
$attachmentIDs = $this->getAttachmentID ($inline);
|
||||
if (! array_key_exists ($number, $attachmentIDs))
|
||||
throw new \Exception (sprintf (dgettext("domframework",
|
||||
throw new \Exception (sprintf (dgettext ("domframework",
|
||||
"Attachment '%d' not found"), $number), 404);
|
||||
$part = $this->sectionGet ($attachmentIDs[$number]);
|
||||
foreach ($part as $key=>$val)
|
||||
@@ -1428,7 +1429,7 @@ class mail
|
||||
return chunk_split ($content);
|
||||
}
|
||||
throw new \Exception (sprintf (
|
||||
dgettext("domframework",
|
||||
dgettext ("domframework",
|
||||
"Invalid encoding provided to encodingEncode : %s"), $encoding), 500);
|
||||
}
|
||||
|
||||
@@ -1447,7 +1448,7 @@ class mail
|
||||
elseif ($encoding === "8bit" || $encoding === "7bit" || $encoding === false)
|
||||
return $content;
|
||||
throw new \Exception (sprintf (
|
||||
dgettext("domframework",
|
||||
dgettext ("domframework",
|
||||
"Invalid encoding provided to encodingDecode : '%s'"), $encoding), 500);
|
||||
}
|
||||
|
||||
@@ -1468,7 +1469,7 @@ class mail
|
||||
elseif ($encoding === "base64")
|
||||
$prefs["scheme"] = "B";
|
||||
else
|
||||
throw new \Exception (dgettext("domframework",
|
||||
throw new \Exception (dgettext ("domframework",
|
||||
"Invalid encoding provided to encodeHeaders"), 500);
|
||||
return substr (iconv_mime_encode ($header, $content, $prefs),
|
||||
strlen ($header)+2);
|
||||
@@ -1503,7 +1504,7 @@ class mail
|
||||
elseif ($encoding === "base64")
|
||||
$prefs["scheme"] = "B";
|
||||
else
|
||||
throw new \Exception (dgettext("domframework",
|
||||
throw new \Exception (dgettext ("domframework",
|
||||
"Invalid encoding provided to encodeHeaderStringWithPosition"), 500);
|
||||
return substr (iconv_mime_encode (str_repeat (" ", $blanks), $content,
|
||||
$prefs),
|
||||
|
||||
Reference in New Issue
Block a user