Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
Merge branch '2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ercanozkaya committed Jan 8, 2016
2 parents 66781ad + be9df31 commit db916cb
Show file tree
Hide file tree
Showing 20 changed files with 232 additions and 61 deletions.
2 changes: 1 addition & 1 deletion code/administrator/manifests/files/files_koowa.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU GPLv3 - http://www.gnu.org/licenses/gpl.html</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.joomlatools.com</authorUrl>
<version>2.1.3</version>
<version>2.1.4</version>
<description></description>

<scriptfile>script.php</scriptfile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ protected function _getKey()
*/
protected function _getGroup()
{
$group = $this->_mixer->getIdentifier();
$group = $this->getMixer()->getIdentifier();
return $group;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,18 @@ public function getAuthor()
*/
protected function _beforeSelect(KDatabaseContext $context)
{
$context->query
->columns(array('_author_id' => '_author.id'))
->columns(array('_author_name' => '_author.name'))
->columns(array('_author_username' => '_author.username'))
->columns(array('_author_email' => '_author.email'))
->columns(array('_author_params' => '_author.params'))
->columns(array('_author_block' => '_author.block'))
->columns(array('_author_activation' => '_author.activation'))
->columns(array('created_by_name' => '_author.name'))
->join(array('_author' => 'users'), 'tbl.created_by = _author.id');
if (!$context->query->isCountQuery())
{
$context->query
->columns(array('_author_id' => '_author.id'))
->columns(array('_author_name' => '_author.name'))
->columns(array('_author_username' => '_author.username'))
->columns(array('_author_email' => '_author.email'))
->columns(array('_author_params' => '_author.params'))
->columns(array('_author_block' => '_author.block'))
->columns(array('_author_activation' => '_author.activation'))
->columns(array('created_by_name' => '_author.name'))
->join(array('_author' => 'users'), 'tbl.created_by = _author.id');
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,19 @@ public function getLocker()
*/
protected function _beforeSelect(KDatabaseContext $context)
{
$context->query
->columns(array('_owner_id' => '_owner.id'))
->columns(array('_owner_name' => '_owner.name'))
->columns(array('_owner_username' => '_owner.username'))
->columns(array('_owner_email' => '_owner.email'))
->columns(array('_owner_params' => '_owner.params'))
->columns(array('_owner_block' => '_owner.block'))
->columns(array('_owner_activation' => '_owner.activation'))
->columns(array('locked_by_name' => '_owner.name'))
->join(array('_owner' => 'users'), 'tbl.locked_by = _owner.id');
if (!$context->query->isCountQuery())
{
$context->query
->columns(array('_owner_id' => '_owner.id'))
->columns(array('_owner_name' => '_owner.name'))
->columns(array('_owner_username' => '_owner.username'))
->columns(array('_owner_email' => '_owner.email'))
->columns(array('_owner_params' => '_owner.params'))
->columns(array('_owner_block' => '_owner.block'))
->columns(array('_owner_activation' => '_owner.activation'))
->columns(array('locked_by_name' => '_owner.name'))
->join(array('_owner' => 'users'), 'tbl.locked_by = _owner.id');
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,18 @@ public function getEditor()
*/
protected function _beforeSelect(KDatabaseContext $context)
{
$context->query
->columns(array('_editor_id' => '_editor.id'))
->columns(array('_editor_name' => '_editor.name'))
->columns(array('_editor_username' => '_editor.username'))
->columns(array('_editor_email' => '_editor.email'))
->columns(array('_editor_params' => '_editor.params'))
->columns(array('_editor_block' => '_editor.block'))
->columns(array('_editor_activation' => '_editor.activation'))
->columns(array('modified_by_name' => '_editor.name'))
->join(array('_editor' => 'users'), 'tbl.modified_by = _editor.id');
if (!$context->query->isCountQuery())
{
$context->query
->columns(array('_editor_id' => '_editor.id'))
->columns(array('_editor_name' => '_editor.name'))
->columns(array('_editor_username' => '_editor.username'))
->columns(array('_editor_email' => '_editor.email'))
->columns(array('_editor_params' => '_editor.params'))
->columns(array('_editor_block' => '_editor.block'))
->columns(array('_editor_activation' => '_editor.activation'))
->columns(array('modified_by_name' => '_editor.name'))
->join(array('_editor' => 'users'), 'tbl.modified_by = _editor.id');
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;libraries/koowa/components/com_koowa/controller/toolbar/actionbar.php
KLS_EDIT_ITEM_TYPE="Modifier {item_type}"
KLS_CREATE_NEW_ITEM_TYPE="Creëer nieuw {item_type}"
KLS_CREATE_NEW_ITEM_TYPE="Créer {item_type}"

;libraries/koowa/components/com_koowa/event/subscriber/unauthorized.php
KLS_YOU_ARE_NOT_AUTHORIZED_TO_ACCESS_THIS_RE_57A91="Vous n'êtes pas autorisés à accéder à cette ressource. Veuillez vous identifier et essayer à nouveau."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
; Copyright © 2014 Timble CVBA. (http://www.timble.net)
; GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
; Note : All ini files need to be saved as UTF-8

;libraries/koowa/components/com_koowa/controller/toolbar/actionbar.php
KLS_EDIT_ITEM_TYPE="Editează {item_type}"
KLS_CREATE_NEW_ITEM_TYPE="Creează nou {item_type}"

;libraries/koowa/components/com_koowa/event/subscriber/unauthorized.php
KLS_YOU_ARE_NOT_AUTHORIZED_TO_ACCESS_THIS_RE_57A91="Nu ai voie să accesezi această resursă. Logheză-te și încearcă din nou."

;libraries/koowa/components/com_koowa/template/helper/accordion.php
KLS_SLIDE="Slide"

;libraries/koowa/components/com_koowa/template/helper/behavior.php
KLS_CLEAR="Curăță"

;libraries/koowa/components/com_koowa/template/helper/grid.php
KLS_MOVE_UP="Mută mai sus"
KLS_MOVE_DOWN="Mută mai jos"
KLS_PLEASE_ORDER_BY_THIS_COLUMN_FIRST_BY_CLI_6340E="Ordonează mai întâi după această coloană apăsând pe titlul ei"

;libraries/koowa/components/com_koowa/template/helper/listbox.php
KLS_SELECT="Selectează"

;libraries/koowa/components/com_koowa/user/provider.php
KLS_ANONYMOUS="Anonim"

;libraries/koowa/libraries/controller/behavior/editable.php
KLS_LOCKED_BY_NAME_DATE="Blocat de {name} {date}"

;libraries/koowa/libraries/controller/toolbar/actionbar.php
KLS_DELETED_ITEMS_WILL_BE_LOST_FOREVER_WOUL_77DC3="Elementele vor fi șterse pentru totdeauna. Mergi mai departe?"

;libraries/koowa/libraries/date/date.php
KLS_YESTERDAY="Ieri"
KLS_TOMORROW="Mâine"
KLS_JUST_NOW="Chiar acum"

;libraries/koowa/libraries/template/helper/actionbar.php
KLS_YOU_ARE_NOT_ALLOWED_TO_PERFORM_THIS_ACTI_90D0A="Nu ai voie să faci asta."

;libraries/koowa/libraries/template/helper/behavior.php
KLS_LOADING="Încărcare..."

;libraries/koowa/libraries/template/helper/date.php
KLS_NEVER="Niciodată"

;libraries/koowa/libraries/template/helper/grid.php
KLS_FIND_BY_TITLE_OR_DESCRIPTION="Caută după titlu sau descriere&help;"
KLS_DISABLE_ITEM="Dezactivează elementul"
KLS_ENABLE_ITEM="Activează elementul"
KLS_UNPUBLISH_ITEM="Scoate de la publicare"
KLS_PUBLISH_ITEM="Publică elementul"

;libraries/koowa/libraries/template/helper/paginator.php
KLS_PAGE_X_OF_X="Pagina %s din %s"

KLS_NUMBER_SECOND_AGO="1 secundă în urmă"
KLS_NUMBER_SECONDS_AGO="{number} secunde în urmă"
KLS_NUMBER_MINUTE_AGO="1 minut în urmă"
KLS_NUMBER_MINUTES_AGO="{number} minute în urmă"
KLS_NUMBER_HOUR_AGO="1 oră în urmă"
KLS_NUMBER_HOURS_AGO="{number} ore în urmă"
KLS_NUMBER_DAY_AGO="1 zi în urmă"
KLS_NUMBER_DAYS_AGO="{number} zile în urmă"
KLS_NUMBER_WEEK_AGO="1 săptămână în urmă"
KLS_NUMBER_WEEKS_AGO="{number} săptămâni în urmă"
KLS_NUMBER_MONTH_AGO="1 lună în urmă"
KLS_NUMBER_MONTHS_AGO="{number} luni în urmă"
KLS_NUMBER_YEAR_AGO="1 an în urmă"
KLS_NUMBER_YEARS_AGO="{number} ani în urmă"
KLS_NUMBER_SECOND_FROM_NOW="Peste 1 secundă"
KLS_NUMBER_SECONDS_FROM_NOW="Peste {number} secunde"
KLS_NUMBER_MINUTE_FROM_NOW="Peste 1 minut"
KLS_NUMBER_MINUTES_FROM_NOW="Peste {number} minute"
KLS_NUMBER_HOUR_FROM_NOW="Peste 1 oră"
KLS_NUMBER_HOURS_FROM_NOW="Peste {number} ore"
KLS_NUMBER_DAY_FROM_NOW="Peste 1 zi"
KLS_NUMBER_DAYS_FROM_NOW="Peste {number} zile"
KLS_NUMBER_WEEK_FROM_NOW="Peste 1 săptămână"
KLS_NUMBER_WEEKS_FROM_NOW="Peste {number} săptămâni"
KLS_NUMBER_MONTH_FROM_NOW="Peste 1 lună"
KLS_NUMBER_MONTHS_FROM_NOW="Peste {number} luni"
KLS_NUMBER_YEAR_FROM_NOW="Peste 1 an"
KLS_NUMBER_YEARS_FROM_NOW="Peste {number} ani"
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
*/
class ComKoowaTemplateFilterAsset extends KTemplateFilterAsset
{
/**
* Static cache of component asset paths
*
* @var array
*/
protected static $_component_assets = array();

/**
* Initializes the options for the object
*
Expand All @@ -27,14 +34,43 @@ class ComKoowaTemplateFilterAsset extends KTemplateFilterAsset
*/
protected function _initialize(KObjectConfig $config)
{
$path = rtrim($this->getObject('request')->getSiteUrl()->getPath(), '/');
$path = rtrim($this->getObject('request')->getSiteUrl()->getPath(), '/');
$nooku_path = $path.'/media/koowa/com_koowa';
$schemes = array(
'assets://js' => $nooku_path.'/js',
'assets://css' => $nooku_path.'/css',
'assets://img' => $nooku_path.'/img',
'media://' => $path.'/media/',
'root://' => $path.'/',
'base://' => rtrim($this->getObject('request')->getBaseUrl()->getPath(), '/').'/'
);

if (empty(static::$_component_assets))
{
$components = $this->getObject('object.bootstrapper')->getComponents();

foreach($components as $component)
{
$identifier = $this->getIdentifier($component);

// Only register reusable components such as files and koowa
if ($identifier->domain === 'koowa')
{
$key = 'assets://'.$identifier->package;
$destination = $path.'/media/koowa/com_'.$identifier->package;

static::$_component_assets[$key] = $destination;
}
}
}

$schemes = array_merge($schemes, static::$_component_assets);

// Override default scheme with the media/ folder
$schemes['assets://'] = $path.'/media/';

$config->append(array(
'schemes' => array(
'media://' => $path.'/media/',
'root://' => $path.'/',
'base://' => rtrim($this->getObject('request')->getBaseUrl()->getPath(), '/').'/',
),
'schemes' => $schemes,
));

parent::_initialize($config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ public function filter(&$text)
<ktml:(?:script|style) # match ktml:script and ktml:style tags
[^(?:src=)]+ # anything before src=
src=" # match the link
(media:// # starts with media://
((?:media://|assets://) # starts with media:// or assets://
(?:koowa/)? # may or may not be in koowa/ folder
com_([^/]+)/ # match the com_foo part
(?:com_([^/]+)/|js/|css/|scss/) # either has package name (com_foo) or in framework
[^"]+)" # match the rest of the link
(.*)/>
~siUx';
Expand All @@ -91,7 +91,7 @@ public function filter(&$text)
{
foreach ($matches as $match)
{
$version = $this->_getVersion($match[2]);
$version = $this->_getVersion(!empty($match[2]) ? $match[2] : 'koowa');

if ($version)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ public function calendar($config = array())
}

if ($config->value) {
$config->value = strftime($config->format, JFactory::getDate($config->value)->format('U', false, true));
$date = new DateTime($config->value);
$config->value = strftime($config->format, $date->format('U'));
}

$attribs = $this->buildAttributes($config->attribs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,25 @@ public function find(array $info)
{
if(!empty($this->_override_path))
{
$path = $this->_override_path;
//Qualify partial templates.
if(dirname($info['url']) === '.')
{
if(empty($info['base'])) {
throw new RuntimeException('Cannot qualify partial template path');
}

$path = dirname($info['base']);
}
else $path = dirname($info['url']);

$file = pathinfo($info['url'], PATHINFO_FILENAME);
$format = pathinfo($info['url'], PATHINFO_EXTENSION);
$path = $this->_override_path.'/'.str_replace(parse_url($path, PHP_URL_SCHEME).'://', '', $path);

// Remove /view from the end of the override path
if (substr($path, strrpos($path, '/')) === '/view') {
$path = substr($path, 0, -5);
}

if(!$result = $this->realPath($path.'/'.$file.'.'.$format))
{
Expand Down
2 changes: 2 additions & 0 deletions code/libraries/koowa/libraries/database/row/abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ public function __construct(KObjectConfig $config)
// Set the row data
if (isset($config->data)) {
$this->setProperties($config->data->toArray(), $this->isNew());

unset($config->data);
}

//Set the status message
Expand Down
3 changes: 3 additions & 0 deletions code/libraries/koowa/libraries/database/rowset/abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public function __construct(KObjectConfig $config)
foreach($config->data->toArray() as $properties) {
$this->create($properties, $config->status);
}

// Unset data to save memory
unset($config->data);
}

//Set the status message
Expand Down
6 changes: 3 additions & 3 deletions code/libraries/koowa/libraries/dispatcher/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ protected function _loadTranslations(KControllerContextInterface $context)
*/
protected function _actionDispatch(KDispatcherContextInterface $context)
{
$view = $context->request->query->get('view', 'cmd');

//Redirect if no view information can be found in the request
if(!$context->request->query->has('view'))
if(empty($view))
{
$url = clone($context->request->getUrl());
$url->query['view'] = $this->getController()->getView()->getName();
Expand All @@ -128,8 +130,6 @@ protected function _actionDispatch(KDispatcherContextInterface $context)
throw new KDispatcherExceptionMethodNotAllowed('Method not allowed');
}

$view = $this->getRequest()->query->get('view', 'cmd');

//Set the controller based on the view and pass the view
$this->setController($view, array('view' => $view));

Expand Down
Loading

0 comments on commit db916cb

Please sign in to comment.