403Webshell
Server IP : 46.105.57.169  /  Your IP : 216.73.217.35
Web Server : Apache
System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : verseaumee ( 152031)
PHP Version : 8.5.7
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/verseaumee/123click/assets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/verseaumee/123click/assets/privacy.tar
consents/consents.php000064400000002776150752335420010767 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Privacy.consents
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('PrivacyPlugin', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/plugin.php');

/**
 * Privacy plugin managing Joomla user consent data
 *
 * @since  3.9.0
 */
class PlgPrivacyConsents extends PrivacyPlugin
{
	/**
	 * Processes an export request for Joomla core user consent data
	 *
	 * This event will collect data for the core `#__privacy_consents` table
	 *
	 * @param   PrivacyTableRequest  $request  The request record being processed
	 * @param   JUser                $user     The user account associated with this request if available
	 *
	 * @return  PrivacyExportDomain[]
	 *
	 * @since   3.9.0
	 */
	public function onPrivacyExportRequest(PrivacyTableRequest $request, JUser $user = null)
	{
		if (!$user)
		{
			return array();
		}

		$domain    = $this->createDomain('consents', 'joomla_consent_data');

		$query = $this->db->getQuery(true)
			->select('*')
			->from($this->db->quoteName('#__privacy_consents'))
			->where($this->db->quoteName('user_id') . ' = ' . (int) $user->id)
			->order($this->db->quoteName('created') . ' ASC');

		$items = $this->db->setQuery($query)->loadAssocList();

		foreach ($items as $item)
		{
			$domain->addItem($this->createItemFromArray($item));
		}

		return array($domain);
	}
}
consents/consents.xml000064400000001452150752335420010766 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.9" type="plugin" group="privacy" method="upgrade">
	<name>plg_privacy_consents</name>
	<author>Joomla! Project</author>
	<creationDate>July 2018</creationDate>
	<copyright>(C) 2005 - 2019 Open Source Matters. All rights reserved.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.9.0</version>
	<description>PLG_PRIVACY_CONSENTS_XML_DESCRIPTION</description>
	<files>
		<filename plugin="consents">consents.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_privacy_consents.ini</language>
		<language tag="en-GB">en-GB.plg_privacy_consents.sys.ini</language>
	</languages>
</extension>
solidres/language/en-GB/en-GB.plg_privacy_solidres.sys.ini000060400000000241150752335420017472 0ustar00PLG_PRIVACY_SOLIDRES="Privacy - Solidres"
PLG_PRIVACY_SOLIDRES_XML_DESCRIPTION="Responsible for processing privacy related requests for the Solidres user data."
solidres/language/en-GB/en-GB.plg_privacy_solidres.ini000060400000000701150752335420016656 0ustar00PLG_PRIVACY_SOLIDRES="Privacy - Solidres"
PLG_PRIVACY_SOLIDRES_XML_DESCRIPTION="Responsible for processing privacy related requests for the Solidres user data."
PLG_PRIVACY_SOLIDRES_ERR_ADMIN_USER="You are not allowed to delete the information of a Solidres admin user"
PLG_PRIVACY_SOLIDRES_ACTIONS_1="All your Solidres data (reservation, invoice, property, experience, feedback...) will be pseudonymised to something like anonymous123@example.com."solidres/solidres.php000060400000036327150752335420010742 0ustar00<?php
/**
 ------------------------------------------------------------------------
 SOLIDRES - Accommodation booking extension for Joomla
 ------------------------------------------------------------------------
 * @author    Solidres Team <contact@solidres.com>
 * @website   https://www.solidres.com
 * @copyright Copyright (C) 2013 - 2019 Solidres. All Rights Reserved.
 * @license   GNU General Public License version 3, or later
 ------------------------------------------------------------------------
 */

defined('_JEXEC') or die;

if (JComponentHelper::isEnabled('com_privacy'))
{
	JLoader::register('PrivacyPlugin', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/plugin.php');
	JLoader::register('PrivacyRemovalStatus', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/removal/status.php');

	class PlgPrivacySolidres extends PrivacyPlugin
	{
		public function onPrivacyExportRequest(PrivacyTableRequest $request, JUser $user = null)
		{
			if (!$user)
			{
				return [];
			}

			$feedback   = SRPlugin::isEnabled('feedback');
			$experience = SRPlugin::isEnabled('experience');
			$invoice    = SRPlugin::isEnabled('invoice');
			$expInvoice = SRPlugin::isEnabled('experienceinvoice');
			$userId     = (int) $user->id;
			$db         = JFactory::getDbo();
			$query      = $db->getQuery(true)
				->select('a.*')
				->from($db->qn('#__sr_customers', 'a'))
				->innerJoin($db->qn('#__users', 'a2') . 'ON a2.id = a.user_id')
				->where('a2.id = ' . $userId);
			$db->setQuery($query);
			$domains = [];

			if ($items = $db->loadAssocList('id'))
			{
				$domain = $this->createDomain('solidres_customer', 'solidres_customer_data');

				foreach ($items as $item)
				{
					$domain->addItem($this->createItemFromArray($item, $item['id']));
				}

				$domains[] = $domain;
			}

			$query->clear()
				->select('DISTINCT a.id, a.name, a.address_1, a.city, a.phone, a.email, a.website, a.fax, a.rating, '
					. 'a4.name AS country, a5.name AS geo_state_name, a.language')
				->from($db->qn('#__sr_reservation_assets', 'a'))
				->innerJoin($db->qn('#__sr_customers', 'a2') . 'ON a2.id = a.partner_id')
				->innerJoin($db->qn('#__users', 'a3') . 'ON a3.id = a2.user_id')
				->leftJoin($db->qn('#__sr_countries', 'a4') . 'ON a4.id = a.country_id')
				->leftJoin($db->qn('#__sr_geo_states', 'a5') . 'ON a5.country_id = a4.id')
				->where('a3.id = ' . $userId);
			$db->setQuery($query);

			if ($items = $db->loadAssocList('id'))
			{
				$domain = $this->createDomain('solidres_partner_asset', 'solidres_partner_asset_data');

				foreach ($items as &$item)
				{
					$query->clear()
						->select('a.id, a.name, a.description, a.smoking, a.language')
						->from($db->qn('#__sr_room_types', 'a'))
						->where('a.reservation_asset_id = ' . (int) $item['id']);
					$db->setQuery($query);

					if ($roomTypes = $db->loadAssocList('id'))
					{
						foreach ($roomTypes as &$roomType)
						{
							$query->clear()
								->select('a.id, a.label AS room')
								->from($db->qn('#__sr_rooms', 'a'))
								->where('a.room_type_id = ' . (int) $roomType['id']);
							$db->setQuery($query);
							$roomType['rooms'] = $db->loadAssocList('id');
						}

						$item['roomTypes'] = $roomTypes;
					}

					$domain->addItem($this->createItemFromArray($item, $item['id']));
				}

				$domains[] = $domain;
			}

			if ($feedback)
			{
				$query->clear()
					->select('DISTINCT a.*')
					->from($db->qn('#__sr_feedbacks', 'a'))
					->leftJoin($db->qn('#__sr_reservations', 'a2') . ' ON a.scope = 0 AND a.reservation_id = a2.id')
					->leftJoin($db->qn('#__sr_customers', 'a3') . ' ON a3.id = a2.customer_id')
					->where('a3.user_id = ' . $userId);
				$db->setQuery($query);

				if ($items = $db->loadAssocList('id'))
				{
					$domain = $this->createDomain('solidres_customer_feedback', 'solidres_customer_feedback_data');

					foreach ($items as $item)
					{
						$domain->addItem($this->createItemFromArray($item, $item['id']));
					}

					$domains[] = $domain;
				}

				if ($experience)
				{
					$query->clear('join')
						->leftJoin($db->qn('#__sr_experience_reservations', 'a2') . ' ON a.scope = 1 AND a.reservation_id = a2.id')
						->leftJoin($db->qn('#__sr_customers', 'a3') . ' ON a3.id = a2.customer_id');
					$db->setQuery($query);

					if ($items = $db->loadAssocList('id'))
					{
						$domain = $this->createDomain('solidres_customer_experience_feedback', 'solidres_customer_experience_feedback_data');

						foreach ($items as $item)
						{
							$domain->addItem($this->createItemFromArray($item, $item['id']));
						}

						$domains[] = $domain;
					}
				}
			}

			$query->clear()
				->select('DISTINCT a.*')
				->leftJoin($db->qn('#__sr_countries', 'a2') . 'ON a2.id = a.customer_country_id')
				->leftJoin($db->qn('#__sr_geo_states', 'a3') . 'ON a3.country_id = a.customer_geo_state_id')
				->leftJoin($db->qn('#__sr_customers', 'a4') . 'ON a4.id = a.customer_id')
				->leftJoin($db->qn('#__users', 'a5') . 'ON a5.id = a4.user_id')
				->from($db->qn('#__sr_reservations', 'a'))
				->where('a5.id = ' . $userId);
			$db->setQuery($query);

			if ($items = $db->loadAssocList('id'))
			{
				$domain = $this->createDomain('solidres_customer_reservation', 'solidres_customer_reservation_data');

				foreach ($items as $item)
				{
					$domain->addItem($this->createItemFromArray($item, $item['id']));
				}

				$domains[] = $domain;
			}

			if ($invoice)
			{
				$query->clear()
					->select('a.*')
					->from($db->qn('#__sr_invoices', 'a'))
					->innerJoin($db->qn('#__sr_reservations', 'a2') . ' ON a2.id = a.reservation_id');
				$db->setQuery($query);

				if ($items = $db->loadAssocList('id'))
				{
					$domain = $this->createDomain('solidres_customer_invoice', 'solidres_customer_invoice_data');

					foreach ($items as $item)
					{
						$domain->addItem($this->createItemFromArray($item, $item['id']));
					}

					$domains[] = $domain;
				}
			}

			if ($experience)
			{
				$query->clear()
					->select('DISTINCT a.*')
					->from($db->qn('#__sr_experiences', 'a'))
					->leftJoin($db->qn('#__sr_customers', 'a2') . 'ON a2.id = a.partner_id')
					->leftJoin($db->qn('#__users', 'a3') . 'ON a3.id = a2.user_id')
					->where('a3.id = ' . $userId);
				$db->setQuery($query);

				if ($items = $db->loadAssocList('id'))
				{
					$domain = $this->createDomain('solidres_partner_experience', 'solidres_partner_experience_data');

					foreach ($items as $item)
					{
						$domain->addItem($this->createItemFromArray($item, $item['id']));
					}

					$domains[] = $domain;
				}

				$query->clear()
					->select('DISTINCT a.*')
					->from($db->qn('#__sr_experience_reservations', 'a'))
					->leftJoin($db->qn('#__sr_customers', 'a2') . 'ON a2.id = a.customer_id')
					->leftJoin($db->qn('#__users', 'a3') . 'ON a3.id = a2.user_id')
					->where('a3.id = ' . $userId);
				$db->setQuery($query);

				if ($items = $db->loadAssocList('id'))
				{
					$domain = $this->createDomain('solidres_customer_experience_reservation', 'solidres_customer_experience_reservation_data');

					foreach ($items as $item)
					{
						$domain->addItem($this->createItemFromArray($item, $item['id']));
					}

					$domains[] = $domain;
				}

				if ($expInvoice)
				{
					$query->clear()
						->select('DISTINCT a.*')
						->from($db->qn('#__sr_experience_invoices', 'a'))
						->innerJoin($db->qn('#__sr_experience_reservations', 'a2') . ' ON a2.id = a.reservation_id');
					$db->setQuery($query);

					if ($items = $db->loadAssocList('id'))
					{
						$domain = $this->createDomain('solidres_customer_experience_invoice', 'solidres_customer_experience_invoice_data');

						foreach ($items as $item)
						{
							$domain->addItem($this->createItemFromArray($item, $item['id']));
						}

						$domains[] = $domain;
					}
				}
			}

			return $domains;
		}

		public function onPrivacyCanRemoveData(PrivacyTableRequest $request, JUser $user = null)
		{
			$status = new PrivacyRemovalStatus;

			if (!$user)
			{
				return $status;
			}

			if ($user->authorise('core.admin', 'com_solidres'))
			{
				$status->canRemove = false;
				$status->reason    = JText::_('PLG_PRIVACY_SOLIDRES_ERR_ADMIN_USER');
			}

			return $status;
		}

		public function onPrivacyRemoveData(PrivacyTableRequest $request, JUser $user = null)
		{
			if (!$user)
			{
				return;
			}

			$userId      = (int) $user->id;
			$experience  = SRPlugin::isEnabled('experience');
			$customField = SRPlugin::isEnabled('customfield');
			$feedback    = SRPlugin::isEnabled('feedback');
			$invoice     = SRPlugin::isEnabled('invoice');
			$expInvoice  = SRPlugin::isEnabled('experienceinvoice');
			$db          = JFactory::getDbo();
			$query       = $db->getQuery(true)
				->select('a.id')
				->from($db->qn('#__sr_customers', 'a'))
				->where('a.user_id = ' . $userId);
			$db->setQuery($query);

			if ($customerId = $db->loadResult())
			{
				$customerId = (int) $customerId;
			}
			else
			{
				$customerId = 0;
			}

			if ($customerId)
			{
				try
				{
					// Customer data
					$query->clear()
						->update($db->qn('#__sr_customers'))
						->where($db->qn('id') . ' = ' . $customerId);

					foreach (array(
						         'customer_group_id' => null,
						         'customer_code'     => null,
						         'firstname'         => 'Name Redacted',
						         'middlename'        => null,
						         'lastname'          => null,
						         'vat_number'        => null,
						         'company'           => null,
						         'phonenumber'       => null,
						         'mobilephone'       => null,
						         'address1'          => 'Address Redacted',
						         'address2'          => 'Address Redacted',
						         'city'              => 'City Redacted',
						         'zipcode'           => 'REMOVED',
						         'country_id'        => null,
						         'geo_state_id'      => null,
						         'api_key'           => null,
						         'api_secret'        => null,
					         ) as $field => $value)
					{
						$query->set($db->qn($field) . ' = ' . (null === $value ? 'NULL' : $db->q($value)));
					}

					$db->setQuery($query)
						->execute();

					// Reservation data
					$query->clear()
						->select('a.id')
						->from($db->qn('#__sr_reservations', 'a'))
						->where('a.customer_id = ' . $customerId);
					$db->setQuery($query);
					$resIds = $db->loadColumn();

					$query->clear()
						->update($db->qn('#__sr_reservations'))
						->where($db->qn('customer_id') . ' = ' . $customerId);

					foreach (array(
						         'customer_title'        => null,
						         'customer_firstname'    => 'Name Redacted',
						         'customer_middlename'   => null,
						         'customer_lastname'     => null,
						         'customer_email'        => 'anonymous' . $customerId . '@example.com',
						         'customer_phonenumber'  => null,
						         'customer_mobilephone'  => null,
						         'customer_company'      => null,
						         'customer_address1'     => 'Address Redacted',
						         'customer_address2'     => 'Address Redacted',
						         'customer_city'         => 'City Redacted',
						         'customer_zipcode'      => 'REMOVED',
						         'customer_country_id'   => null,
						         'customer_geo_state_id' => null,
						         'customer_vat_number'   => null,
						         'customer_ip'           => null,
					         ) as $field => $value)
					{
						$query->set($db->qn($field) . ' = ' . (null === $value ? 'NULL' : $db->q($value)));
					}

					$db->setQuery($query)
						->execute();

					// Custom field value
					if ($resIds)
					{
						foreach ($resIds as &$resId)
						{
							$resId = (int) $resId;

							if ($customField)
							{
								$query->clear()
									->update($db->qn('#__sr_customfield_values'))
									->set($db->qn('value') . ' = ' . $db->q('Field Data Redacted'))
									->where($db->qn('context') . ' = ' . $db->q('com_solidres.customer.' . $resId), 'OR')
									->where($db->qn('context') . ' = ' . $db->q('com_solidres.experience.customer.' . $resId))
									->where($db->qn('context') . ' = ' . $db->q('com_solidres.customer.profile.' . $userId))
									->where($db->qn('context') . ' = ' . $db->q('com_solidres.customer.' . $customerId))
									->where($db->qn('context') . ' = ' . $db->q('com_solidres.experience.customer.' . $userId));
								$db->setQuery($query)
									->execute();
							}

							if ($feedback)
							{
								$query->clear()
									->update($db->qn('#__sr_feedbacks'))
									->set($db->qn('customer_name') . ' = ' . $db->q('Name Redacted@' . $customerId))
									->set($db->qn('customer_country_id') . ' = 0')
									->where($db->qn('scope') . ' = 0')
									->where($db->qn('reservation_id') . ' = ' . $resId);
								$db->setQuery($query)
									->execute();
							}
						}

						if ($invoice)
						{
							$query->clear()
								->delete($db->qn('#__sr_invoices'))
								->where($db->qn('reservation_id') . ' IN (' . join(',', $resIds) . ')');
							$db->setQuery($query)
								->execute();
						}
					}

					// Experience reservation data
					if ($experience)
					{
						$query->clear()
							->select('a.id')
							->from($db->qn('#__sr_experience_reservations', 'a'))
							->where('a.customer_id = ' . $customerId);
						$db->setQuery($query);
						$resIds = $db->loadColumn();

						$query->clear()
							->update($db->qn('#__sr_experience_reservations'))
							->set($db->qn('customer_name') . ' = ' . $db->q('Name Redacted@' . $customerId))
							->where($db->qn('customer_id') . ' = ' . $customerId);
						$db->setQuery($query)
							->execute();

						if ($resIds)
						{
							foreach ($resIds as &$resId)
							{
								$resId = (int) $resId;
								$query->clear()
									->update($db->qn('#__sr_experience_reservation_guests'))
									->where($db->qn('reservation_id') . ' = ' . $resId);

								foreach (array(
									         'range_age'   => 'Age Redacted',
									         'first_name'  => null,
									         'middle_name' => null,
									         'last_name'   => null,
									         'dob'         => '1970-01-01',
									         'gender'      => null,
									         'nationality' => null,
								         ) as $field => $value)
								{
									$query->set($db->qn($field) . ' = ' . (null === $value ? 'NULL' : $db->q($value)));
								}

								$db->setQuery($query)
									->execute();

								if ($feedback)
								{
									$query->clear()
										->update($db->qn('#__sr_feedbacks'))
										->set($db->qn('customer_name') . ' = ' . $db->q('Name Redacted@' . $customerId))
										->set($db->qn('customer_country_id') . ' = 0')
										->where($db->qn('scope') . ' = 1')
										->where($db->qn('reservation_id') . ' = ' . $resId);
									$db->setQuery($query)
										->execute();
								}
							}

							if ($expInvoice)
							{
								$query->clear()
									->delete($db->qn('#__sr_experience_invoices'))
									->where($db->qn('reservation_id') . ' IN (' . join(',', $resIds) . ')');
								$db->setQuery($query)
									->execute();
							}
						}
					}
				}
				catch (RuntimeException $e)
				{
				}
			}
		}

		public function onPrivacyCollectAdminCapabilities()
		{
			$this->loadLanguage('com_solidres.sys', JPATH_ADMINISTRATOR . '/components/com_solidres');

			return [
				JText::_('COM_SOLIDRES') => [
					JText::_('PLG_PRIVACY_SOLIDRES_ACTIONS_1'),
				],
			];
		}
	}
}
solidres/solidres.xml000060400000001300150752335420010732 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="privacy" method="upgrade">
	<name>plg_privacy_solidres</name>
	<author>Solidres</author>
	<creationDate>Feb 2019</creationDate>
	<copyright>Copyright (C) 2013 - 2019 Solidres. All Rights Reserved.</copyright>
	<license>GNU General Public License version 3, or later</license>
	<authorEmail>contact@solidres.com</authorEmail>
	<authorUrl>https://www.solidres.com</authorUrl>
	<version>2.9.3</version>
	<description>PLG_PRIVACY_SOLIDRES_XML_DESCRIPTION</description>
	<files>
		<filename plugin="solidres">solidres.php</filename>
		<folder>language</folder>
	</files>
	<administration>
    </administration>
</extension>
contact/contact.php000064400000003474150752335420010361 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Privacy.contact
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('PrivacyPlugin', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/plugin.php');

/**
 * Privacy plugin managing Joomla user contact data
 *
 * @since  3.9.0
 */
class PlgPrivacyContact extends PrivacyPlugin
{
	/**
	 * Processes an export request for Joomla core user contact data
	 *
	 * This event will collect data for the contact core tables:
	 *
	 * - Contact custom fields
	 *
	 * @param   PrivacyTableRequest  $request  The request record being processed
	 * @param   JUser                $user     The user account associated with this request if available
	 *
	 * @return  PrivacyExportDomain[]
	 *
	 * @since   3.9.0
	 */
	public function onPrivacyExportRequest(PrivacyTableRequest $request, JUser $user = null)
	{
		if (!$user && !$request->email)
		{
			return array();
		}

		$domains   = array();
		$domain    = $this->createDomain('user_contact', 'joomla_user_contact_data');
		$domains[] = $domain;

		$query = $this->db->getQuery(true)
			->select('*')
			->from($this->db->quoteName('#__contact_details'))
			->order($this->db->quoteName('ordering') . ' ASC');

		if ($user)
		{
			$query->where($this->db->quoteName('user_id') . ' = ' . (int) $user->id);
		}
		else
		{
			$query->where($this->db->quoteName('email_to') . ' = ' . $this->db->quote($request->email));
		}

		$items = $this->db->setQuery($query)->loadObjectList();

		foreach ($items as $item)
		{
			$domain->addItem($this->createItemFromArray((array) $item));
		}

		$domains[] = $this->createCustomFieldsDomain('com_contact.contact', $items);

		return $domains;
	}
}
contact/contact.xml000064400000001444150752335420010365 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.9" type="plugin" group="privacy" method="upgrade">
	<name>plg_privacy_contact</name>
	<author>Joomla! Project</author>
	<creationDate>July 2018</creationDate>
	<copyright>(C) 2005 - 2019 Open Source Matters. All rights reserved.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.9.0</version>
	<description>PLG_PRIVACY_CONTACT_XML_DESCRIPTION</description>
	<files>
		<filename plugin="contact">contact.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_privacy_contact.ini</language>
		<language tag="en-GB">en-GB.plg_privacy_contact.sys.ini</language>
	</languages>
</extension>
actionlogs/actionlogs.php000064400000003343150752335420011572 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Privacy.actionlogs
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
JLoader::register('PrivacyPlugin', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/plugin.php');

/**
 * Privacy plugin managing Joomla actionlogs data
 *
 * @since  3.9.0
 */
class PlgPrivacyActionlogs extends PrivacyPlugin
{
	/**
	 * Processes an export request for Joomla core actionlog data
	 *
	 * @param   PrivacyTableRequest  $request  The request record being processed
	 * @param   JUser                $user     The user account associated with this request if available
	 *
	 * @return  PrivacyExportDomain[]
	 *
	 * @since   3.9.0
	 */
	public function onPrivacyExportRequest(PrivacyTableRequest $request, JUser $user = null)
	{
		if (!$user)
		{
			return array();
		}

		$domain = $this->createDomain('user_action_logs', 'joomla_user_action_logs_data');

		$query = $this->db->getQuery(true)
			->select('a.*, u.name')
			->from('#__action_logs AS a')
			->innerJoin('#__users AS u ON a.user_id = u.id')
			->where($this->db->quoteName('a.user_id') . ' = ' . $user->id);

		$this->db->setQuery($query);

		$data = $this->db->loadObjectList();

		if (!count($data))
		{
			return array();
		}

		$data    = ActionlogsHelper::getCsvData($data);
		$isFirst = true;

		foreach ($data as $item)
		{
			if ($isFirst)
			{
				$isFirst = false;

				continue;
			}

			$domain->addItem($this->createItemFromArray($item));
		}

		return array($domain);
	}
}
actionlogs/actionlogs.xml000064400000001466150752335420011607 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="privacy" method="upgrade">
	<name>plg_privacy_actionlogs</name>
	<author>Joomla! Project</author>
	<creationDate>July 2018</creationDate>
	<copyright>(C) 2005 - 2019 Open Source Matters. All rights reserved.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.9.0</version>
	<description>PLG_PRIVACY_ACTIONLOGS_XML_DESCRIPTION</description>
	<files>
		<filename plugin="actionlogs">actionlogs.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_privacy_actionlogs.ini</language>
		<language tag="en-GB">en-GB.plg_privacy_actionlogs.sys.ini</language>
	</languages>
</extension>
content/content.xml000064400000001444150752335420010423 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.9" type="plugin" group="privacy" method="upgrade">
	<name>plg_privacy_content</name>
	<author>Joomla! Project</author>
	<creationDate>July 2018</creationDate>
	<copyright>(C) 2005 - 2019 Open Source Matters. All rights reserved.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.9.0</version>
	<description>PLG_PRIVACY_CONTENT_XML_DESCRIPTION</description>
	<files>
		<filename plugin="content">content.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_privacy_content.ini</language>
		<language tag="en-GB">en-GB.plg_privacy_content.sys.ini</language>
	</languages>
</extension>
content/content.php000064400000003225150752335420010411 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Privacy.content
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('PrivacyPlugin', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/plugin.php');

/**
 * Privacy plugin managing Joomla user content data
 *
 * @since  3.9.0
 */
class PlgPrivacyContent extends PrivacyPlugin
{
	/**
	 * Processes an export request for Joomla core user content data
	 *
	 * This event will collect data for the content core table
	 *
	 * - Content custom fields
	 *
	 * @param   PrivacyTableRequest  $request  The request record being processed
	 * @param   JUser                $user     The user account associated with this request if available
	 *
	 * @return  PrivacyExportDomain[]
	 *
	 * @since   3.9.0
	 */
	public function onPrivacyExportRequest(PrivacyTableRequest $request, JUser $user = null)
	{
		if (!$user)
		{
			return array();
		}

		$domains   = array();
		$domain    = $this->createDomain('user_content', 'joomla_user_content_data');
		$domains[] = $domain;

		$query = $this->db->getQuery(true)
			->select('*')
			->from($this->db->quoteName('#__content'))
			->where($this->db->quoteName('created_by') . ' = ' . (int) $user->id)
			->order($this->db->quoteName('ordering') . ' ASC');

		$items = $this->db->setQuery($query)->loadObjectList();

		foreach ($items as $item)
		{
			$domain->addItem($this->createItemFromArray((array) $item));
		}

		$domains[] = $this->createCustomFieldsDomain('com_content.article', $items);

		return $domains;
	}
}
message/message.php000064400000003062150752335420010334 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Privacy.message
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('PrivacyPlugin', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/plugin.php');

/**
 * Privacy plugin managing Joomla user messages
 *
 * @since  3.9.0
 */
class PlgPrivacyMessage extends PrivacyPlugin
{
	/**
	 * Processes an export request for Joomla core user message
	 *
	 * This event will collect data for the message table
	 *
	 * @param   PrivacyTableRequest  $request  The request record being processed
	 * @param   JUser                $user     The user account associated with this request if available
	 *
	 * @return  PrivacyExportDomain[]
	 *
	 * @since   3.9.0
	 */
	public function onPrivacyExportRequest(PrivacyTableRequest $request, JUser $user = null)
	{
		if (!$user)
		{
			return array();
		}

		$domain = $this->createDomain('user_messages', 'joomla_user_messages_data');

		$query = $this->db->getQuery(true)
			->select('*')
			->from($this->db->quoteName('#__messages'))
			->where($this->db->quoteName('user_id_from') . ' = ' . (int) $user->id)
			->orWhere($this->db->quoteName('user_id_to') . ' = ' . (int) $user->id)
			->order($this->db->quoteName('date_time') . ' ASC');

		$items = $this->db->setQuery($query)->loadAssocList();

		foreach ($items as $item)
		{
			$domain->addItem($this->createItemFromArray($item));
		}

		return array($domain);
	}
}
message/message.xml000064400000001444150752335420010347 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.9" type="plugin" group="privacy" method="upgrade">
	<name>plg_privacy_message</name>
	<author>Joomla! Project</author>
	<creationDate>July 2018</creationDate>
	<copyright>(C) 2005 - 2019 Open Source Matters. All rights reserved.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.9.0</version>
	<description>PLG_PRIVACY_MESSAGE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="message">message.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_privacy_message.ini</language>
		<language tag="en-GB">en-GB.plg_privacy_message.sys.ini</language>
	</languages>
</extension>
user/user.xml000064400000001421150752335420007226 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="privacy" method="upgrade">
	<name>plg_privacy_user</name>
	<author>Joomla! Project</author>
	<creationDate>May 2018</creationDate>
	<copyright>(C) 2005 - 2019 Open Source Matters. All rights reserved.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.9.0</version>
	<description>PLG_PRIVACY_USER_XML_DESCRIPTION</description>
	<files>
		<filename plugin="user">user.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_privacy_user.ini</language>
		<language tag="en-GB">en-GB.plg_privacy_user.sys.ini</language>
	</languages>
</extension>
user/user.php000064400000015256150752335420007230 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Privacy.user
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Utilities\ArrayHelper;

JLoader::register('PrivacyPlugin', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/plugin.php');
JLoader::register('PrivacyRemovalStatus', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/removal/status.php');

/**
 * Privacy plugin managing Joomla user data
 *
 * @since  3.9.0
 */
class PlgPrivacyUser extends PrivacyPlugin
{
	/**
	 * Performs validation to determine if the data associated with a remove information request can be processed
	 *
	 * This event will not allow a super user account to be removed
	 *
	 * @param   PrivacyTableRequest  $request  The request record being processed
	 * @param   JUser                $user     The user account associated with this request if available
	 *
	 * @return  PrivacyRemovalStatus
	 *
	 * @since   3.9.0
	 */
	public function onPrivacyCanRemoveData(PrivacyTableRequest $request, JUser $user = null)
	{
		$status = new PrivacyRemovalStatus;

		if (!$user)
		{
			return $status;
		}

		if ($user->authorise('core.admin'))
		{
			$status->canRemove = false;
			$status->reason    = JText::_('PLG_PRIVACY_USER_ERROR_CANNOT_REMOVE_SUPER_USER');
		}

		return $status;
	}

	/**
	 * Processes an export request for Joomla core user data
	 *
	 * This event will collect data for the following core tables:
	 *
	 * - #__users (excluding the password, otpKey, and otep columns)
	 * - #__user_notes
	 * - #__user_profiles
	 * - User custom fields
	 *
	 * @param   PrivacyTableRequest  $request  The request record being processed
	 * @param   JUser                $user     The user account associated with this request if available
	 *
	 * @return  PrivacyExportDomain[]
	 *
	 * @since   3.9.0
	 */
	public function onPrivacyExportRequest(PrivacyTableRequest $request, JUser $user = null)
	{
		if (!$user)
		{
			return array();
		}

		/** @var JTableUser $userTable */
		$userTable = JUser::getTable();
		$userTable->load($user->id);

		$domains = array();
		$domains[] = $this->createUserDomain($userTable);
		$domains[] = $this->createNotesDomain($userTable);
		$domains[] = $this->createProfileDomain($userTable);
		$domains[] = $this->createCustomFieldsDomain('com_users.user', array($userTable));

		return $domains;
	}

	/**
	 * Removes the data associated with a remove information request
	 *
	 * This event will pseudoanonymise the user account
	 *
	 * @param   PrivacyTableRequest  $request  The request record being processed
	 * @param   JUser                $user     The user account associated with this request if available
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onPrivacyRemoveData(PrivacyTableRequest $request, JUser $user = null)
	{
		// This plugin only processes data for registered user accounts
		if (!$user)
		{
			return;
		}

		$pseudoanonymisedData = array(
			'name'      => 'User ID ' . $user->id,
			'username'  => bin2hex(random_bytes(12)),
			'email'     => 'UserID' . $user->id . 'removed@email.invalid',
			'block'     => true,
		);

		$user->bind($pseudoanonymisedData);

		$user->save();

		// Destroy all sessions for the user account
		$sessionIds = $this->db->setQuery(
			$this->db->getQuery(true)
				->select($this->db->quoteName('session_id'))
				->from($this->db->quoteName('#__session'))
				->where($this->db->quoteName('userid') . ' = ' . (int) $user->id)
		)->loadColumn();

		// If there aren't any active sessions then there's nothing to do here
		if (empty($sessionIds))
		{
			return;
		}

		$storeName = JFactory::getConfig()->get('session_handler', 'none');
		$store     = JSessionStorage::getInstance($storeName);
		$quotedIds = array();

		// Destroy the sessions and quote the IDs to purge the session table
		foreach ($sessionIds as $sessionId)
		{
			$store->destroy($sessionId);
			$quotedIds[] = $this->db->quoteBinary($sessionId);
		}

		$this->db->setQuery(
			$this->db->getQuery(true)
				->delete($this->db->quoteName('#__session'))
				->where($this->db->quoteName('session_id') . ' IN (' . implode(', ', $quotedIds) . ')')
		)->execute();
	}

	/**
	 * Create the domain for the user notes data
	 *
	 * @param   JTableUser  $user  The JTableUser object to process
	 *
	 * @return  PrivacyExportDomain
	 *
	 * @since   3.9.0
	 */
	private function createNotesDomain(JTableUser $user)
	{
		$domain = $this->createDomain('user_notes', 'joomla_user_notes_data');

		$query = $this->db->getQuery(true)
			->select('*')
			->from($this->db->quoteName('#__user_notes'))
			->where($this->db->quoteName('user_id') . ' = ' . $this->db->quote($user->id));

		$items = $this->db->setQuery($query)->loadAssocList();

		// Remove user ID columns
		foreach (array('user_id', 'created_user_id', 'modified_user_id') as $column)
		{
			$items = ArrayHelper::dropColumn($items, $column);
		}

		foreach ($items as $item)
		{
			$domain->addItem($this->createItemFromArray($item, $item['id']));
		}

		return $domain;
	}

	/**
	 * Create the domain for the user profile data
	 *
	 * @param   JTableUser  $user  The JTableUser object to process
	 *
	 * @return  PrivacyExportDomain
	 *
	 * @since   3.9.0
	 */
	private function createProfileDomain(JTableUser $user)
	{
		$domain = $this->createDomain('user_profile', 'joomla_user_profile_data');

		$query = $this->db->getQuery(true)
			->select('*')
			->from($this->db->quoteName('#__user_profiles'))
			->where($this->db->quoteName('user_id') . ' = ' . $this->db->quote($user->id))
			->order($this->db->quoteName('ordering') . ' ASC');

		$items = $this->db->setQuery($query)->loadAssocList();

		foreach ($items as $item)
		{
			$domain->addItem($this->createItemFromArray($item));
		}

		return $domain;
	}

	/**
	 * Create the domain for the user record
	 *
	 * @param   JTableUser  $user  The JTableUser object to process
	 *
	 * @return  PrivacyExportDomain
	 *
	 * @since   3.9.0
	 */
	private function createUserDomain(JTableUser $user)
	{
		$domain = $this->createDomain('users', 'joomla_users_data');
		$domain->addItem($this->createItemForUserTable($user));

		return $domain;
	}

	/**
	 * Create an item object for a JTableUser object
	 *
	 * @param   JTableUser  $user  The JTableUser object to convert
	 *
	 * @return  PrivacyExportItem
	 *
	 * @since   3.9.0
	 */
	private function createItemForUserTable(JTableUser $user)
	{
		$data    = array();
		$exclude = array('password', 'otpKey', 'otep');

		foreach (array_keys($user->getFields()) as $fieldName)
		{
			if (!in_array($fieldName, $exclude))
			{
				$data[$fieldName] = $user->$fieldName;
			}
		}

		return $this->createItemFromArray($data, $user->id);
	}
}
icagenda/icagenda.xml000060400000002264150752335420010562 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" group="privacy" version="3.2.4" method="upgrade">
	<name>PLG_PRIVACY_ICAGENDA</name>
	<creationDate>2018-10-30</creationDate>
	<author>Cyril Rezé / Jooml!C</author>
	<copyright>Copyright (c) 2012-2019 Jooml!C / Cyril Rezé. All rights reserved</copyright>
	<license>GNU General Public License version 3 or later; see LICENSE.txt</license>
	<authorEmail>info@joomlic.com</authorEmail>
	<authorUrl>www.joomlic.com</authorUrl>
	<version>1.0</version>
	<description>PLG_PRIVACY_ICAGENDA_XML_DESCRIPTION</description>

	<files>
		<filename plugin="icagenda">icagenda.php</filename>
	</files>

	<languages>
		<language tag="en-GB">language/en-GB/en-GB.plg_privacy_icagenda.ini</language>
		<language tag="en-GB">language/en-GB/en-GB.plg_privacy_icagenda.sys.ini</language>
		<language tag="fr-FR">language/fr-FR/fr-FR.plg_privacy_icagenda.ini</language>
		<language tag="fr-FR">language/fr-FR/fr-FR.plg_privacy_icagenda.sys.ini</language>
		<language tag="it-IT">language/it-IT/it-IT.plg_privacy_icagenda.ini</language>
		<language tag="it-IT">language/it-IT/it-IT.plg_privacy_icagenda.sys.ini</language>
	</languages>

	<config />
</extension>
icagenda/icagenda.php000060400000024072150752335420010552 0ustar00<?php
/**
 *----------------------------------------------------------------------------
 * iCagenda     Plugin Privacy
 *----------------------------------------------------------------------------
 * @version     1.0 2018-10-30
 *
 * @package     iCagenda.Plugin
 * @subpackage  Privacy.icagenda
 * @link        https://icagenda.joomlic.com
 *
 * @author      Cyril Rezé
 * @copyright   (c) 2012-2019 Jooml!C / Cyril Rezé. All rights reserved.
 * @license     GNU General Public License version 3 or later; see LICENSE.txt
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  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 General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @since       iCagenda 3.7.5
 *----------------------------------------------------------------------------
*/

defined('_JEXEC') or die;

use Joomla\Utilities\ArrayHelper;

JLoader::register('PrivacyPlugin', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/plugin.php');

// Loads Utilities
JLoader::registerPrefix('icagenda', JPATH_ADMINISTRATOR . '/components/com_icagenda/utilities');

/**
 * Handle iCagenda integration in com_privacy capabilities (starting Joomla 3.9)
 */
class plgPrivacyIcagenda extends PrivacyPlugin
{
	/**
	 * Database object
	 *
	 * @var    JDatabaseDriver
	 * @since  1.0
	 */
	protected $db;

	/**
	 * Affects constructor behaviour. If true, language files will be loaded automatically.
	 *
	 * @var    boolean
	 * @since  1.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Events array
	 *
	 * @var    Array
	 * @since  1.0
	 */
	protected $events = array();

	/**
	 * Participants array
	 *
	 * @var    Array
	 * @since  1.0
	 */
	protected $participants = array();

	/**
	 * Processes an export request for Joomla core user registration data
	 *
	 * This event will collect data for the contact core tables:
	 *
	 * - Contact custom fields
	 *
	 * @param   PrivacyTableRequest  $request  The request record being processed
	 * @param   JUser                $user     The user account associated with this request if available
	 *
	 * @return  PrivacyExportDomain[]
	 *
	 * @since   1.0
	 */
	public function onPrivacyExportRequest(PrivacyTableRequest $request, JUser $user = null)
	{
		if ( ! $user && ! $request->email)
		{
			return array();
		}

		$domains   = array();

		// Create User Events Domain
		$domains[] = $this->createEventsDomain($request, $user);
		$domains[] = $this->createEventsCustomfieldsDomain($this->events);

		// Create User Registrations Domain
		$domains[] = $this->createRegistrationDomain($request, $user);
		$domains[] = $this->createRegistrationCustomfieldsDomain($this->participants);

		return $domains;
	}

	/**
	 * Create the domain for the user events data
	 *
	 * @param   PrivacyTableRequest  $request  The request record being processed
	 * @param   JUser                $user     The user account associated with this request if available
	 *
	 * @return  PrivacyExportDomain
	 *
	 * @since   1.0
	 */
	private function createEventsDomain(PrivacyTableRequest $request, JUser $user = null)
	{
		$domain = $this->createDomain(
			'icagenda_events',
			'user_icagenda_events_data'
		);

		if ($user)
		{
			$query = $this->db->getQuery(true)
				->select('*')
				->from($this->db->quoteName('#__icagenda_events'))
				->where($this->db->quoteName('created_by') . ' = ' . (int) $user->id
					. ' OR ' . $this->db->quoteName('created_by_email') . ' = ' . $this->db->quote($request->email))
				->order($this->db->quoteName('ordering') . ' ASC');
		}
		else
		{
			$query = $this->db->getQuery(true)
				->select('*')
				->from($this->db->quoteName('#__icagenda_events'))
				->where($this->db->quoteName('created_by_email') . ' = ' . $this->db->quote($request->email))
				->order($this->db->quoteName('ordering') . ' ASC');
		}

		$items = $this->db->setQuery($query)->loadAssocList();

		foreach ($items as $item)
		{
			$domain->addItem($this->createItemFromArray($item));
			$this->events[] = (object) $item;
		}

		return $domain;
	}

	/**
	 * Create the domain for the events custom fields
	 *
	 * @param   Object  $events  The events to process
	 *
	 * @return  PrivacyExportDomain
	 *
	 * @since   1.0
	 */
	private function createEventsCustomfieldsDomain($events)
	{
		$domain = $this->createDomain(
			'icagenda_events_customfields',
			'user_icagenda_events_customfields_data'
		);

		foreach ($events as $event)
		{
			// Get item's fields, also preparing their value property for manual display
			$fields = icagendaCustomfields::getList($event->id, '2', '1');

			if ($fields)
			{
				foreach ($fields as $field)
				{
					$data = array(
						'event_id'    => $event->id,
						'field_slug'  => $field->cf_slug,
						'field_title' => $field->cf_title,
						'field_value' => $field->cf_value,
					);

					$domain->addItem($this->createItemFromArray($data));
				}
			}
		}

		return $domain;
	}

	/**
	 * Create the domain for the user registration data
	 *
	 * @param   PrivacyTableRequest  $request  The request record being processed
	 * @param   JUser                $user     The user account associated with this request if available
	 *
	 * @return  PrivacyExportDomain
	 *
	 * @since   1.0
	 */
	private function createRegistrationDomain(PrivacyTableRequest $request, JUser $user = null)
	{
		$domain = $this->createDomain(
			'icagenda_registration',
			'user_icagenda_registration_data'
		);

		if ($user)
		{
			$query = $this->db->getQuery(true)
				->select('*')
				->from($this->db->quoteName('#__icagenda_registration'))
				->where($this->db->quoteName('userid') . ' = ' . (int) $user->id
					. ' OR ' . $this->db->quoteName('email') . ' = ' . $this->db->quote($request->email))
				->order($this->db->quoteName('ordering') . ' ASC');
		}
		else
		{
			$query = $this->db->getQuery(true)
				->select('*')
				->from($this->db->quoteName('#__icagenda_registration'))
				->where($this->db->quoteName('email') . ' = ' . $this->db->quote($request->email))
				->order($this->db->quoteName('ordering') . ' ASC');
		}

		$items = $this->db->setQuery($query)->loadAssocList();

		foreach ($items as $item)
		{
			$domain->addItem($this->createItemFromArray($item));
			$this->participants[] = (object) $item;
		}

		return $domain;
	}

	/**
	 * Create the domain for the registrations custom fields
	 *
	 * @param   Object  $registrations  The registrations to process
	 *
	 * @return  PrivacyExportDomain
	 *
	 * @since   1.0
	 */
	private function createRegistrationCustomfieldsDomain($registrations)
	{
		$domain = $this->createDomain(
			'icagenda_registration_customfields',
			'user_icagenda_registration_customfields_data'
		);

		foreach ($registrations as $registration)
		{
			// Get item's fields, also preparing their value property for manual display
			$fields = icagendaCustomfields::getList($registration->id, '1', '1');

			if ($fields)
			{
				foreach ($fields as $field)
				{
					$data = array(
						'registration_id' => $registration->id,
						'field_slug'      => $field->cf_slug,
						'field_title'     => $field->cf_title,
						'field_value'     => $field->cf_value,
					);

					$domain->addItem($this->createItemFromArray($data));
				}
			}
		}

		return $domain;
	}

	/**
	 * Reports the privacy related capabilities for iCagenda to site administrators.
	 *
	 * @return  array
	 *
	 * @since   1.0
	 */
	public function onPrivacyCollectAdminCapabilities()
	{
		$this->loadLanguage();

		$joomlaIntegration  = JText::_('PLG_PRIVACY_ICAGENDA_JOOMLA_INTEGRATION')
							. '<ul>'
							. '<li>' . JText::sprintf('PLG_PRIVACY_ICAGENDA_JOOMLA_ACTION_LOGS',
								JRoute::_('index.php?option=com_plugins&view=plugins&filter_folder=actionlog&filter_element=icagenda') . '" target="_blank') . '</li>'
							. '<li>' . JText::sprintf('PLG_PRIVACY_ICAGENDA_JOOMLA_PRIVACY_INFORMATION_REQUESTS',
								JRoute::_('index.php?option=com_plugins&view=plugins&filter_folder=privacy&filter_element=icagenda')) . '</li>'
							. '</ul>'
							. '<em>' . JText::_('PLG_PRIVACY_ICAGENDA_NOTE') . ' ' . JText::_('PLG_PRIVACY_ICAGENDA_JOOMLA_PRIVACY_CONSENTS_BY_ICAGENDA') . '</em><br /><br />';

		$componentNetwork   = JText::_('PLG_PRIVACY_ICAGENDA_COMPONENT_NETWORK')
							. '<ul>'
							. '<li>' . JText::_('PLG_PRIVACY_ICAGENDA_COMPONENT_NETWORK_UPDATES') . '</li>'
							. '<li>' . JText::_('PLG_PRIVACY_ICAGENDA_COMPONENT_NETWORK_HELP') . '</li>'
							. '</ul><br />';

		$thirdpartyServices = JText::_('PLG_PRIVACY_ICAGENDA_COMPONENT_THIRDPARTY') . '*'
							. '<br /><small>*&#160;' . JText::_('PLG_PRIVACY_ICAGENDA_COMPONENT_THIRDPARTY_SUBLABEL') . '</small>'
							. '<ul>'
							. '<li><strong>' . JText::_('PLG_PRIVACY_ICAGENDA_COMPONENT_ADDTHIS_LABEL') . '</strong><br />'
							. JText::sprintf('PLG_PRIVACY_ICAGENDA_COMPONENT_ADDTHIS_DESC', 'https://www.addthis.com/blog/2018/09/30/how-publishers-can-comply-with-gdpr/" target="_blank" rel="noopener noreferrer') . '</li>'
							. '<li><strong>' . JText::_('PLG_PRIVACY_ICAGENDA_COMPONENT_CAPTCHA_LABEL') . '</strong><br />'
							. JText::_('PLG_PRIVACY_ICAGENDA_COMPONENT_CAPTCHA_DESC') . '</li>'
							. '<li><strong>' . JText::_('PLG_PRIVACY_ICAGENDA_COMPONENT_GOOGLEMAPS_LABEL') . '</strong><br />'
							. JText::sprintf('PLG_PRIVACY_ICAGENDA_COMPONENT_GOOGLEMAPS_DESC', 'https://cloud.google.com/maps-platform/terms/" target="_blank" rel="noopener noreferrer') . '</li>'
							. '<li><strong>' . JText::_('PLG_PRIVACY_ICAGENDA_COMPONENT_GRAVATAR_LABEL') . '</strong><br />'
							. JText::sprintf('PLG_PRIVACY_ICAGENDA_COMPONENT_GRAVATAR_DESC', 'https://gravatar.com" target="_blank" rel="noopener noreferrer') . '</li>'
							. '</ul>';
		
		return array(
			JText::_('iCagenda') => array(
				$joomlaIntegration,
				$componentNetwork,
				$thirdpartyServices,
			),
		);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit