Skip to content

Commit

Permalink
Upgraded to match Kohana 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
lillem4n committed Nov 12, 2011
1 parent 0f51cb3 commit 0de6b5e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion classes/controller/admin/bills.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ public function action_new_bill()
xml::to_XML($_SESSION['bills'], $this->xml_content);
}

public function action_mark_as_paid($details)
public function action_mark_as_paid()
{
$details = $this->request->param('options');

list($bill_id, $pay_date) = explode('/', $details);

$bill = new bill($bill_id);
Expand Down
4 changes: 3 additions & 1 deletion classes/controller/admin/customers.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ public function action_add_customer()
}
}

public function action_edit_customer($customer_id)
public function action_edit_customer()
{
$customer_id = $this->request->param('options');

$customer_model = new Customer($customer_id);

xml::to_XML(array('customer' => $customer_model->get_customer_data()), $this->xml_content, NULL, 'id');
Expand Down
2 changes: 0 additions & 2 deletions classes/controller/admin/wages.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ public function action_payout()
if (isset($errors['amount'])) $this->add_form_errors(array('amount'=>'Must be numbers ONLY'));

}


}
}

Expand Down
2 changes: 1 addition & 1 deletion classes/model/employee.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function get($detail = FALSE)
$age = $current_year - $born_year;
$this->employee['soc_fee_level'] = 0; // Initial setting, will change if any matches are found further down

foreach (Kohana::config('larv.soc_fee_levels') as $level_data)
foreach (Kohana::$config->load('larv.soc_fee_levels') as $level_data)
{
if ($level_data['start_age'] <= $age && $level_data['end_age'] >= $age) $this->employee['soc_fee_level'] = $level_data['level'];
}
Expand Down
2 changes: 1 addition & 1 deletion init.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
if ( ! is_dir(APPPATH.'user_content/pdf')) mkdir(APPPATH.'user_content/pdf');

$pdo = Kohana_pdo::instance('default');
$column_name = 'Tables_in_'.Kohana::config('pdo.default.database_name');
$column_name = 'Tables_in_'.Kohana::$config->load('pdo.default.database_name');
$columns = $pdo->query('
SHOW TABLES
WHERE
Expand Down
2 changes: 1 addition & 1 deletion xsl/admin/bills.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</td>
<td><a href="http://{root/meta/domain}{/root/meta/base}{concat('user_content/pdf/bill_',@id,'.pdf')}">Link</a></td>
<td>
<xsl:text>[</xsl:text><a href="http://{root/meta/domain}{/root/meta/base}bill?billnr={@id}">Details</a><xsl:text>]</xsl:text>
<xsl:text>[</xsl:text><a href="http://{/root/meta/domain}{/root/meta/base}bill?billnr={@id}">Details</a><xsl:text>]</xsl:text>
<xsl:if test="paid_date = ''">
<xsl:text>[</xsl:text><a href="bills/mark_as_paid/{@id}/{/root/meta/current_date}" class="paylink" id="paylink_{@id}">Mark as paid</a><xsl:text>]</xsl:text>
</xsl:if>
Expand Down

0 comments on commit 0de6b5e

Please sign in to comment.