Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 31 additions & 32 deletions administrator/components/com_checkin/src/Model/CheckinModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,26 +107,31 @@ public function checkin($ids = array())
continue;
}

$query = $db->getQuery(true)
->update($db->quoteName($tn))
->set($db->quoteName('checked_out') . ' = DEFAULT');

if ($fields['checked_out_time']->Null === 'YES')
{
$query = $db->getQuery(true)
->update($db->quoteName($tn))
->set($db->quoteName('checked_out') . ' = DEFAULT')
->set($db->quoteName('checked_out_time') . ' = NULL')
->where($db->quoteName('checked_out') . ' > 0');
$query->set($db->quoteName('checked_out_time') . ' = NULL');
}
else
{
$nullDate = $db->getNullDate();

$query = $db->getQuery(true)
->update($db->quoteName($tn))
->set($db->quoteName('checked_out') . ' = DEFAULT')
->set($db->quoteName('checked_out_time') . ' = :checkouttime')
->where($db->quoteName('checked_out') . ' > 0')
$query->set($db->quoteName('checked_out_time') . ' = :checkouttime')
->bind(':checkouttime', $nullDate);
}

if ($fields['checked_out']->Null === 'YES')
{
$query->where($db->quoteName('checked_out') . ' IS NOT NULL');
}
else
{
$query->where($db->quoteName('checked_out') . ' > 0');
}

$db->setQuery($query);

