* @author  Daniel Simmons <*****@*****.**>
* @version $Revision: 1.18 $
* @package MySource_Matrix
*/
error_reporting(E_ALL);
if (ini_get('memory_limit') != '-1') {
    ini_set('memory_limit', '-1');
}
if (php_sapi_name() != 'cli') {
    trigger_error("You can only run this script from the command line\n", E_USER_ERROR);
}
//end if
$config = array();
define('LOG_FILE_NAME', 'update_lookups.log');
// Get config from command line args.
process_args($config);
require_once $config['system_root'] . '/core/include/init.inc';
require_once SQ_INCLUDE_PATH . '/assertions.inc';
define('LOG_FILE', SQ_SYSTEM_ROOT . '/data/private/logs/' . LOG_FILE_NAME);
// This is the log file
define('SYNCH_FILE', SQ_TEMP_PATH . '/update_lookups.assetid');
// We need this file to store the assetids
if (empty($config['assetids'])) {
    // We are running the script over the whole system
    $rootnodes = $GLOBALS['SQ_SYSTEM']->am->getTypeAssetids('site', FALSE);
} else {
    // Replace space with empty string
    $assetids = preg_replace('/[\\s]*/', '', $config['assetids']);
    // Explode them so we have the list in array
    $rootnodes = getRootNodes($assetids);
}
Example #2
0
                    $o[substr($a, 1, 1)] = substr($a, 3);
                } else {
                    foreach (str_split(substr($a, 1)) as $k) {
                        if (!isset($o[$k])) {
                            $o[$k] = true;
                        }
                    }
                }
            } else {
                $o[] = $a;
            }
        }
    }
    return $o;
}
$args = process_args($argv);
/* Get the path to the config file.
The config file is required to include the Bundler class */
if (isset($args['config'])) {
    $config_path = $args['config'];
} else {
    $config_path = dirname(__FILE__) . '/../config.php';
    if (!file_exists($config_path)) {
        $config_path = './config.php';
    }
    if (!file_exists($config_path)) {
        $config_path = '../config.php';
    }
}
require_once $config_path;
if (!class_exists('Bundler')) {