Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
wsbrenk authored Sep 6, 2023
1 parent 628d685 commit 823bfa0
Show file tree
Hide file tree
Showing 18 changed files with 109 additions and 115 deletions.
12 changes: 6 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@

<div align="left">
<img src="https://cdn.jsdelivr.net/gh/akasolace/ho@master/utils/buildResources/Logo_stable.png" alt="HO logo">
<img src="https://cdn.jsdelivr.net/gh/ho-dev/hattrickOrganizer@master/utils/buildResources/Logo_stable.png" alt="HO logo">
</div>

**Helper Tool for online-manager [Hattrick](http://www.hattrick.org)**
<table>
<tr>
<td>Latest Release</td>
<td>
<a href="https://github.com/akasolace/HO/releases/tag/7.2">
<a href="https://github.com/ho-dev/HattrickOrganizer/releases/tag/7.2">
<img src="https://img.shields.io/badge/HO-7.2-brightgreen.svg" alt="latest release" />
</a>
</td>
</tr>
<tr>
<td>Latest Beta Version</td>
<td>
<a href="https://github.com/akasolace/HO/releases/tag/beta">
<a href="https://github.com/ho-dev/HattrickOrganizer/releases/tag/beta">
<img src="https://img.shields.io/badge/HO-BETA-blue.svg" alt="latest beta version" />
</a>
</td>
</tr>
<tr>
<td>Latest Development Version</td>
<td>
<a href="https://github.com/akasolace/HO/releases/tag/dev">
<a href="https://github.com/ho-dev/HattrickOrganizer/releases/tag/dev">
<img src="https://img.shields.io/badge/HO-DEV-red.svg" alt="latest development version" />
</a>
</td>
</tr>
<tr>
<td>License</td>
<td>
<a href="https://github.com/akasolace/HO/blob/master/LICENSE">
<a href="https://github.com/ho-dev/HattrickOrganizer/blob/master/LICENSE">
<img src="https://img.shields.io/badge/licence-LGPL%203.0-lightgrey.svg" alt="license" />
</a>
</td>
Expand All @@ -49,7 +49,7 @@
<td>Lines of code</td>
<td>
<a href='https://github.com/Aaronepower/tokei'>
<img src='https://tokei.rs/b1/github/akasolace/ho?category=code' alt='Lines of code' />
<img src='https://tokei.rs/b1/github/ho-dev/hattrickorganizer?category=code' alt='Lines of code' />
</a>
</td>
</tr>
Expand Down
6 changes: 3 additions & 3 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You will need your own fork to work on the code. Go to the HO project page and h
~~~
git clone https://github.com/your-user-name/HO.git HO-yourname
cd HO-yourname
git remote add upstream https://github.com/akasolace/ho.git
git remote add upstream https://github.com/ho-dev/HattrickOrganizer.git
~~~

This creates the directory HO-yourname and connects your repository to the upstream (main project) HO repository.
Expand Down Expand Up @@ -110,8 +110,8 @@ If you added the upstream repository as described above you will see something l
~~~
origin [email protected]:yourname/HO.git (fetch)
origin [email protected]:yourname/HO.git (push)
upstream git://github.com/akasolace/ho.git (fetch)
upstream git://github.com/akasolace/ho.git (push)
upstream git://github.com/ho-dev/HattrickOrganizer.git (fetch)
upstream git://github.com/ho-dev/HattrickOrganizer.git (push)
~~~

Now your code is on GitHub, but it is not yet a part of the HO project. For that to happen, a pull request needs to be submitted on GitHub.
Expand Down
2 changes: 1 addition & 1 deletion docs/installing_ho.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Latest stable version

All versions of HO! can be downloaded from the release page but usually
you will want only to use the latest `stable
version <https://github.com/akasolace/HO/releases/latest>`__
version <https://github.com/ho-dev/HattrickOrganizer/releases/latest>`__

Directory structure
****************************************************
Expand Down
2 changes: 1 addition & 1 deletion docs/release_notes(stable).md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* refactoring of lineup panel (#1267)
* enable more than three teams (#1415)

## [Detailed Changelog](https://github.com/akasolace/HO/issues?q=milestone%3A6.0)
## [Detailed Changelog](https://github.com/ho-dev/HattrickOrganizer/issues?q=milestone%3A6.0)

### Database
* reducing data base file's disk space accelerates HO startup duration (#958)
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/core/gui/Credits.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import core.gui.theme.HOIconName;
import core.gui.theme.ThemeManager;
import core.model.HOVerwaltung;
import core.model.UserParameter;
import core.util.BrowserLauncher;
import core.util.HOLogger;

Expand Down Expand Up @@ -54,7 +53,7 @@ public static void showCredits(Component parent) {
hoPanel.add(hoLabel, gbc);

gbc.gridx = 1;
JLabel linkLabel = new HyperLinkLabel("https://akasolace.github.io/HO/");
JLabel linkLabel = new HyperLinkLabel("https://github.com/ho-dev/HattrickOrganizer/");
hoPanel.add(linkLabel, gbc);

gbc.gridy = 4;
Expand All @@ -76,7 +75,7 @@ public static void showCredits(Component parent) {
int result = JOptionPane.showOptionDialog(parent, creditsPanel, HOVerwaltung.instance().getLanguageString("window.about.title"), JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE, null, options1, null);
if (result == JOptionPane.YES_OPTION) {
try {
BrowserLauncher.openURL("https://raw.githubusercontent.com/akasolace/HO/master/LICENSE");
BrowserLauncher.openURL("https://raw.githubusercontent.com/ho-dev/HattrickOrganizer/master/LICENSE");
} catch (Exception ex) {
HOLogger.instance().log(HOMainFrame.class, ex);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/core/gui/HOMainFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,11 @@ public void actionPerformed(ActionEvent actionEvent) {
} else if (source.equals(m_jmAboutAbout)) {
Credits.showCredits(HOMainFrame.instance());
} else if (source.equals(m_jmHomepageItem)) { // Homepage
openURL("https://akasolace.github.io/HO/");
openURL("https://ho-dev.github.io/HattrickOrganizer/");
} else if (source.equals(m_jmWikiItem)) { // User Guide
openURL("https://ho.readthedocs.io/");
} else if (source.equals(m_jmReportAbug)) { // Report a bug
openURL("https://github.com/akasolace/HO/issues/new/choose");
openURL("https://github.com/ho-dev/HattrickOrganizer/issues/new/choose");
}

else if (source.equals(m_jmCheckUpdate)) {
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/core/net/MyConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public String uploadMatchOrder(int matchId, int teamId, MatchType matchType, Str
String result = readStream(postWebFileWithBodyParameters(htUrl + urlpara, paras, true,
"set_matchorder"));
String sError = XMLCHPPPreParser.getError(result);
if (sError.length() > 0) {
if (!sError.isEmpty()) {
throw new RuntimeException(sError);
}
return result;
Expand Down Expand Up @@ -548,15 +548,15 @@ public VersionInfo getVersion(String url) {
}

public VersionInfo getLatestStableVersion() {
return getVersion("https://github.com/akasolace/HO/releases/download/tag_stable/version.properties");
return getVersion("https://github.com/ho-dev/HattrickOrganizer/releases/download/tag_stable/version.properties");
}

public VersionInfo getLatestVersion() {
return getVersion("https://github.com/akasolace/HO/releases/download/dev/version.properties");
return getVersion("https://github.com/ho-dev/HattrickOrganizer/releases/download/dev/version.properties");
}

public VersionInfo getLatestBetaVersion() {
return getVersion("https://github.com/akasolace/HO/releases/download/beta/version.properties");
return getVersion("https://github.com/ho-dev/HattrickOrganizer/releases/download/beta/version.properties");
}

// ///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -584,7 +584,7 @@ public void enableProxy(ProxySettings proxySettings) {
*/
public String fetchRegionID(int teamId) {
String xml = fetchTeamDetails(teamId);
if ( xml.length()>0){
if (!xml.isEmpty()){
return XMLTeamDetailsParser.fetchRegionID(xml);
}
return "-1";
Expand Down Expand Up @@ -623,7 +623,7 @@ private String getCHPPWebFile(String surl) {
while (tryAgain) {
OAuthRequest request = new OAuthRequest(Verb.GET, surl);
infoHO(request);
if (m_OAAccessToken == null || m_OAAccessToken.getToken().length() == 0) {
if (m_OAAccessToken == null || m_OAAccessToken.getToken().isEmpty()) {
iResponse = 401;
} else {
m_OAService.signRequest(m_OAAccessToken, request);
Expand All @@ -638,7 +638,7 @@ private String getCHPPWebFile(String surl) {
saveCHPP(surl, returnString);
}
String sError = XMLCHPPPreParser.getError(returnString);
if (sError.length() > 0) {
if (!sError.isEmpty()) {
throw new RuntimeException(sError);
}
tryAgain = false;
Expand Down Expand Up @@ -763,7 +763,7 @@ public InputStream postWebFileWithBodyParameters(String surl, Map<String, String
}
infoHO(request);
request.addHeader("Content-Type", "application/x-www-form-urlencoded");
if (m_OAAccessToken == null || m_OAAccessToken.getToken().length() == 0) {
if (m_OAAccessToken == null || m_OAAccessToken.getToken().isEmpty()) {
iResponse = 401;
} else {
m_OAService.signRequest(m_OAAccessToken, request);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/core/training/WeeklyTrainingType.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public int[] getTrainingSkillOsmosisTrainingPositions() {
* Calculate skill increase of training week (Schum's formula)
* T = f(lvl) * K(coach) * K(assist) * K(int) * K(stam) * K(train) * K(age) * K(time),
* Source:
* <a href="https://github.com/akasolace/HO/issues/250#issuecomment-541170338">...</a>
* <a href="https://github.com/ho-dev/HattrickOrganizer/issues/250#issuecomment-541170338">...</a>
* <a href="https://www87.hattrick.org/Forum/Read.aspx?t=17024376&v=4&a=1&n=5">...</a>
* <a href="https://www88.hattrick.org/Forum/Read.aspx?t=17404127&n=9&v=6">...</a>
* <a href="https://www87.hattrick.org/Club/Manager/?userId=5176908">...</a> (Schum)
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/core/util/Updater.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public static ReleaseChannel byXmlURL(String xmlURL) {
}
}

private static final String DEV_UPDATE_XML_URL = "https://github.com/akasolace/HO/releases/download/dev/updates.xml";
private static final String BETA_UPDATE_XML_URL = "https://github.com/akasolace/HO/releases/download/beta/updates.xml";
private static final String STABLE_UPDATE_XML_URL = "https://github.com/akasolace/HO/releases/download/tag_stable/updates.xml";
private static final String DEV_UPDATE_XML_URL = "https://github.com/ho-dev/HattrickOrganizer/releases/download/dev/updates.xml";
private static final String BETA_UPDATE_XML_URL = "https://github.com/ho-dev/HattrickOrganizer/releases/download/beta/updates.xml";
private static final String STABLE_UPDATE_XML_URL = "https://github.com/ho-dev/HattrickOrganizer/releases/download/tag_stable/updates.xml";
private static final String UPDATER_APPLICATION_ID = "814";
private @Nullable String mediaID = null;
private static Updater clUpdater;
Expand Down
26 changes: 11 additions & 15 deletions src/main/java/module/pluginFeedback/FeedbackPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public boolean parseHTRating(String input) {
Matcher matcher;
String regex;

if (input.equals("")) {
if (input.isEmpty()) {
return false;
}

Expand Down Expand Up @@ -290,7 +290,7 @@ private void sendToServer() {
private boolean fetchRequiredLineup() {

try {
URL url = new URL("https://akasolace.github.io/HO/feedback.json");
URL url = new URL("https://ho-dev.github.io/HattrickOrganizer/feedback.json");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.connect();
Expand Down Expand Up @@ -329,28 +329,24 @@ private void formatPlayerBox(JLabel jl, String pos, Byte order) {
String tw = "(" + hoi.getLanguageString("ls.player.behaviour.towardswing.short").toUpperCase() + ")";

switch (order) {
case IMatchRoleID.NORMAL:
break;
case IMatchRoleID.OFFENSIVE:
s_order += " " + off + " " + down_arrow;
break;
case IMatchRoleID.DEFENSIVE:
s_order += " " + def + " " + up_arrow;
break;
case IMatchRoleID.TOWARDS_WING:
case IMatchRoleID.NORMAL -> {
}
case IMatchRoleID.OFFENSIVE -> s_order += " " + off + " " + down_arrow;
case IMatchRoleID.DEFENSIVE -> s_order += " " + def + " " + up_arrow;
case IMatchRoleID.TOWARDS_WING -> {
if (righSide.contains(pos)) {
s_order = left_arrow + " " + s_order + " " + tw;
} else {
s_order = s_order + " " + tw + " " + right_arrow;
}
break;
case IMatchRoleID.TOWARDS_MIDDLE:
}
case IMatchRoleID.TOWARDS_MIDDLE -> {
if (!righSide.contains(pos)) {
s_order = left_arrow + " " + s_order + " " + tm;
} else {
s_order = s_order + " " + tm + " " + right_arrow;
}
break;
}
}
jl.setText(s_order);
}
Expand Down Expand Up @@ -691,7 +687,7 @@ private void initComponents() {

}

private class SimpleLineup {
private static class SimpleLineup {
String server_url;
String server_status;
String lineupName;
Expand Down
11 changes: 5 additions & 6 deletions src/main/java/module/transfer/scout/MiniScoutDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.Serial;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
Expand Down Expand Up @@ -260,13 +259,13 @@ private void copyPaste() {

jtaCopyPaste.setText("");

if (message.equals("")) {
if (message.isEmpty()) {
switch (pc.getStatus()) {
case PlayerConverter.WARNING -> {
message = HOVerwaltung.instance().getLanguageString("scout_warning");
message += " " + getFieldsTextList(pc.getErrorFields());
message += " <br>" + HOVerwaltung.instance().getLanguageString("bug_ticket");
if (pc.getNotSupportedFields().size() > 0) {
if (!pc.getNotSupportedFields().isEmpty()) {
message += " <br>" + HOVerwaltung.instance().getLanguageString("scout_not_supported_fields");
message += " " + getFieldsTextList(pc.getNotSupportedFields());
}
Expand All @@ -278,7 +277,7 @@ private void copyPaste() {
case PlayerConverter.EMPTY_INPUT_ERROR -> message = HOVerwaltung.instance().getLanguageString("scout_error_input_empty");
default -> {
message = HOVerwaltung.instance().getLanguageString("scout_success");
if (pc.getNotSupportedFields().size() > 0) {
if (!pc.getNotSupportedFields().isEmpty()) {
message += " <br>" + HOVerwaltung.instance().getLanguageString("scout_not_supported_fields");
message += " " + getFieldsTextList(pc.getNotSupportedFields());
}
Expand All @@ -290,7 +289,7 @@ private void copyPaste() {

private String getFieldsTextList(List<String> fields){
StringBuilder errorFieldsTxt = new StringBuilder();
if (fields.size()>0){
if (!fields.isEmpty()){
//errorFieldsTxt = " (";
for (int i=0;i<fields.size();i++) {
if(i>=1) {
Expand Down Expand Up @@ -533,7 +532,7 @@ private void initComponents() {
copyPastePanel.setLayout(new BorderLayout());
jlExplainGuide = new JLabel(HOVerwaltung.instance().getLanguageString("ExplainHowToUseTransferScout"));
copyPastePanel.add(jlExplainGuide ,BorderLayout.NORTH);
JLabel linkLabel = new HyperLinkLabel("https://github.com/akasolace/HO/wiki/Transfer-Scout", "https://github.com/akasolace/HO/wiki/Transfer-Scout");
JLabel linkLabel = new HyperLinkLabel("https://github.com/ho-dev/HattrickOrganizer/wiki/Transfer-Scout", "https://github.com/ho-dev/HattrickOrganizer/wiki/Transfer-Scout");
copyPastePanel.add(linkLabel, BorderLayout.CENTER);
copyPastePanel.add(new JScrollPane(jtaCopyPaste),BorderLayout.SOUTH);
panel.add(copyPastePanel, BorderLayout.NORTH);
Expand Down
Loading

0 comments on commit 823bfa0

Please sign in to comment.