Skip to content

Commit

Permalink
Docblocks and J version markers
Browse files Browse the repository at this point in the history
  • Loading branch information
elkuku committed Apr 27, 2012
1 parent 9cc13fa commit ff09164
Show file tree
Hide file tree
Showing 35 changed files with 193 additions and 149 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,9 @@ public function delete_project($complete = false)
//-- Get the project
try
{
$project = EcrProjectHelper::getProject()
->remove($complete);
$project = EcrProjectHelper::getProject();

$project->remove($complete);

$this->setRedirect('index.php?option=com_easycreator'
, sprintf(jgettext('The Project %s has been removed'), $project->name));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: elkuku
* Date: 14.01.12
* Time: 03:27
* To change this template use File | Settings | File Templates.
* @package EasyCreator
* @subpackage Helpers
* @author Nikolai Plath (elkuku)
* @author Created on 25-Apr-2011
* @license GNU/GPL, see JROOT/LICENSE.php
*/
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: elkuku
* Date: 14.01.12
* Time: 04:53
* To change this template use File | Settings | File Templates.
* @package EasyCreator
* @subpackage Helpers
* @author Nikolai Plath (elkuku)
* @author Created on 25-Apr-2011
* @license GNU/GPL, see JROOT/LICENSE.php
*/
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: elkuku
* Date: 14.01.12
* Time: 03:27
* To change this template use File | Settings | File Templates.
* @package EasyCreator
* @subpackage Helpers
* @author Nikolai Plath (elkuku)
* @author Created on 25-Apr-2011
* @license GNU/GPL, see JROOT/LICENSE.php
*/
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: elkuku
* Date: 14.01.12
* Time: 04:53
* To change this template use File | Settings | File Templates.
* @package EasyCreator
* @subpackage Helpers
* @author Nikolai Plath (elkuku)
* @author Created on 25-Apr-2011
* @license GNU/GPL, see JROOT/LICENSE.php
*/
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
<?php defined('_JEXEC') || die('=;)');
/**
* Created by JetBrains PhpStorm.
* User: elkuku
* Date: 24.04.12
* Time: 11:28
* To change this template use File | Settings | File Templates.
* @package EasyCreator
* @subpackage Helpers
* @author Nikolai Plath (elkuku)
* @author Created on 25-Apr-2011
* @license GNU/GPL, see JROOT/LICENSE.php
*/

class EcrDeployerTypeFtp extends EcrDeployer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<?php
<?php defined('_JEXEC') || die('=;)');
/**
* Created by JetBrains PhpStorm.
* User: elkuku
* Date: 24.04.12
* Time: 11:43
* To change this template use File | Settings | File Templates.
* @package EasyCreator
* @subpackage Helpers
* @author Nikolai Plath (elkuku)
* @author Created on 25-Apr-2011
* @license GNU/GPL, see JROOT/LICENSE.php
*/

/**
*
*/
class EcrDeployerTypeGithub extends EcrDeployer
{
Expand Down
10 changes: 5 additions & 5 deletions administrator/components/com_easycreator/helpers/ftp.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: elkuku
* Date: 18.04.12
* Time: 16:15
* To change this template use File | Settings | File Templates.
* @package EasyCreator
* @subpackage Helpers
* @author Nikolai Plath (elkuku)
* @author Created on 25-Apr-2011
* @license GNU/GPL, see JROOT/LICENSE.php
*/

jimport('joomla.client.ftp');
Expand Down
10 changes: 5 additions & 5 deletions administrator/components/com_easycreator/helpers/github.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: elkuku
* Date: 17.04.12
* Time: 13:25
* To change this template use File | Settings | File Templates.
* @package EasyCreator
* @subpackage Helpers
* @author Nikolai Plath (elkuku)
* @author Created on 25-Apr-2011
* @license GNU/GPL, see JROOT/LICENSE.php
*
* @property-read EcrGithubDownloads $downloads
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
<?php defined('_JEXEC') || die('=;)');
/**
* Created by JetBrains PhpStorm.
* User: elkuku
* Date: 17.04.12
* Time: 13:37
* To change this template use File | Settings | File Templates.
* @package EasyCreator
* @subpackage Helpers
* @author Nikolai Plath (elkuku)
* @author Created on 25-Apr-2011
* @license GNU/GPL, see JROOT/LICENSE.php
*/

/**
Expand Down
15 changes: 9 additions & 6 deletions administrator/components/com_easycreator/helpers/github/http.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?php
<?php defined('_JEXEC') || die('=;)');
/**
* Created by JetBrains PhpStorm.
* User: elkuku
* Date: 18.04.12
* Time: 17:56
* To change this template use File | Settings | File Templates.
* @package EasyCreator
* @subpackage Helpers
* @author Nikolai Plath (elkuku)
* @author Created on 25-Apr-2011
* @license GNU/GPL, see JROOT/LICENSE.php
*/

/**
*
*/
class EcrGithubHttp extends JGithubHttp
{
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
<?php defined('_JEXEC') || die('=;)');
/**
* Created by JetBrains PhpStorm.
* User: elkuku
* Date: 17.04.12
* Time: 17:08
* To change this template use File | Settings | File Templates.
* @package EasyCreator
* @subpackage Helpers
* @author Nikolai Plath (elkuku)
* @author Created on 25-Apr-2011
* @license GNU/GPL, see JROOT/LICENSE.php
*/

/**
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_easycreator/helpers/language.php
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,7 @@ private function _buildFileList()
if(JFolder::exists($copyItem))
{
//--Add all PHP and XML files from a given folder
//-- @Joomla!-version-check
switch($this->project->JCompat)
{
case '1.5' :
Expand Down Expand Up @@ -1487,6 +1488,7 @@ public static function createFileFromRequest()

$fileName = self::getFileName($lang, $scope, $project);

//-- @Joomla!-compat 1.5
$commentChar =($project->JCompat == '1.5') ? '#' : ';';

$fileContents = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ abstract class EcrProjectBase

public $method = '';

/**
* Joomla! compatibility mode
* @Joomla!-compat 1.5
* @var string
*/
public $JCompat = '1.5';

public $phpVersion = '4';
Expand Down Expand Up @@ -906,7 +911,10 @@ private function readProjectXml($projectName)
$this->scope = (string)$manifest->attributes()->scope;
$this->name = (string)$manifest->name;
$this->comName = (string)$manifest->comname;

//-- @Joomla!-compat 1.5
$this->JCompat = ((string)$manifest->JCompat) ? (string)$manifest->JCompat : '1.5';

$this->langFormat = (string)$manifest->langFormat;
$this->zipPath = (string)$manifest->zipPath;
$this->headerType = (string)$manifest->headerType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,19 @@ public function create(EcrProjectBase $project)

$rootTag = '';

//-- @Joomla!-version-check
switch($this->project->JCompat)
{
case '1.5':
$rootTag = 'install';
break;

case '1.6':
case '1.7':
case '2.5':
$rootTag = 'extension';
break;

case '1.5':
$rootTag = 'install';
break;
default:
JFactory::getApplication()->enqueueMessage(
__METHOD__.'Unknown JCompat: '.$this->project->JCompat, 'error');
Expand Down Expand Up @@ -233,6 +235,7 @@ private function processInstall()
$installFiles = EcrProjectHelper::findInstallFiles($this->project);

//-- PHP install scripts
//-- @Joomla!-version-check
switch($this->project->JCompat)
{
case '1.5':
Expand All @@ -258,11 +261,13 @@ private function processInstall()
$uninstall = $this->manifest->addChild('uninstall');
$uninstallSql = $uninstall->addChild('sql');

//-- @Joomla!-version-check
switch($this->project->JCompat)
{
case '1.6':
case '1.7':
//-- J! 1.6 update stuff
case '2.5':
//-- J! 1.6+ update stuff
$update = $this->manifest->addChild('update');
$updateSql = $update->addChild('schemas');

Expand All @@ -279,6 +284,8 @@ private function processInstall()
break;

default:
JFactory::getApplication()->enqueueMessage(
__METHOD__.'Unknown JCompat: '.$this->project->JCompat, 'error');
break;
}

Expand Down Expand Up @@ -475,6 +482,7 @@ private function processSite()
}
}

//-- @Joomla!-compat 1.5
if(count($languageFiles)
&& $this->project->JCompat == '1.5'
)
Expand Down Expand Up @@ -539,6 +547,7 @@ private function processAdmin()
$menu->addAttribute('img', $s);
}

//-- @Joomla!-compat 1.5
if(isset($def_menu['link'])
&& $this->project->JCompat == '1.5'
)
Expand Down Expand Up @@ -578,6 +587,7 @@ private function processAdmin()
$menu->addAttribute('img', $s);
}

//-- @Joomla!-version-check
switch($this->project->JCompat)
{
case '1.5' :
Expand Down Expand Up @@ -644,6 +654,7 @@ private function processAdmin()
}
}

