public static function get_unprocessed_image_text_file_names()
    {
        $rows = Database_FetchingHelper::get_rows_for_query(new Database_SQLSelectQuery(<<<SQL
SELECT
\tname
FROM
\thpi_trackit_stock_management_feed_files
WHERE
\tfile_type = 'TXT'
\tAND
\tprocessed is NULL
\tAND
\tname LIKE 'img_%'
SQL
));
        $cache_directory = TrackitStockManagement_CacheHelper::get_cache_directory();
        $unprocessed_image_text_file_names = array();
        foreach ($rows as $row) {
            $unprocessed_image_text_file_names[] = $cache_directory->get_name() . '/' . $row['name'];
        }
        return $unprocessed_image_text_file_names;
    }
Example #2
0
<?php

/**
 * The main .INC for the reset-trackit script.
 *
 * @copyright Robert Impey, 2008-04-23
 */
TrackitStockManagement_LockFilesHelper::unlock_all_lock_files();
TrackitStockManagement_CacheHelper::delete_all_cache_files();
/*
 * Empty the tables in the database.
 */
#Database_TableHelper::empty_table('hpi_trackit_stock_management_feed_files');
#Database_TableHelper::empty_table('hpi_trackit_stock_management_photographs');
#Database_TableHelper::empty_table('hpi_trackit_stock_management_products');
#Database_TableHelper::empty_table('hpi_trackit_stock_management_stock_levels');
TrackitStockManagement_ManagementHelper::reset_tables();
#Database_TableHelper::empty_table('hpi_shop_products');
#Database_TableHelper::empty_table('hpi_shop_product_photograph_links');
#Database_TableHelper::empty_table('hpi_shop_product_currency_prices');
Shop_ManagementHelper::reset_tables();