25 lines
669 B
PHP
25 lines
669 B
PHP
#!/usr/bin/php
|
|
<?php
|
|
|
|
//require 'vendor/autoload.php';
|
|
require("../../config/config.php");
|
|
|
|
define('FRONKDB_SQLDEBUG',false);
|
|
error_reporting(E_ALL & ~(E_NOTICE | E_STRICT | E_DEPRECATED));
|
|
|
|
require_once(LIBDIR."/mvcfronk/mfRouter/mfRouter.php");
|
|
require_once(LIBDIR."/mvcfronk/mfBase/mfBaseModel.php");
|
|
require_once(LIBDIR."/mvcfronk/mfBase/mfBaseController.php");
|
|
|
|
$me = new User(1);
|
|
|
|
foreach(ContractLinkModel::getAll() as $link) {
|
|
if($link->origin->price <= 0) continue;
|
|
|
|
if($link->contract->price < 0) {
|
|
$link->type = "credit";
|
|
$link->save();
|
|
echo "fixed link ".$link->id." origin contract ".$link->origin_contract_id."\n";
|
|
}
|
|
}
|