Skip to content

Commit

Permalink
neue version
Browse files Browse the repository at this point in the history
  • Loading branch information
diddipoeler committed Mar 12, 2021
1 parent 0f0d778 commit f84fae8
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 41 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Extensions ?

Änderungen
---------------------
* 12-03-2021: **3.8.70** Neue Felder für Kleinkaliber Schützenvereine
* 10-03-2021: **3.8.60** Neue Felder für Kleinkaliber Schützenvereine
* 03-03-2021: **3.8.50** Anpassungen Joomla 4
* 15-02-2021: **3.8.40** Historische Namen einer Mannschaft hinterlegen
Expand Down
2 changes: 1 addition & 1 deletion admin/models/forms/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ description="COM_SPORTSMANAGEMENT_SMALL_BORE_RIFLE_ASSOCIATION_F_SPORTS_SHOOTER"
<option value="1">JYES</option>
</field>
<field
name="smallcaliber_single_matches"
name="single_matches"
showon="use_smallcaliber:1"
type="text"
label="COM_SPORTSMANAGEMENT_ADMIN_PROJECT_SPORTS_SHOOTER_SINGLE_MATCHES"
Expand Down
70 changes: 47 additions & 23 deletions admin/models/jlextindividualsportes.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,41 @@ function checkGames($project, $match_id, $rid, $projectteam1_id, $projectteam2_i

//echo __LINE__.' projekt <pre>'.print_r($project,true).'</pre>';


switch ($project->sports_type_name)
{
case 'COM_SPORTSMANAGEMENT_ST_SMALL_BORE_RIFLE_ASSOCIATION':
$this->jsmquery->clear();
$this->jsmquery->select('COUNT(mc.id)');
$this->jsmquery->from('#__sportsmanagement_match_single AS mc');
$this->jsmquery->where('mc.match_id = ' . $match_id);
$this->jsmquery->where('mc.match_type = "SINGLE" ');
$this->jsmdb->setQuery($this->jsmquery);
$singleresult = $this->jsmdb->loadResult();
if ($singleresult < $project->smallcaliber_single_matches)
{
$insertmatch = $project->smallcaliber_single_matches - $singleresult;

for ($i = 0; $i < $insertmatch; $i++)
{
$temp = new stdClass;
$temp->round_id = $rid;
$temp->projectteam1_id = $projectteam1_id;
$temp->projectteam2_id = $projectteam2_id;
$temp->match_id = $match_id;
$temp->match_type = 'SINGLE';
$temp->published = 1;
$temp->teamplayer1_id = 0;
$temp->teamplayer2_id = 0;
$temp->summary = '';
$temp->preview = '';

$result = $this->jsmdb->insertObject('#__sportsmanagement_match_single', $temp);
}
}

break;
case 'COM_SPORTSMANAGEMENT_ST_TENNIS':

$this->jsmquery->clear();
$this->jsmquery->select('COUNT(mc.id)');
$this->jsmquery->from('#__sportsmanagement_match_single AS mc');
Expand Down Expand Up @@ -121,7 +155,8 @@ function checkGames($project, $match_id, $rid, $projectteam1_id, $projectteam2_i
$result = $this->jsmdb->insertObject('#__sportsmanagement_match_single', $temp);
}
}

break;
}
}

