42 lines
881 B
PHP
42 lines
881 B
PHP
<?php
|
|
|
|
namespace HermannTelser\Gutachten\DB\Update;
|
|
|
|
use HermannTelser\Gutachten\DB\DbFunction;
|
|
use HermannTelser\Gutachten\DB\Select;
|
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
|
|
class UpdateMethod
|
|
{
|
|
/**
|
|
* @param mixed $rowid
|
|
*
|
|
* @return bool
|
|
*/
|
|
public static function update()
|
|
{
|
|
// DbFunction::$debug = 1;
|
|
|
|
$field = GeneralUtility::_GP('field');
|
|
$value = GeneralUtility::_GP('value');
|
|
$rowid = GeneralUtility::_GP('rowid');
|
|
|
|
|
|
$update_array = [];
|
|
switch($field){
|
|
case "factor";
|
|
$update_array['factor'] = str_replace(',', '.', $value);
|
|
break;
|
|
case "raumart_id":
|
|
$update_array['tt_raumart_id'] =(int) $value;
|
|
break;
|
|
default:
|
|
exit;
|
|
}
|
|
|
|
DbFunction::secureUpdate("tx_gutachten_raume_generell", $update_array, ['id' => $rowid]);
|
|
|
|
DbFunction::$projektid = DbFunction::get("tx_gutachten_raume_generell", "pid", ['id' => $rowid]);
|
|
}
|
|
}
|