From 68fc9e55e538e03f94509731ab41a0c8cf96710f Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Mon, 17 Apr 2023 12:12:22 +0300 Subject: setup a real server environment (apache DocumentRoot=/var/www/public) --- html/app/controllers/cli/CliContoller.php | 85 ------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 html/app/controllers/cli/CliContoller.php (limited to 'html/app/controllers/cli') diff --git a/html/app/controllers/cli/CliContoller.php b/html/app/controllers/cli/CliContoller.php deleted file mode 100644 index 310e2ae..0000000 --- a/html/app/controllers/cli/CliContoller.php +++ /dev/null @@ -1,85 +0,0 @@ -runQuery( - "SELECT * FROM product_categories", - [] - ); - } - - - - /** (re-) cacheCategoryByUrl( url ) - * regenerate cache of a category_product - * by category's friendly url - * @param $url (string): the category's friendly url - */ - public static function cacheCategoryByUrl(string $url) - { - // Only Cli interface is allowed - if (php_sapi_name() != 'cli') return false; - - # PROXY call: - # MARKET \ ProductCategories_model::tree(): - # + Refresh Cache - # -------------------------------------- - $reply = proxy( - [\app\models\market\ProductCategories_model::class, 'categoryFromUrl'], - [ $url ], \CACHE_CATEGORY_TTL, - \PROXY_IGNORE_CACHE - ); - echo ($reply == false) ? textColor("Failed\n", \FAIL) : textColor("Done!\n", \SUCCESS); - } -} \ No newline at end of file -- cgit v1.2.3