Удалил googleshopping

This commit is contained in:
Konstantin
2026-05-30 09:52:37 +03:00
parent 51109b7a3c
commit 2b8d4dc057
28 changed files with 0 additions and 7173 deletions
@@ -1,9 +0,0 @@
<?php
$current_dir = dirname(__FILE__);
require_once $current_dir . DIRECTORY_SEPARATOR . 'cron_functions.php';
if ($index = advertise_google_init($current_dir)) {
require_once $index;
}
@@ -1,42 +0,0 @@
<?php
function advertise_google_validate() {
if (!getenv("ADVERTISE_GOOGLE_CRON")) {
die("Not in Command Line." . PHP_EOL);
}
}
function advertise_google_chdir($current_dir) {
$root_dir = dirname(dirname(dirname($current_dir)));
chdir($root_dir);
return $root_dir;
}
function advertise_google_define_route() {
define('ADVERTISE_GOOGLE_ROUTE', 'extension/advertise/google/cron');
$_GET['route'] = ADVERTISE_GOOGLE_ROUTE;
}
function advertise_google_init($current_dir) {
// Validate environment
advertise_google_validate();
// Set up default server vars
$_SERVER["HTTP_HOST"] = getenv("CUSTOM_SERVER_NAME");
$_SERVER["SERVER_NAME"] = getenv("CUSTOM_SERVER_NAME");
$_SERVER["SERVER_PORT"] = getenv("CUSTOM_SERVER_PORT");
putenv("SERVER_NAME=" . $_SERVER["SERVER_NAME"]);
// Change root dir
$root_dir = advertise_google_chdir($current_dir);
advertise_google_define_route();
if (file_exists($root_dir . '/index.php')) {
return $root_dir . '/index.php';
}
}
@@ -1,6 +0,0 @@
<?php
namespace googleshopping\Exception;
class AccessForbidden extends \RuntimeException {
}
@@ -1,6 +0,0 @@
<?php
namespace googleshopping\Exception;
class Connection extends \RuntimeException {
}
File diff suppressed because it is too large Load Diff
@@ -1,19 +0,0 @@
<?php
namespace googleshopping;
abstract class Library {
protected $registry;
public function __construct($registry) {
$this->registry = $registry;
}
public function __get($key) {
return $this->registry->get($key);
}
public function __set($key, $value) {
$this->registry->set($key, $value);
}
}
@@ -1,55 +0,0 @@
<?php
namespace googleshopping;
/**
* Log class
*/
class Log {
private $handle;
/**
* Constructor
*
* @param string $filename
*/
public function __construct($filename, $max_size = 8388608) {
$file = DIR_LOGS . $filename;
clearstatcache(true);
if ((!file_exists($file) && !is_writable(DIR_LOGS)) || (file_exists($file) && !is_writable($file))) {
// Do nothing, as we have no permissions
return;
}
if (file_exists($file) && filesize($file) >= $max_size) {
$mode = 'wb';
} else {
$mode = 'ab';
}
$this->handle = @fopen(DIR_LOGS . $filename, $mode);
}
/**
*
*
* @param string $message
*/
public function write($message) {
if (is_resource($this->handle)) {
fwrite($this->handle, date('Y-m-d G:i:s') . ' - ' . print_r($message, true) . "\n");
}
}
/**
*
*
*/
public function __destruct() {
if (is_resource($this->handle)) {
fclose($this->handle);
}
}
}
@@ -1,11 +0,0 @@
<?php
namespace googleshopping\traits;
use \googleshopping\Googleshopping;
trait LibraryLoader {
protected function loadLibrary($store_id) {
$this->registry->set('googleshopping', new Googleshopping($this->registry, $store_id));
}
}
@@ -1,15 +0,0 @@
<?php
namespace googleshopping\traits;
trait StoreLoader {
protected function loadStore($store_id) {
$this->registry->set('setting', new \Config());
$this->load->model('setting/setting');
foreach ($this->model_setting_setting->getSetting('advertise_google', $store_id) as $key => $value) {
$this->setting->set($key, $value);
}
}
}