* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ define('SF_ROOT_DIR', realpath(dirname(__FILE__) . '/..')); define('SF_APP', 'fe'); define('SF_ENVIRONMENT', 'prod'); define('SF_DEBUG', false); require_once SF_ROOT_DIR . DIRECTORY_SEPARATOR . 'apps' . DIRECTORY_SEPARATOR . SF_APP . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php'; sfContext::getInstance(); require_once "batch/get_args_options.php"; $args = arguments($argv); $argv = $args['input']; $argc = count($argv); if (array_key_exists('deleteAll', $args)) { OppSimilaritaPeer::doDeleteAll(); print "rimosse tutte le informazioni di similarita\n"; exit; } # controllo sintassi if ($argc < 2) { print "sintassi: php batch/updateSimilaritaForVotes C|S NLEG [--deleteAll]\n"; print " C|S - (C)amera o (S)enato\n"; print " NLEG - 15, 16\n"; exit; } $ramo = $argv[1]; if ($ramo != 'C' && $ramo != 'S') { print "specificare C o S per il ramo (Camera o Senato) \n"; exit; }