--- phpMyEdit.class.php 2004-01-21 22:18:46.576443200 +0100 +++ phpMyEdit.class.sqlw-recreate2.php 2004-01-22 08:44:32.869649600 +0100 @@ -242,7 +242,7 @@ ($this->moreadd == $this->labels['More'] && stristr($options, 'A')) || ($this->savechange == $this->labels['Save'] && stristr($options, 'C')) || ($this->morechange == $this->labels['Apply'] && stristr($options, 'C')) || - ($this->savechange == $this->labels['Save'] && stristr($options, 'P')) || + ($this->savecopy == $this->labels['Save'] && stristr($options, 'P')) || ($this->savedelete == $this->labels['Save'] && stristr($options, 'D')); } /* }}} */ @@ -1576,6 +1576,7 @@ echo 'navop=',$this->navop,' '; echo 'saveadd=',$this->saveadd,' '; echo 'moreadd=',$this->moreadd,' '; + echo 'savecopy=',$this->savecopy,' '; echo 'canceladd=',$this->canceladd,' '; echo 'savechange=',$this->savechange,' '; echo 'morechange=',$this->morechange,' '; @@ -1669,7 +1670,7 @@ echo $this->htmlSubmit('moreadd', 'More', $this->getCSSclass('more', $position), true), ' '; echo $this->htmlSubmit('canceladd', 'Cancel', $this->getCSSclass('cancel', $position), false); } elseif ($this->copy_operation()) { - echo $this->htmlSubmit('saveadd', 'Save', $this->getCSSclass('save', $position), true), ' '; + echo $this->htmlSubmit('savecopy', 'Save', $this->getCSSclass('save', $position), true), ' '; echo $this->htmlSubmit('canceladd', 'Cancel', $this->getCSSclass('cancel', $position), false); } elseif ($this->delete_operation()) { echo $this->htmlSubmit('savedelete', 'Delete', $this->getCSSclass('save', $position), true), ' '; @@ -2597,9 +2598,9 @@ $this->filter_operation() && $this->page_type = 'F'; $this->view_operation() && $this->page_type = 'V'; $this->delete_operation() && $this->page_type = 'D'; - $this->add_operation() && $this->page_type = 'A'; - $this->change_operation() && $this->page_type = 'C'; - $this->copy_operation() && $this->page_type = 'P'; + ($this->add_operation() || $this->saveadd == $this->labels['Save'] || $this->moreadd == $this->labels['More']) && $this->page_type = 'A'; + ($this->change_operation() || $this->savechange == $this->labels['Save'] || $this->morechange == $this->labels['Apply']) && $this->page_type = 'C'; + ($this->copy_operation() || $this->savecopy == $this->labels['Save']) && $this->page_type = 'P'; // Restore backups (if exists) foreach (array_keys($this->fdd) as $column) { foreach (array_keys($this->fdd[$column]) as $col_option) { @@ -2782,8 +2783,11 @@ * a save button during Pass 2 * ====================================================================== */ - if ($this->saveadd == $this->labels['Save']) { + if ($this->saveadd == $this->labels['Save'] || $this->savecopy == $this->labels['Save']) { $this->add_enabled() && $this->do_add_record(); + unset($this->saveadd); + unset($this->savecopy); + $this->recreate_fdd(); } elseif ($this->moreadd == $this->labels['More']) { $this->add_enabled() && $this->do_add_record(); @@ -2793,6 +2797,8 @@ } elseif ($this->savechange == $this->labels['Save']) { $this->change_enabled() && $this->do_change_record(); + unset($this->savechange); + $this->recreate_fdd(); } elseif ($this->morechange == $this->labels['Apply']) { $this->change_enabled() && $this->do_change_record(); @@ -2929,6 +2935,7 @@ $this->operation = $this->get_cgi_var('operation'); $this->saveadd = $this->get_cgi_var('saveadd'); $this->moreadd = $this->get_cgi_var('moreadd'); + $this->savecopy = $this->get_cgi_var('savecopy'); $this->canceladd = $this->get_cgi_var('canceladd'); $this->savechange = $this->get_cgi_var('savechange'); $this->morechange = $this->get_cgi_var('morechange');