Skip to content

Commit

Permalink
Update Windwalker
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Apr 5, 2015
1 parent c419fc7 commit 85b37a1
Show file tree
Hide file tree
Showing 42 changed files with 1,250 additions and 1,337 deletions.
8 changes: 4 additions & 4 deletions windwalker/admin/installscript/component.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

// Set component install success info
$grid->addRow(array('class' => 'row' . ($i % 2)));
$grid->setRowCell('num', ++$i, $td_class);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_COMPONENT'), $td_class);
$grid->setRowCell('num', ++$i, $tdClass);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_COMPONENT'), $tdClass);
$grid->setRowCell('name', JText::_(strtoupper($manifest->name)), array());
$grid->setRowCell('version', $manifest->version, $td_class);
$grid->setRowCell('state', $tick, $td_class);
$grid->setRowCell('version', $manifest->version, $tdClass);
$grid->setRowCell('state', $tick, $tdClass);
$grid->setRowCell('info', '', array());
8 changes: 4 additions & 4 deletions windwalker/admin/installscript/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

// Set component install success info
$grid->addRow(array('class' => 'row' . ($i % 2)));
$grid->setRowCell('num', ++$i, $td_class);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_MODULE'), $td_class);
$grid->setRowCell('num', ++$i, $tdClass);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_MODULE'), $tdClass);
$grid->setRowCell('name', JText::_(strtoupper($manifest->name)), array());
$grid->setRowCell('version', $manifest->version, $td_class);
$grid->setRowCell('state', $tick, $td_class);
$grid->setRowCell('version', $manifest->version, $tdClass);
$grid->setRowCell('state', $tick, $tdClass);
$grid->setRowCell('info', '', array());
8 changes: 4 additions & 4 deletions windwalker/admin/installscript/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@

// Set success table
$grid->addRow(array('class' => 'row' . ($i % 2)));
$grid->setRowCell('num', ++$i, $td_class);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_MODULE'), $td_class);
$grid->setRowCell('num', ++$i, $tdClass);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_MODULE'), $tdClass);
$grid->setRowCell('name', JText::_(strtoupper($var)), array());
$grid->setRowCell('version', $installer->manifest->version, $td_class);
$grid->setRowCell('state', $status, $td_class);
$grid->setRowCell('version', $installer->manifest->version, $tdClass);
$grid->setRowCell('state', $status, $tdClass);
$grid->setRowCell('info', JText::_($installer->manifest->description), array());
}
}
Expand Down
8 changes: 4 additions & 4 deletions windwalker/admin/installscript/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

// Set component install success info
$grid->addRow(array('class' => 'row' . ($i % 2)));
$grid->setRowCell('num', ++$i, $td_class);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_PLUGIN'), $td_class);
$grid->setRowCell('num', ++$i, $tdClass);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_PLUGIN'), $tdClass);
$grid->setRowCell('name', JText::_(strtoupper($manifest->name)), array());
$grid->setRowCell('version', $manifest->version, $td_class);
$grid->setRowCell('state', $tick, $td_class);
$grid->setRowCell('version', $manifest->version, $tdClass);
$grid->setRowCell('state', $tick, $tdClass);
$grid->setRowCell('info', '', array());
8 changes: 4 additions & 4 deletions windwalker/admin/installscript/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@

// Set success table
$grid->addRow(array('class' => 'row' . ($i % 2)));
$grid->setRowCell('num', ++$i, $td_class);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_PLUGIN'), $td_class);
$grid->setRowCell('num', ++$i, $tdClass);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_PLUGIN'), $tdClass);
$grid->setRowCell('name', JText::_($var), array());
$grid->setRowCell('version', $installer->manifest->version, $td_class);
$grid->setRowCell('state', $status, $td_class);
$grid->setRowCell('version', $installer->manifest->version, $tdClass);
$grid->setRowCell('state', $status, $tdClass);
$grid->setRowCell('info', JText::_($installer->manifest->description), array());
}
}
Expand Down
8 changes: 4 additions & 4 deletions windwalker/admin/installscript/windwalker.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@

// Set success table
$grid->addRow(array('class' => 'row' . ($i % 2)));
$grid->setRowCell('num', ++$i, $td_class);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_LIBRARY'), $td_class);
$grid->setRowCell('num', ++$i, $tdClass);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_LIBRARY'), $tdClass);
$grid->setRowCell('name', JText::_('LIB_WINDWALKER'), array());
$grid->setRowCell('version', $installer->manifest->version, $td_class);
$grid->setRowCell('state', $status, $td_class);
$grid->setRowCell('version', $installer->manifest->version, $tdClass);
$grid->setRowCell('state', $status, $tdClass);
$grid->setRowCell('info', JText::_($installer->manifest->description), array());
}
2 changes: 1 addition & 1 deletion windwalker/bin/build.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function execute()

rename('composer.phar', BUILD_ROOT . '/composer.phar');

$this->exec(sprintf('php %s/composer.phar update', BUILD_ROOT));
$this->exec(sprintf('php %s/composer.phar install', BUILD_ROOT));

