summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/core/Loader.php29
-rw-r--r--system/libraries/Email.php38
-rw-r--r--user_guide/changelog.html3
-rw-r--r--user_guide/libraries/table.html10
4 files changed, 47 insertions, 33 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 136cae9bf..225b43912 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -870,15 +870,28 @@ class CI_Loader {
// Is there an associated config file for this class? Note: these should always be lowercase
if ($config === NULL)
{
- // We test for both uppercase and lowercase, for servers that
- // are case-sensitive with regard to file names
- if (file_exists(APPPATH.'config/'.strtolower($class).EXT))
- {
- include_once(APPPATH.'config/'.strtolower($class).EXT);
- }
- elseif (file_exists(APPPATH.'config/'.ucfirst(strtolower($class)).EXT))
+ // Fetch the config paths containing any package paths
+ $config_component = $this->_ci_get_component('config');
+
+ if (is_array($config_component->_config_paths))
{
- include_once(APPPATH.'config/'.ucfirst(strtolower($class)).EXT);
+ // Break on the first found file, thus package files
+ // are not overridden by default paths
+ foreach ($config_component->_config_paths as $path)
+ {
+ // We test for both uppercase and lowercase, for servers that
+ // are case-sensitive with regard to file names
+ if (file_exists($path .'config/'.strtolower($class).EXT))
+ {
+ include_once($path .'config/'.strtolower($class).EXT);
+ break;
+ }
+ elseif (file_exists($path .'config/'.ucfirst(strtolower($class)).EXT))
+ {
+ include_once($path .'config/'.ucfirst(strtolower($class)).EXT);
+ break;
+ }
+ }
}
}
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 0a0d6c287..cda902593 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -108,7 +108,6 @@ class CI_Email {
*/
function initialize($config = array())
{
- $this->clear();
foreach ($config as $key => $val)
{
if (isset($this->$key))
@@ -125,6 +124,7 @@ class CI_Email {
}
}
}
+ $this->clear();
$this->_smtp_auth = ($this->smtp_user == '' AND $this->smtp_pass == '') ? FALSE : TRUE;
$this->_safe_mode = ((boolean)@ini_get("safe_mode") === FALSE) ? FALSE : TRUE;
@@ -160,7 +160,7 @@ class CI_Email {
$this->_attach_type = array();
$this->_attach_disp = array();
}
-
+
return $this;
}
@@ -203,7 +203,7 @@ class CI_Email {
$this->_set_header('From', $name.' <'.$from.'>');
$this->_set_header('Return-Path', '<'.$from.'>');
-
+
return $this;
}
@@ -278,7 +278,7 @@ class CI_Email {
case 'mail' : $this->_recipients = implode(", ", $to);
break;
}
-
+
return $this;
}
@@ -307,7 +307,7 @@ class CI_Email {
{
$this->_cc_array = $cc;
}
-
+
return $this;
}
@@ -345,7 +345,7 @@ class CI_Email {
{
$this->_set_header('Bcc', implode(", ", $bcc));
}
-
+
return $this;
}
@@ -543,7 +543,7 @@ class CI_Email {
}
$this->newline = $newline;
-
+
return $this;
}
@@ -565,7 +565,7 @@ class CI_Email {
}
$this->crlf = $crlf;
-
+
return $this;
}
@@ -1023,7 +1023,7 @@ class CI_Email {
{
$this->_finalbody = $hdr . $this->newline . $this->newline . $this->_body;
}
-
+
return;
break;
@@ -1048,10 +1048,10 @@ class CI_Email {
$body .= "Content-Type: text/html; charset=" . $this->charset . $this->newline;
$body .= "Content-Transfer-Encoding: quoted-printable" . $this->newline . $this->newline;
}
-
+
$this->_finalbody = $body . $this->_prep_quoted_printable($this->_body) . $this->newline . $this->newline;
-
-
+
+
if ($this->_get_protocol() == 'mail')
{
$this->_header_str .= $hdr;
@@ -1077,8 +1077,8 @@ class CI_Email {
if ($this->_get_protocol() == 'mail')
{
$this->_header_str .= $hdr;
- }
-
+ }
+
$body .= $this->_get_mime_message() . $this->newline . $this->newline;
$body .= "--" . $this->_atc_boundary . $this->newline;
@@ -1091,7 +1091,7 @@ class CI_Email {
case 'html-attach' :
$hdr .= "Content-Type: multipart/".$this->multipart."; boundary=\"" . $this->_atc_boundary."\"" . $this->newline . $this->newline;
-
+
if ($this->_get_protocol() == 'mail')
{
$this->_header_str .= $hdr;
@@ -1152,7 +1152,7 @@ class CI_Email {
}
$body .= implode($this->newline, $attachment).$this->newline."--".$this->_atc_boundary."--";
-
+
if ($this->_get_protocol() == 'mail')
{
@@ -1162,7 +1162,7 @@ class CI_Email {
{
$this->_finalbody = $hdr . $body;
}
-
+
return;
}
@@ -1533,7 +1533,7 @@ class CI_Email {
{
// most documentation of sendmail using the "-f" flag lacks a space after it, however
// we've encountered servers that seem to require it to be in place.
-
+
if ( ! mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str, "-f ".$this->clean_email($this->_headers['From'])))
{
return FALSE;
@@ -1567,7 +1567,7 @@ class CI_Email {
fputs($fp, $this->_finalbody);
$status = pclose($fp);
-
+
if (version_compare(PHP_VERSION, '4.2.3') == -1)
{
$status = $status >> 8 & 0xFF;
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 30734a835..09efc5434 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -171,6 +171,7 @@ Hg Tag: </p>
<h3>Bug fixes for 2.0.0</h3>
<ul>
+ <li>Fixed a bug where you could not change the User-Agent when sending email.</li>
<li>Fixed a bug where the Output class would send incorrect cached output for controllers implementing their own <dfn>_output()</dfn> method.</li>
<li>Fixed a bug where a failed query would not have a saved query execution time causing errors in the Profiler</li>
<li>Fixed a bug that was writing log entries when multiple identical helpers and plugins were loaded.</li>
@@ -750,7 +751,7 @@ Hg Tag: 1.6.1</p>
</ul>
</li>
-
+
<li>Documentation Changes
<ul>
<li>Added <a href="./doc_style/index.html">Writing Documentation</a> section for the community to use in writing their own documentation.</li>
diff --git a/user_guide/libraries/table.html b/user_guide/libraries/table.html
index 574110807..094d7aac6 100644
--- a/user_guide/libraries/table.html
+++ b/user_guide/libraries/table.html
@@ -4,12 +4,12 @@
<title>CodeIgniter User Guide : HTML Table Class</title>
-<link rel='stylesheet' type='text/css' media='all' href='http://codeigniter.com/user_guide/userguide.css' />
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
-<script type="text/javascript" src="http://codeigniter.com/user_guide/nav/nav.js"></script>
-<script type="text/javascript" src="http://codeigniter.com/user_guide/nav/prototype.lite.js"></script>
-<script type="text/javascript" src="http://codeigniter.com/user_guide/nav/moo.fx.js"></script>
-<script type="text/javascript" src="http://codeigniter.com/user_guide/nav/user_guide_menu.js"></script>
+<script type="text/javascript" src="../nav/nav.js"></script>
+<script type="text/javascript" src="../nav/prototype.lite.js"></script>
+<script type="text/javascript" src="../nav/moo.fx.js"></script>
+<script type="text/javascript" src="../nav/user_guide_menu.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv='expires' content='-1' />