/**
Expand All @@ -133,29 +168,18 @@ function checkGames($project, $match_id, $rid, $projectteam1_id, $projectteam2_i
*/
function getProjectTeams($project_id)
{
$option = Factory::getApplication()->input->getCmd('option');

$app = Factory::getApplication();
$this->jsmquery->clear();
$this->jsmquery->select('pt.id AS value');
$this->jsmquery->select('t.name AS text,t.short_name AS short_name,t.notes');
$this->jsmquery->from('#__sportsmanagement_team AS t');
$this->jsmquery->join('INNER', '#__sportsmanagement_season_team_id AS st ON st.team_id = t.id');
$this->jsmquery->join('INNER', '#__sportsmanagement_project_team AS pt ON pt.team_id = st.id');
$this->jsmquery->where('pt.project_id = ' . $project_id);
$this->jsmquery->order('text ASC');

// $project_id = $app->getUserState($option . 'project');
// Create a new query object.
$db = sportsmanagementHelper::getDBConnection();
$query = $db->getQuery(true);

// $projectteam1_id = Factory::getApplication()->input->getvar('team1', 0);

// Select some fields
$query->select('pt.id AS value');
$query->select('t.name AS text,t.short_name AS short_name,t.notes');
$query->from('#__sportsmanagement_team AS t');
$query->join('INNER', '#__sportsmanagement_season_team_id AS st ON st.team_id = t.id');
$query->join('INNER', '#__sportsmanagement_project_team AS pt ON pt.team_id = st.id');
$query->where('pt.project_id = ' . $project_id);
$query->order('text ASC');

$db->setQuery($query);
$this->jsmdb->setQuery($this->jsmquery);

if (!$result = $db->loadObjectList())
if (!$result = $this->jsmdb->loadObjectList())
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion admin/sql/install.mysql.utf8.sql
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ CREATE TABLE IF NOT EXISTS `#__sportsmanagement_project` (
`linkedin` VARCHAR(250) NOT NULL DEFAULT '' ,
`twitter` VARCHAR(250) NOT NULL DEFAULT '' ,
`facebook` VARCHAR(250) NOT NULL DEFAULT '' ,

`single_matches` SMALLINT(6) NOT NULL DEFAULT '0' ,
PRIMARY KEY (`id`) ,
KEY `league_id` (`league_id`),
KEY `season_id` (`season_id`),
Expand Down
6 changes: 6 additions & 0 deletions admin/sql/updates/mysql/3.8.70
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ALTER TABLE `#__sportsmanagement_project` ADD `single_matches` SMALLINT(6) NOT NULL DEFAULT '0' ;



INSERT INTO `#__sportsmanagement_version_history` (`id`, `date`, `text`, `version`) VALUES
(NULL, '2021-03-12', 'COM_SPORTSMANAGEMENT_DB_UPDATE_2021-03-12', '3.8.70');
22 changes: 11 additions & 11 deletions admin/views/jlextindividualsportes/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,23 @@ function _displayDefault($tpl)
$project_id = $this->app->getUserState("$this->option.pid", '0');
$match_id = $this->jinput->getInt('id', 0);
$rid = $this->jinput->getInt('rid', 0);
$projectteam1_id = $this->jinput->getInt('team1', 0);
$projectteam2_id = $this->jinput->getInt('team2', 0);
$this->projectteam1_id = $this->jinput->getInt('team1', 0);
$this->projectteam2_id = $this->jinput->getInt('team2', 0);

$mdlProject = BaseDatabaseModel::getInstance("Project", "sportsmanagementModel");
$this->projectws = $mdlProject->getProject($project_id);
$mdlRound = BaseDatabaseModel::getInstance("Round", "sportsmanagementModel");
$roundws = $mdlRound->getRound($rid);

$this->model->checkGames($this->projectws , $match_id, $rid, $projectteam1_id, $projectteam2_id);
$this->model->checkGames($this->projectws , $match_id, $rid, $this->projectteam1_id, $this->projectteam2_id);

$matches = $this->get('Items');
$total = $this->get('Total');
$pagination = $this->get('Pagination');

$teams[] = HTMLHelper::_('select.option', '0', Text::_('COM_SPORTSMANAGEMENT_GLOBAL_SELECT_TEAM_PLAYER'));

if ($projectteams = $this->model->getPlayer($projectteam1_id, $project_id))
if ($projectteams = $this->model->getPlayer($this->projectteam1_id, $project_id))
{
$teams = array_merge($teams, $projectteams);
}
Expand All @@ -91,7 +91,7 @@ function _displayDefault($tpl)

$teams[] = HTMLHelper::_('select.option', '0', Text::_('COM_SPORTSMANAGEMENT_GLOBAL_SELECT_TEAM_PLAYER'));

if ($projectteams = $this->model->getPlayer($projectteam2_id, $project_id))
if ($projectteams = $this->model->getPlayer($this->projectteam2_id, $project_id))
{
$teams = array_merge($teams, $projectteams);
}
Expand All @@ -109,15 +109,15 @@ function _displayDefault($tpl)
$this->match_id = $match_id;
$this->rid = $rid;

$this->projectteam1_id = $projectteam1_id;
$this->projectteam2_id = $projectteam2_id;
// $this->projectteam1_id = $projectteam1_id;
// $this->projectteam2_id = $projectteam2_id;

//$this->projectws = $projectws;
$this->roundws = $roundws;

if ($result = $this->model->getPlayer($projectteam1_id, $project_id))
if ($result = $this->model->getPlayer($this->projectteam1_id, $project_id))
{
$this->getHomePlayer = $this->model->getPlayer($projectteam1_id, $project_id);
$this->getHomePlayer = $this->model->getPlayer($this->projectteam1_id, $project_id);
}
else
{
Expand All @@ -128,9 +128,9 @@ function _displayDefault($tpl)
$this->getHomePlayer = $exportplayer;
}

if ($result = $this->model->getPlayer($projectteam2_id, $project_id))
if ($result = $this->model->getPlayer($this->projectteam2_id, $project_id))
{
$this->getAwayPlayer = $this->model->getPlayer($projectteam2_id, $project_id);
$this->getAwayPlayer = $this->model->getPlayer($this->projectteam2_id, $project_id);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion list.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<extensionset name="sportsmanagement" description="JSM">
<extension name="sportsmanagement" element="com_sportsmanagement" type="component" version="3.8.60" detailsurl="https://raw.githubusercontent.com/diddipoeler/sportsmanagement/master/sportsmanagement-update.xml"/>
<extension name="sportsmanagement" element="com_sportsmanagement" type="component" version="3.8.70" detailsurl="https://raw.githubusercontent.com/diddipoeler/sportsmanagement/master/sportsmanagement-update.xml"/>
</extensionset>
2 changes: 1 addition & 1 deletion script.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class com_sportsmanagementInstallerScript
* The release value would ideally be extracted from <version> in the manifest file,
* but at preflight, the manifest file exists only in the uploaded temp folder.
*/
private $release = '3.8.60';
private $release = '3.8.70';

// $language_update = '';

Expand Down
21 changes: 21 additions & 0 deletions sportsmanagement-update.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1840,6 +1840,27 @@
<section>some-section</section>
<targetplatform name="joomla" version=".*" />
</update>



<update>
<name>Sports-Management</name>
<description>Sports-Management Component</description>
<element>com_sportsmanagement</element>
<type>component</type>
<version>3.8.70</version>
<infourl title="Sports-Management URL">http://fussballineuropa.de</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/diddipoeler/sportsmanagement/archive/master.zip</downloadurl>
</downloads>
<tags>
<tag>some-tag</tag>
</tags>
<maintainer>Sports-Management Inc.</maintainer>
<maintainerurl>http://fussballineuropa.de</maintainerurl>
<section>some-section</section>
<targetplatform name="joomla" version=".*" />
</update>


</updates>
2 changes: 1 addition & 1 deletion sportsmanagement.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<copyright>Copyright Info</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<!-- The version string is recorded in the components table -->
<version>3.8.60</version>
<version>3.8.70</version>
<!-- The description is optional and defaults to the name -->
<description>COM_SPORTSMANAGEMENT_DESCRIPTION</description>

Expand Down
4 changes: 2 additions & 2 deletions update-server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<description>Sports-Management Component</description>
<element>com_sportsmanagement</element>
<type>component</type>
<version>3.8.60</version>
<version>3.8.70</version>
<infourl title="Sports-Management URL">http://fussballineuropa.de</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/diddipoeler/sportsmanagement/archive/3.8.6.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/diddipoeler/sportsmanagement/archive/3.8.7.zip</downloadurl>
</downloads>
<tags>
<tag>some-tag</tag>
Expand Down

0 comments on commit f84fae8

Please sign in to comment.