bug fixes

This commit is contained in:
vagrant 2014-01-07 15:50:41 +00:00
parent 6999a6501d
commit 92fc701f04
10 changed files with 15 additions and 5 deletions

1
.gitignore vendored
View File

@ -7,6 +7,7 @@
/public/build
/public/vendor
/bootstrap/compiled.php
/bootstrap/environment.php
/vendor
composer.phar
.DS_Store

0
app/config/gae-development/database.php Normal file → Executable file
View File

0
app/config/gae-production/cache.php Normal file → Executable file
View File

0
app/config/gae-production/database.php Normal file → Executable file
View File

0
app/config/gae-production/session.php Normal file → Executable file
View File

View File

@ -21,7 +21,7 @@ class ContactMailer extends Mailer {
$data = array('link' => URL::to('view') . '/' . $invitation->invitation_key);
$this->sendTo($invitation->contact->email, $subject, $view, $data);
$this->sendTo($invitation->contact->email, $invitation->user->email, $subject, $view, $data);
Activity::emailInvoice($invitation);
}

View File

@ -4,16 +4,16 @@ use Mail;
abstract class Mailer {
public function sendTo($email, $subject, $view, $data = [])
public function sendTo($toEmail, $fromEmail, $subject, $view, $data = [])
{
$views = [
'html' => 'emails.'.$view.'_html',
'text' => 'emails.'.$view.'_text'
];
Mail::queue($views, $data, function($message) use ($email, $subject)
Mail::queue($views, $data, function($message) use ($toEmail, $fromEmail, $subject)
{
$message->to($email)->subject($subject);
$message->to($toEmail)->replyTo($fromEmail)->subject($subject);
});
}
}

View File

@ -18,6 +18,6 @@ class UserMailer extends Mailer {
$data = [];
$subject = 'Notification - Invoice ' . $type;
$this->sendTo($user->email, $subject, $view, $data);
$this->sendTo($user->email, CONTACT_EMAIL, $subject, $view, $data);
}
}

View File

@ -131,6 +131,7 @@ HTML::macro('image_data', function($imagePath) {
});
define('CONTACT_EMAIL', 'contact@invoiceninja.com')
define("ENV_DEVELOPMENT", "local");
define("ENV_STAGING", "staging");

View File

@ -61,9 +61,17 @@ $app = new Illuminate\Foundation\Application;
*/
$env = $app->detectEnvironment(function ()
{
return require __DIR__.'/environment.php';
});
/*
$env = $app->detectEnvironment(function () {
return isset($_SERVER['LARAVEL_ENV']) ? $_SERVER['LARAVEL_ENV'] : 'development';
});
*/
/*
$env = $app->detectEnvironment(array(