if ($db->execute())
Expand Down Expand Up @@ -169,56 +174,50 @@ public function getItems()
{
$db = $this->getDbo();
$tables = $db->getTableList();
$prefix = Factory::getApplication()->get('dbprefix');

// This array will hold table name as key and checked in item count as value.
$results = array();

foreach ($tables as $i => $tn)
foreach ($tables as $tn)
{
// Make sure we get the right tables based on prefix.
if (stripos($tn, Factory::getApplication()->get('dbprefix')) !== 0)
if (stripos($tn, $prefix) !== 0)
{
unset($tables[$i]);
continue;
}

if ($this->getState('filter.search') && stripos($tn, $this->getState('filter.search')) === false)
{
unset($tables[$i]);
continue;
}

$fields = $db->getTableColumns($tn);
$fields = $db->getTableColumns($tn, false);

if (!(isset($fields['checked_out']) && isset($fields['checked_out_time'])))
{
unset($tables[$i]);
continue;
}
}

foreach ($tables as $tn)
{
$query = $db->getQuery(true)
->select('COUNT(*)')
->from($db->quoteName($tn))
->where('checked_out > 0');

$db->setQuery($query);
->from($db->quoteName($tn));

if ($db->execute())
if ($fields['checked_out']->Null === 'YES')
{
$results[$tn] = $db->loadResult();

// Show only tables with items to checkin.
if ((int) $results[$tn] === 0)
{
unset($results[$tn]);
}
$query->where($db->quoteName('checked_out') . ' IS NOT NULL');
}
else
{
continue;
$query->where($db->quoteName('checked_out') . ' > 0');
}

$db->setQuery($query);
$count = $db->loadResult();

if ($count)
{
$results[$tn] = $count;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-eye:before,
div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-eye-dash:before,
div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before,
div.phpdebugbar-widgets-sqlqueries a.phpdebugbar-widgets-editor-link:before {
font-family:"Font Awesome 5 Free";
font-family: "Font Awesome 5 Free";
margin-right: 4px;
font-size: 12px;
font-weight: 900;
}

div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database:before {
Expand Down
16 changes: 3 additions & 13 deletions components/com_config/tmpl/config/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,9 @@

<hr>

<div id="page-site" class="tab-pane active">
<div class="row">
<div class="col-md-12">
<?php echo $this->loadTemplate('site'); ?>
</div>
<div class="col-md-12">
<?php echo $this->loadTemplate('seo'); ?>
</div>
<div class="col-md-12">
<?php echo $this->loadTemplate('metadata'); ?>
</div>
</div>
</div>
<?php echo $this->loadTemplate('site'); ?>
<?php echo $this->loadTemplate('seo'); ?>
<?php echo $this->loadTemplate('metadata'); ?>

<input type="hidden" name="task" value="">
<?php echo HTMLHelper::_('form.token'); ?>
Expand Down
14 changes: 1 addition & 13 deletions components/com_users/tmpl/profile/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,7 @@
<?php endif; ?>
<?php // Iterate through the fields in the set and display them. ?>
<?php foreach ($fields as $field) : ?>
<?php // If the field is hidden, just display the input. ?>
<?php if ($field->hidden) : ?>
<?php echo $field->input; ?>
<?php else : ?>
<div class="control-group">
<div class="control-label">
<?php echo $field->label; ?>
</div>
<div class="controls">
<?php echo $field->input; ?>
</div>
</div>
<?php endif; ?>
<?php echo $field->renderField(); ?>
<?php endforeach; ?>
</fieldset>
<?php endif; ?>
Expand Down
4 changes: 2 additions & 2 deletions libraries/src/Component/Router/Rules/MenuRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ protected function buildLookup($language = '*')
}

/**
* Dummy method to fulfill the interface requirements
* Dummy method to fulfil the interface requirements
*
* @param array &$segments The URL segments to parse
* @param array &$vars The vars that result from the segments
Expand All @@ -287,7 +287,7 @@ public function parse(&$segments, &$vars)
}

/**
* Dummy method to fulfill the interface requirements
* Dummy method to fulfil the interface requirements
*
* @param array &$query The vars that should be converted
* @param array &$segments The URL segments to create
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Component/Router/Rules/NomenuRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct(RouterView $router)
}

/**
* Dummy method to fulfill the interface requirements
* Dummy method to fulfil the interface requirements
*
* @param array &$query The query array to process
*
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Component/Router/Rules/StandardRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct(RouterView $router)
}

/**
* Dummy method to fulfill the interface requirements
* Dummy method to fulfil the interface requirements
*
* @param array &$query The query array to process
*
Expand Down
4 changes: 2 additions & 2 deletions templates/cassiopeia/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@

<?php if ($this->countModules('top-a')) : ?>
<div class="grid-child container-top-a">
<jdoc:include type="modules" name="top-a" style="cardGrey" />
<jdoc:include type="modules" name="top-a" style="card" />
</div>
<?php endif; ?>

Expand Down Expand Up @@ -182,7 +182,7 @@

<?php if ($this->countModules('bottom-a')) : ?>
<div class="grid-child container-bottom-a">
<jdoc:include type="modules" name="bottom-a" style="cardGrey" />
<jdoc:include type="modules" name="bottom-a" style="card" />
</div>
<?php endif; ?>

Expand Down
54 changes: 0 additions & 54 deletions templates/cassiopeia/html/layouts/chromes/cardGrey.php

This file was deleted.

8 changes: 4 additions & 4 deletions templates/cassiopeia/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@

<?php if ($this->countModules('top-a')) : ?>
<div class="grid-child container-top-a">
<jdoc:include type="modules" name="top-a" style="cardGrey" />
<jdoc:include type="modules" name="top-a" style="card" />
</div>
<?php endif; ?>

Expand All @@ -146,13 +146,13 @@
<?php endif; ?>

<div class="grid-child container-component">
<jdoc:include type="modules" name="main-top" style="cardGrey" />
<jdoc:include type="modules" name="main-top" style="card" />
<jdoc:include type="message" />
<jdoc:include type="modules" name="breadcrumbs" style="none" />
<main>
<jdoc:include type="component" />
</main>
<jdoc:include type="modules" name="main-bottom" style="cardGrey" />
<jdoc:include type="modules" name="main-bottom" style="card" />
</div>

<?php if ($this->countModules('sidebar-right')) : ?>
Expand All @@ -163,7 +163,7 @@

<?php if ($this->countModules('bottom-a')) : ?>
<div class="grid-child container-bottom-a">
<jdoc:include type="modules" name="bottom-a" style="cardGrey" />
<jdoc:include type="modules" name="bottom-a" style="card" />
</div>
<?php endif; ?>

Expand Down
1 change: 0 additions & 1 deletion templates/cassiopeia/scss/template.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
// Vendor overrides
@import "vendor/awesomplete";
@import "vendor/bootstrap/buttons";
@import "vendor/bootstrap/card";
@import "vendor/bootstrap/custom-forms";
@import "vendor/bootstrap/collapse";
@import "vendor/bootstrap/dropdown";
Expand Down
9 changes: 0 additions & 9 deletions templates/cassiopeia/scss/vendor/bootstrap/_card.scss

This file was deleted.