$this->out('>> Remove composer.phar');
unlink(sprintf('%s/composer.phar', BUILD_ROOT));
Expand Down
47 changes: 25 additions & 22 deletions windwalker/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 35 additions & 4 deletions windwalker/src/DI/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* Based on Joomla DI Container.
*
* @since 2.0
* @since 2.0
*/
class Container extends JoomlaContainer
{
Expand Down Expand Up @@ -43,7 +43,7 @@ class Container extends JoomlaContainer
/**
* Get the container instance by name.
*
* @param string $name Container name, if is null, get the main container.
* @param string $name Container name, if is null, get the main container.
*
* @return Container
*/
Expand Down Expand Up @@ -116,9 +116,8 @@ public function set($key, $value, $shared = false, $protected = false)
*/
public function get($key, $forceNew = false)
{
$raw = $this->getRaw($key);

$key = $this->resolveAlias($key);
$raw = $this->getRaw($key);

if (is_null($raw))
{
Expand All @@ -138,6 +137,38 @@ public function get($key, $forceNew = false)
return call_user_func($raw['callback'], $this);
}

/**
* Get the raw data assigned to a key.
* Override to prevent joomla-framework bug not resolving parent aliases
*
* @param string $key The key for which to get the stored item.
*
* @return mixed
*
* @since 2.0.11
*/
protected function getRaw($key)
{
if (isset($this->dataStore[$key]))
{
return $this->dataStore[$key];
}

$aliasKey = $this->resolveAlias($key);

if ($aliasKey != $key && isset($this->dataStore[$aliasKey]))
{
return $this->dataStore[$aliasKey];
}

if ($this->parent instanceof JoomlaContainer)
{
return $this->parent->getRaw($key);
}

return null;
}

/**
* Dump all dataStores for debugging.
*
Expand Down
2 changes: 1 addition & 1 deletion windwalker/src/System/installscript.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
$tick = '<i class="icon-publish"></i>';
$cross = '<i class="icon-unpublish"></i>';

$td_class = array('style' => 'text-align:center;');
$tdClass = array('style' => 'text-align:center;');

// Set Extension install success info
// ========================================================================
Expand Down
8 changes: 4 additions & 4 deletions windwalker/src/System/installscript/component.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

// Set component install success info
$grid->addRow(array('class' => 'row' . ($i % 2)));
$grid->setRowCell('num', ++$i, $td_class);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_COMPONENT'), $td_class);
$grid->setRowCell('num', ++$i, $tdClass);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_COMPONENT'), $tdClass);
$grid->setRowCell('name', JText::_(strtoupper($manifest->name)), array());
$grid->setRowCell('version', $manifest->version, $td_class);
$grid->setRowCell('state', $tick, $td_class);
$grid->setRowCell('version', $manifest->version, $tdClass);
$grid->setRowCell('state', $tick, $tdClass);
$grid->setRowCell('info', '', array());

// Render Information
Expand Down
8 changes: 4 additions & 4 deletions windwalker/src/System/installscript/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

// Set module install success info
$grid->addRow(array('class' => 'row' . ($i % 2)));
$grid->setRowCell('num', ++$i, $td_class);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_MODULE'), $td_class);
$grid->setRowCell('num', ++$i, $tdClass);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_MODULE'), $tdClass);
$grid->setRowCell('name', JText::_(strtoupper($manifest->name)), array());
$grid->setRowCell('version', $manifest->version, $td_class);
$grid->setRowCell('state', $tick, $td_class);
$grid->setRowCell('version', $manifest->version, $tdClass);
$grid->setRowCell('state', $tick, $tdClass);
$grid->setRowCell('info', '', array());
8 changes: 4 additions & 4 deletions windwalker/src/System/installscript/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@

// Set success table
$grid->addRow(array('class' => 'row' . ($i % 2)));
$grid->setRowCell('num', ++$i, $td_class);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_MODULE'), $td_class);
$grid->setRowCell('num', ++$i, $tdClass);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_MODULE'), $tdClass);
$grid->setRowCell('name', JText::_(strtoupper($var)), array());
$grid->setRowCell('version', $installer->manifest->version, $td_class);
$grid->setRowCell('state', $status, $td_class);
$grid->setRowCell('version', $installer->manifest->version, $tdClass);
$grid->setRowCell('state', $status, $tdClass);
$grid->setRowCell('info', JText::_($installer->manifest->description), array());
}
}
Expand Down
8 changes: 4 additions & 4 deletions windwalker/src/System/installscript/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

// Set plugin install success info
$grid->addRow(array('class' => 'row' . ($i % 2)));
$grid->setRowCell('num', ++$i, $td_class);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_PLUGIN'), $td_class);
$grid->setRowCell('num', ++$i, $tdClass);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_PLUGIN'), $tdClass);
$grid->setRowCell('name', JText::_(strtoupper($manifest->name)), array());
$grid->setRowCell('version', $manifest->version, $td_class);
$grid->setRowCell('state', $tick, $td_class);
$grid->setRowCell('version', $manifest->version, $tdClass);
$grid->setRowCell('state', $tick, $tdClass);
$grid->setRowCell('info', '', array());
8 changes: 4 additions & 4 deletions windwalker/src/System/installscript/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@

// Set success table
$grid->addRow(array('class' => 'row' . ($i % 2)));
$grid->setRowCell('num', ++$i, $td_class);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_PLUGIN'), $td_class);
$grid->setRowCell('num', ++$i, $tdClass);
$grid->setRowCell('type', JText::_('COM_INSTALLER_TYPE_PLUGIN'), $tdClass);
$grid->setRowCell('name', JText::_($var), array());
$grid->setRowCell('version', $installer->manifest->version, $td_class);
$grid->setRowCell('state', $status, $td_class);
$grid->setRowCell('version', $installer->manifest->version, $tdClass);
$grid->setRowCell('state', $status, $tdClass);
$grid->setRowCell('info', JText::_($installer->manifest->description), array());
}
}
Expand Down
Loading

0 comments on commit 85b37a1

Please sign in to comment.