//-- @Joomla!-compat 1.5
if(count($languageFiles)
&& $this->project->JCompat == '1.5'
)
Expand Down Expand Up @@ -800,6 +811,7 @@ private function processParameters()

if('template' == $this->project->type)
{
//-- @Joomla!-version-check
switch($this->project->JCompat)
{
case '1.5':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class EcrProjectTypeCliapp extends EcrProjectBase
*/
public $prefix = 'cap_';

//-- @Joomla!-compat 1.6
public $JCompat = '1.6';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public function getLanguagePaths($scope = '')
return $paths;
}

//-- @Joomla!-version-check
switch($this->JCompat)
{
case '1.5':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class EcrProjectTypeLibrary extends EcrProjectBase
*/
public $prefix = 'lib_';

//-- @Joomla!-compat 1.6
public $JCompat = '1.6';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class EcrProjectTypeWebapp extends EcrProjectBase
*/
public $prefix = 'wap_';

//-- @Joomla!-compat 1.6
public $JCompat = '1.6';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ public function getOptions()
{
$project = EcrProjectHelper::getProject();

//-- @Joomla!-compat 1.5
if('1.5' == $project->JCompat)
{
EcrHtml::displayMessage(jgettext('Install scripts are avilable from Joomla! 1.6 + projects'), 'error');
EcrHtml::displayMessage(jgettext('Install scripts are available for Joomla! 1.6 + projects only'), 'error');

return false;
}

// var_dump($project);
$ecr_project = JRequest::getCmd('ecr_project');
$basePathDest = JPATH_ROOT.DS.'administrator'.DS.'components'.DS.$ecr_project;

Expand All @@ -62,6 +62,8 @@ public function getOptions()
EcrHtml::drawLoggingOptions();

EcrHtml::drawSubmitParts();

return $this;
}//function

/**
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_easycreator/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.16-23-g5acf544
0.0.16-24-g9cc13fa
Loading

0 comments on commit ff09164

Please sign in to comment.