1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00

Bug fixes

This commit is contained in:
Hillel Coren 2014-03-19 20:54:27 +02:00
parent a43de0eb6b
commit 6876edc510
4 changed files with 30 additions and 55 deletions

View File

@ -46,7 +46,7 @@ class HomeController extends BaseController {
'text' => $message
];
$this->mailer->sendTo('contact@invoiceninja.com', 'contact@invoiceninja.com', 'Invoice Ninja Feedback', 'contact', $data);
$this->mailer->sendTo(CONTACT_EMAIL, CONTACT_EMAIL, 'Invoice Ninja Feedback', 'contact', $data);
Session::flash('message', 'Successfully sent message');
return Redirect::to('/contact');

View File

@ -5,21 +5,7 @@ class UserTableSeeder extends Seeder
public function run()
{
//DB::table('users')->delete();
/*
$account = Account::create(array(
'name' => 'Acme Inc',
));
$user = User::create(array(
'account_id' => $account->id,
'first_name' => 'Hillel',
'last_name' => 'Coren',
'email' => 'hillelcoren@gmail.com',
'password' => Hash::make('1234'),
));
*/
}
}

View File

@ -22,37 +22,6 @@
//dd(gethostname());
//Log::error('test');
/*
Event::listen('illuminate.query', function($query, $bindings, $time, $name)
{
$data = compact('bindings', 'time', 'name');
// Format binding data for sql insertion
foreach ($bindings as $i => $binding)
{
if ($binding instanceof \DateTime)
{
$bindings[$i] = $binding->format('\'Y-m-d H:i:s\'');
}
else if (is_string($binding))
{
$bindings[$i] = "'$binding'";
}
}
// Insert bindings into query
$query = str_replace(array('%', '?'), array('%%', '%s'), $query);
$query = vsprintf($query, $bindings);
Log::info($query, $data);
});
*/
/*
Route::get('/send_emails', function() {
Artisan::call('ninja:send-invoices');
});
*/
Route::get('/', 'HomeController@showWelcome');
Route::get('/rocksteady', 'HomeController@showWelcome');
@ -257,7 +226,7 @@ define('DEFAULT_CURRENCY', 1); // US Dollar
define('DEFAULT_DATE_FORMAT', 'M j, Y');
define('DEFAULT_DATE_PICKER_FORMAT', 'M d, yyyy');
define('DEFAULT_DATETIME_FORMAT', 'F j, Y, g:i a');
define('DEFAULT_QUERY_CACHE', 120);
define('DEFAULT_QUERY_CACHE', 120); // minutes
define('GATEWAY_PAYPAL_EXPRESS', 17);
@ -267,7 +236,6 @@ if (Auth::check() && !Session::has(SESSION_TIMEZONE))
Event::fire('user.refresh');
}
Validator::extend('positive', function($attribute, $value, $parameters)
{
return Utils::parseFloat($value) > 0;
@ -282,4 +250,31 @@ Validator::extend('has_credit', function($attribute, $value, $parameters)
$credit = $client->getTotalCredit();
return $credit >= $amount;
});
});
/*
Event::listen('illuminate.query', function($query, $bindings, $time, $name)
{
$data = compact('bindings', 'time', 'name');
// Format binding data for sql insertion
foreach ($bindings as $i => $binding)
{
if ($binding instanceof \DateTime)
{
$bindings[$i] = $binding->format('\'Y-m-d H:i:s\'');
}
else if (is_string($binding))
{
$bindings[$i] = "'$binding'";
}
}
// Insert bindings into query
$query = str_replace(array('%', '?'), array('%%', '%s'), $query);
$query = vsprintf($query, $bindings);
Log::info($query, $data);
});
*/

View File

@ -55,12 +55,6 @@
ga('create', 'UA-46031341-1');
ga('send', 'pageview');
</script>
@else
<style>
.navbar {
background-color: #006600 !important;
}
</style>
@endif
@yield('body')