Skip to content

Commit

Permalink
PHP4 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Anatoliy Chakkaev committed Nov 19, 2009
1 parent f7da039 commit 7c5124b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
7 changes: 7 additions & 0 deletions httpdocs/model/orm.inc
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@ class db_entity {
return $this->table_info;
}

function on_before_save() {
return true;
}

function on_after_create() {
return true;
}
}

class universal_entity extends db_entity {
Expand Down
1 change: 1 addition & 0 deletions httpdocs/view/outlay.form.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function category_changed(select_category) {
<div class="field">
<label for="field_outlay_category_id">Категория расхода</label>
<select id="field_outlay_category_id" name="outlay_category_id" tabindex="1" onchange="category_changed(this);">
<option value="-1">Выберите категорию расхода</option>
{foreach from=$outlay_categories item=category key=id}
<option value="{$id}" {if $outlay->outlay_category_id == $id}selected{/if}>{$category}</option>
{/foreach}
Expand Down
2 changes: 1 addition & 1 deletion system/common_ctls.inc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class crud_ctl extends std_ctl {
$this->tpl->add('pk', $this->entity_id);

$view_name = $this->view_prefix . $this->table . '.' . $this->screen;
if ($this->tpl->view_defined($view_name)) {
if ($this->tpl->view_defined($view_name, $checked_files)) {
$this->tpl->view($view_name);
} else {
$this->tpl->add('custom_view', $view_name);
Expand Down
5 changes: 1 addition & 4 deletions system/template.inc
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,9 @@ class Template {

}

function view_defined($view = '', &$checked_files = null) {
function view_defined($view = '', &$checked_files) {
global $format;
$v = $view ? $view : $this->_view;
if (is_null($checked_files)) {
$checked_files = array();
}
$base_name = config('template_dir') . '/' . $v;

$found = '';
Expand Down

0 comments on commit 7c5124b

Please sign in to comment.