/var/www/vhosts/swoboda-partner.de/httpdocs/administrator/components/com_content/src/Model/ArticleModel.php
)
->from($db->quoteName('#__content_frontpage'))
->where($db->quoteName('content_id') . ' = :id')
->bind(':id', $item->id, ParameterType::INTEGER);
$featured = $db->setQuery($query)->loadObject();
if ($featured) {
$item->featured_up = $featured->featured_up;
$item->featured_down = $featured->featured_down;
}
}
}
}
// Load associated content items
$assoc = Associations::isEnabled();
if ($assoc) {
$item->associations = [];
if ($item->id != null) {
$associations = Associations::getAssociations('com_content', '#__content', 'com_content.item', $item->id);
foreach ($associations as $tag => $association) {
$item->associations[$tag] = $association->id;
}
}
}
return $item;
}
/**
* Method to get the record form.
*
* @param array $data Data for the form.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
*
* @return Form|boolean A Form object on success, false on failure
Arguments
"Attempt to assign property "associations" on bool"
/var/www/vhosts/swoboda-partner.de/httpdocs/plugins/system/codedesign_template_custom_header_data/codedesign_template_custom_header_data.php
$current_head_data = $this->doc->getHeadData();
if ( (int)$this->params->get('plugin_debug') == 1 && $this->params->get('plugin_debug_event') == 'onBeforeCompileHead' ) {
var_dump( $current_head_data );
}
// J40 has no default meta keywords output anymore
// set metadata depending on where we are
// we check also menu item if there is higher leveled meta
if ( $this->option == 'com_content' )
{
switch ( $this->view ) {
case 'article':
// J40+
/** @var \Joomla\Component\Content\Site\Model\ArticlesModel $article_model */
$article_model = JFactory::getApplication()->bootComponent('com_content')->getMVCFactory()->createModel('Article', 'Administrator', ['ignore_request' => true]);
$article_model->setState('article.id', (int) $this->db_dataset_id);
$article = $article_model->getItem();
$this->doc->setMetaData('description', $article->metadesc);
$this->doc->setMetaData('keywords', $article->metakey);
break;
case 'category':
break;
case 'featured':
break;
}
}
// generator
if ( (int)$this->params->get('display_generator_tag') == 0 ) {
/var/www/vhosts/swoboda-partner.de/httpdocs/libraries/src/Plugin/CMSPlugin.php
{
$this->getDispatcher()->addListener(
$methodName,
function (AbstractEvent $event) use ($methodName) {
// Get the event arguments
$arguments = $event->getArguments();
// Extract any old results; they must not be part of the method call.
$allResults = [];
if (isset($arguments['result'])) {
$allResults = $arguments['result'];
unset($arguments['result']);
}
// Convert to indexed array for unpacking.
$arguments = \array_values($arguments);
$result = $this->{$methodName}(...$arguments);
// Ignore null results
if ($result === null) {
return;
}
if ($event instanceof ResultAwareInterface) {
$event->addResult($result);
} elseif (!$event instanceof AbstractImmutableEvent) {
// Restore the old results and add the new result from our method call
$allResults[] = $result;
$event['result'] = $allResults;
}
}
);
}
/**
* Registers a proper event listener, i.e. a method which accepts an AbstractEvent as its sole argument. This is the
* preferred way to implement plugins in Joomla! 4.x and will be the only possible method with Joomla! 5.x onwards.
/var/www/vhosts/swoboda-partner.de/httpdocs/libraries/vendor/joomla/event/src/Dispatcher.php
trigger_deprecation(
'joomla/event',
'2.0.0',
'Not passing an event object to %s() is deprecated, as of 3.0 the $event argument will be required.',
__METHOD__
);
$event = $this->getDefaultEvent($name);
}
if (isset($this->listeners[$event->getName()]))
{
foreach ($this->listeners[$event->getName()] as $listener)
{
if ($event->isStopped())
{
return $event;
}
$listener($event);
}
}
return $event;
}
/**
* Trigger an event.
*
* @param EventInterface|string $event The event object or name.
*
* @return EventInterface The event after being passed through all listeners.
*
* @since 1.0
* @deprecated 3.0 Use dispatch() instead.
*/
public function triggerEvent($event)
{
trigger_deprecation(
'joomla/event',
/var/www/vhosts/swoboda-partner.de/httpdocs/libraries/src/Application/EventAware.php
public function triggerEvent($eventName, $args = [])
{
try {
$dispatcher = $this->getDispatcher();
} catch (\UnexpectedValueException $exception) {
$this->getLogger()->error(sprintf('Dispatcher not set in %s, cannot trigger events.', \get_class($this)));
return [];
}
if ($args instanceof Event) {
$event = $args;
} elseif (\is_array($args)) {
$className = self::getEventClassByEventName($eventName);
$event = new $className($eventName, $args);
} else {
throw new \InvalidArgumentException('The arguments must either be an event or an array');
}
$result = $dispatcher->dispatch($eventName, $event);
// @todo - There are still test cases where the result isn't defined, temporarily leave the isset check in place
return !isset($result['result']) || \is_null($result['result']) ? [] : $result['result'];
}
}
/var/www/vhosts/swoboda-partner.de/httpdocs/libraries/src/Document/Renderer/Html/MetasRenderer.php
{
// Convert the tagids to titles
if (isset($this->_doc->_metaTags['name']['tags'])) {
$tagsHelper = new TagsHelper();
$this->_doc->_metaTags['name']['tags'] = implode(', ', $tagsHelper->getTagNames($this->_doc->_metaTags['name']['tags']));
}
/** @var \Joomla\CMS\Application\CMSApplication $app */
$app = Factory::getApplication();
$wa = $this->_doc->getWebAssetManager();
// Check for AttachBehavior and web components
foreach ($wa->getAssets('script', true) as $asset) {
if ($asset instanceof WebAssetAttachBehaviorInterface) {
$asset->onAttachCallback($this->_doc);
}
}
// Trigger the onBeforeCompileHead event
$app->triggerEvent('onBeforeCompileHead');
// Add Script Options as inline asset
$scriptOptions = $this->_doc->getScriptOptions();
if ($scriptOptions) {
$prettyPrint = (JDEBUG && \defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : false);
$jsonOptions = json_encode($scriptOptions, $prettyPrint);
$jsonOptions = $jsonOptions ?: '{}';
$wa->addInlineScript(
$jsonOptions,
['name' => 'joomla.script.options', 'position' => 'before'],
['type' => 'application/json', 'class' => 'joomla-script-options new'],
['core']
);
}
// Lock the AssetManager
$wa->lock();
/var/www/vhosts/swoboda-partner.de/httpdocs/libraries/src/Document/Renderer/Html/HeadRenderer.php
*
* @since 3.5
*/
class HeadRenderer extends DocumentRenderer
{
/**
* Renders the document head and returns the results as a string
*
* @param string $head (unused)
* @param array $params Associative array of values
* @param string $content The script
*
* @return string The output of the script
*
* @since 3.5
*/
public function render($head, $params = [], $content = null)
{
$buffer = '';
$buffer .= $this->_doc->loadRenderer('metas')->render($head, $params, $content);
$buffer .= $this->_doc->loadRenderer('styles')->render($head, $params, $content);
$buffer .= $this->_doc->loadRenderer('scripts')->render($head, $params, $content);
return $buffer;
}
}
/var/www/vhosts/swoboda-partner.de/httpdocs/libraries/src/Document/HtmlDocument.php
if (isset($cbuffer[$hash])) {
return Cache::getWorkarounds($cbuffer[$hash], ['mergehead' => 1]);
}
$options = [];
$options['nopathway'] = 1;
$options['nomodules'] = 1;
$options['modulemode'] = 1;
$this->setBuffer($renderer->render($name, $attribs, null), $type, $name);
$data = parent::$_buffer[$type][$name][$title];
$tmpdata = Cache::setWorkarounds($data, $options);
$cbuffer[$hash] = $tmpdata;
$cache->store($cbuffer, 'cbuffer_' . $type);
} else {
$this->setBuffer($renderer->render($name, $attribs, null), $type, $name, $title);
}
return parent::$_buffer[$type][$name][$title];
}
/**
* Set the contents a document includes
*
* @param string $content The content to be set in the buffer.
* @param array $options Array of optional elements.
*
* @return HtmlDocument instance of $this to allow chaining
*
* @since 1.7.0
*/
public function setBuffer($content, $options = [])
{
// The following code is just for backward compatibility.
if (\func_num_args() > 1 && !\is_array($options)) {
$args = \func_get_args();
/var/www/vhosts/swoboda-partner.de/httpdocs/libraries/src/Document/HtmlDocument.php
}
return $this;
}
/**
* Render pre-parsed template
*
* @return string rendered template
*
* @since 1.7.0
*/
protected function _renderTemplate()
{
$replace = [];
$with = [];
foreach ($this->_template_tags as $jdoc => $args) {
$replace[] = $jdoc;
$with[] = $this->getBuffer($args['type'], $args['name'], $args['attribs']);
}
return str_replace($replace, $with, $this->_template);
}
}
/var/www/vhosts/swoboda-partner.de/httpdocs/libraries/src/Document/HtmlDocument.php
* @param boolean $caching If true, cache the output
* @param array $params Associative array of attributes
*
* @return string The rendered data
*
* @since 1.7.0
*/
public function render($caching = false, $params = [])
{
$this->_caching = $caching;
if (empty($this->_template)) {
$this->parse($params);
}
if (\array_key_exists('csp_nonce', $params) && $params['csp_nonce'] !== null) {
$this->cspNonce = $params['csp_nonce'];
}
$data = $this->_renderTemplate();
parent::render($caching, $params);
return $data;
}
/**
* Count the modules in the given position
*
* @param string $positionName The position to use
* @param boolean $withContentOnly Count only a modules which actually has a content
*
* @return integer Number of modules found
*
* @since 1.7.0
*/
public function countModules(string $positionName, bool $withContentOnly = false)
{
if ((isset(parent::$_buffer['modules'][$positionName])) && (parent::$_buffer['modules'][$positionName] === false)) {
return 0;
}
/var/www/vhosts/swoboda-partner.de/httpdocs/libraries/src/Application/CMSApplication.php
} else {
// Fall back to constants.
$this->docOptions['directory'] = \defined('JPATH_THEMES') ? JPATH_THEMES : (\defined('JPATH_BASE') ? JPATH_BASE : __DIR__) . '/themes';
}
// Parse the document.
$this->document->parse($this->docOptions);
// Trigger the onBeforeRender event.
PluginHelper::importPlugin('system');
$this->triggerEvent('onBeforeRender');
$caching = false;
if ($this->isClient('site') && $this->get('caching') && $this->get('caching', 2) == 2 && !Factory::getUser()->get('id')) {
$caching = true;
}
// Render the document.
$data = $this->document->render($caching, $this->docOptions);
// Set the application output data.
$this->setBody($data);
// Trigger the onAfterRender event.
$this->triggerEvent('onAfterRender');
// Mark afterRender in the profiler.
JDEBUG ? $this->profiler->mark('afterRender') : null;
}
/**
* Route the application.
*
* Routing is the process of examining the request environment to determine which
* component should receive the request. The component optional parameters
* are then set in the request object to be processed when the application is being
* dispatched.
*
* @return void
/var/www/vhosts/swoboda-partner.de/httpdocs/libraries/src/Application/SiteApplication.php
$this->set('themeFile', 'offline.php');
$this->setHeader('Status', '503 Service Temporarily Unavailable', 'true');
}
if (!is_dir(JPATH_THEMES . '/' . $template->template) && !$this->get('offline')) {
$this->set('themeFile', 'component.php');
}
// Ensure themeFile is set by now
if ($this->get('themeFile') == '') {
$this->set('themeFile', $file . '.php');
}
// Pass the parent template to the state
$this->set('themeInherits', $template->parent);
break;
}
parent::render();
}
/**
* Route the application.
*
* Routing is the process of examining the request environment to determine which
* component should receive the request. The component optional parameters
* are then set in the request object to be processed when the application is being
* dispatched.
*
* @return void
*
* @since 3.2
*/
protected function route()
{
// Get the full request URI.
$uri = clone Uri::getInstance();
// It is not possible to inject the SiteRouter as it requires a SiteApplication
/var/www/vhosts/swoboda-partner.de/httpdocs/libraries/src/Application/CMSApplication.php
* Execute the application.
*
* @return void
*
* @since 3.2
*/
public function execute()
{
try {
$this->sanityCheckSystemVariables();
$this->setupLogging();
$this->createExtensionNamespaceMap();
// Perform application routines.
$this->doExecute();
// If we have an application document object, render it.
if ($this->document instanceof \Joomla\CMS\Document\Document) {
// Render the application output.
$this->render();
}
// If gzip compression is enabled in configuration and the server is compliant, compress the output.
if ($this->get('gzip') && !ini_get('zlib.output_compression') && ini_get('output_handler') !== 'ob_gzhandler') {
$this->compress();
// Trigger the onAfterCompress event.
$this->triggerEvent('onAfterCompress');
}
} catch (\Throwable $throwable) {
/** @var ErrorEvent $event */
$event = AbstractEvent::create(
'onError',
[
'subject' => $throwable,
'eventClass' => ErrorEvent::class,
'application' => $this,
]
);
/var/www/vhosts/swoboda-partner.de/httpdocs/includes/app.php
*
* In addition to aliasing "common" service keys, we also create aliases for the PHP classes to ensure autowiring objects
* is supported. This includes aliases for aliased class names, and the keys for aliased class names should be considered
* deprecated to be removed when the class name alias is removed as well.
*/
$container->alias('session.web', 'session.web.site')
->alias('session', 'session.web.site')
->alias('JSession', 'session.web.site')
->alias(\Joomla\CMS\Session\Session::class, 'session.web.site')
->alias(\Joomla\Session\Session::class, 'session.web.site')
->alias(\Joomla\Session\SessionInterface::class, 'session.web.site');
// Instantiate the application.
$app = $container->get(\Joomla\CMS\Application\SiteApplication::class);
// Set the application as global app
\Joomla\CMS\Factory::$application = $app;
// Execute the application.
$app->execute();
/var/www/vhosts/swoboda-partner.de/httpdocs/index.php
define('JOOMLA_MINIMUM_PHP', '7.2.5');
if (version_compare(PHP_VERSION, JOOMLA_MINIMUM_PHP, '<')) {
die(
str_replace(
'{{phpversion}}',
JOOMLA_MINIMUM_PHP,
file_get_contents(dirname(__FILE__) . '/templates/system/incompatible.html')
)
);
}
/**
* Constant that is checked in included files to prevent direct access.
* define() is used rather than "const" to not error for PHP 5.2 and lower
*/
define('_JEXEC', 1);
// Run the application - All executable code should be triggered through this file
require_once dirname(__FILE__) . '/includes/app.php';
Arguments
"/var/www/vhosts/swoboda-partner.de/httpdocs/includes/app.php"