-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
530 additions
and
502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
# This file is for unifying the coding style for different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
# Spaces in coffee | ||
[**.coffee] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[**.js] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# Tabs in less | ||
[**.less] | ||
indent_style = tab | ||
indent_size = 2 | ||
|
||
[**.css] | ||
indent_style = tab | ||
indent_size = 2 | ||
|
||
[**.php] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[**.html] | ||
indent_style = tab | ||
indent_size = 2 | ||
# This file is for unifying the coding style for different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
# Spaces in coffee | ||
[**.coffee] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[**.js] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# Tabs in less | ||
[**.less] | ||
indent_style = tab | ||
indent_size = 2 | ||
|
||
[**.css] | ||
indent_style = tab | ||
indent_size = 2 | ||
|
||
[**.php] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[**.html] | ||
indent_style = tab | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
jobs: | ||
sonarcloud: | ||
name: SonarCloud | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- name: SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
jobs: | ||
sonarcloud: | ||
name: SonarCloud | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- name: SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
*.json | ||
tmp/* | ||
tmp/* | ||
/vendor/ | ||
!/tmp/stats.answer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
# Module OGSpy Autoupdate | ||
|
||
Ce module permet de télécharger et de mettre à jour OGSpy et ses modules | ||
|
||
## Pré Requis | ||
|
||
* Nécessite OGSpy 3.3.2 [Dépot OGSpy](https://github.com/ogsteam/ogspy) | ||
* Modules PHP requies : json_decode, zip and enable allow_url_fopen | ||
|
||
## Configuration | ||
|
||
Aucune configuration à réaliser même si des options sont disponibles pour afficher les versions développeur. | ||
|
||
Il est néanmoins possible d'utiliser son compte GitHub pour récupérer les données du dépôt OGSteam. Vous pouvez générer une clé dans la section Settings/Developper Settings/Personal Access Token et de l'utiliser avec vos paramètres Autoupdate. A défaut Autoupdate utilisera une clé appartenant à l'OGSteam. | ||
## Pour nous contacter | ||
|
||
* [Forum OGSteam](https://forum.ogsteam.eu) : Vous y trouverez notre équipe de support ainsi que l'invitation vers notre salon Discord | ||
|
||
## Index Codacy | ||
|
||
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/c13a9e1d4d4f46598f1201619b54a6b2)](https://www.codacy.com/app/OGSteam/mod-autoupdate?utm_source=github.com&utm_medium=referral&utm_content=OGSteam/mod-autoupdate&utm_campaign=Badge_Grade) | ||
|
||
## Contact | ||
|
||
* [Darknoon](https://github.com/darknoon29) | ||
* (<https://www.ogsteam.eu>) ou Discord : (<https://discord.gg/Azcb67b>) | ||
|
||
## Autoupdate (English) | ||
|
||
Autoupdate is a mod for OGSpy that maintains all OGSpy Modules by download them or updates them. This module connects to Github API to verify updates every 24hrs. | ||
|
||
The module is available in Franch, English, Spanish, Italian, Portuguese. | ||
|
||
## How do I get set up? | ||
|
||
* This module requires OGSpy to work correctly | ||
* On server side, you need following PHP modules : json_decode, zip and enable allow_url_fopen | ||
|
||
## Contribution guidelines | ||
|
||
* As this mod can broke the OGSpy installation, the Pull Request Review is mandatory. | ||
So if you need a modification, please Fork the mod to you user space and create the pull request when you have done all your new stuff :-) | ||
|
||
* If possible, [read PHP Standards](https://www.php-fig.org/psr/) | ||
|
||
## Contact (English Spoken) | ||
|
||
* [Darknoon](https://github.com/darknoon29) | ||
* [Forum](https://www.ogsteam.eu) ou [Discord](https://discord.gg/Azcb67b) | ||
# Module OGSpy Autoupdate | ||
|
||
Ce module permet de télécharger et de mettre à jour OGSpy et ses modules | ||
|
||
## Pré Requis | ||
|
||
* Nécessite OGSpy 3.3.2 [Dépot OGSpy](https://github.com/ogsteam/ogspy) | ||
* Modules PHP requies : json_decode, zip and enable allow_url_fopen | ||
|
||
## Configuration | ||
|
||
Aucune configuration à réaliser même si des options sont disponibles pour afficher les versions développeur. | ||
|
||
Il est néanmoins possible d'utiliser son compte GitHub pour récupérer les données du dépôt OGSteam. Vous pouvez générer une clé dans la section Settings/Developper Settings/Personal Access Token et de l'utiliser avec vos paramètres Autoupdate. A défaut Autoupdate utilisera une clé appartenant à l'OGSteam. | ||
## Pour nous contacter | ||
|
||
* [Forum OGSteam](https://forum.ogsteam.eu) : Vous y trouverez notre équipe de support ainsi que l'invitation vers notre salon Discord | ||
|
||
## Index Codacy | ||
|
||
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/c13a9e1d4d4f46598f1201619b54a6b2)](https://www.codacy.com/app/OGSteam/mod-autoupdate?utm_source=github.com&utm_medium=referral&utm_content=OGSteam/mod-autoupdate&utm_campaign=Badge_Grade) | ||
|
||
## Contact | ||
|
||
* [Darknoon](https://github.com/darknoon29) | ||
* (<https://www.ogsteam.eu>) ou Discord : (<https://discord.gg/Azcb67b>) | ||
|
||
## Autoupdate (English) | ||
|
||
Autoupdate is a mod for OGSpy that maintains all OGSpy Modules by download them or updates them. This module connects to Github API to verify updates every 24hrs. | ||
|
||
The module is available in Franch, English, Spanish, Italian, Portuguese. | ||
|
||
## How do I get set up? | ||
|
||
* This module requires OGSpy to work correctly | ||
* On server side, you need following PHP modules : json_decode, zip and enable allow_url_fopen | ||
|
||
## Contribution guidelines | ||
|
||
* As this mod can broke the OGSpy installation, the Pull Request Review is mandatory. | ||
So if you need a modification, please Fork the mod to you user space and create the pull request when you have done all your new stuff :-) | ||
|
||
* If possible, [read PHP Standards](https://www.php-fig.org/psr/) | ||
|
||
## Contact (English Spoken) | ||
|
||
* [Darknoon](https://github.com/darknoon29) | ||
* [Forum](https://www.ogsteam.eu) ou [Discord](https://discord.gg/Azcb67b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
<?php | ||
global $lang,$ui_lang,$user_data,$server_config; | ||
|
||
/** | ||
* Autoupdate Controller | ||
* @package [Mod] Autoupdate | ||
* @subpackage main | ||
* @author Bartheleway <[email protected]> | ||
* @copyright Copyright © 2016, http://ogsteam.eu/ | ||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License | ||
* @copyright Copyright © 2016, https://ogsteam.eu/ | ||
* @license https://opensource.org/licenses/gpl-license.php GNU Public License | ||
* @version 2.1.9 | ||
*/ | ||
|
||
|
@@ -16,13 +17,13 @@ | |
|
||
require_once("views/page_header.php"); | ||
if (!function_exists('random_bytes')) { | ||
die("OGSpy cannot work anymore without Php Security Layers, please use PHP(>= 7.0)"); | ||
die("OGSpy cannot work anymore without Php Security Layers, please use PHP(>= 8.0)"); | ||
} | ||
if (!function_exists('json_decode')) { | ||
die("Autoupdate cannot work without the JSON Library, please use PHP(>= 5.2)"); | ||
die("Autoupdate cannot work without the PHP Module JSON Library"); | ||
} | ||
if (!extension_loaded('zip')) { | ||
die("Autoupdate cannot work without the ZIP Library, Please check your server configuration"); | ||
die("Autoupdate cannot work without the PHP Module ZIP"); | ||
} | ||
if (!ini_get('allow_url_fopen')) { | ||
die("Autoupdate cannot work without external connections (fopen), Please check your server configuration"); | ||
|
@@ -48,49 +49,38 @@ | |
$sub = $pub_sub; | ||
} | ||
|
||
if ($user_data["user_admin"] == 1 || $user_data["user_coadmin"] == 1) { | ||
if ($sub != "overview") { | ||
$bouton1 = "\t\t" . "<td class='c' align='center' width='150' style='cursor:pointer' onclick=\"window.location = 'index.php?action=autoupdate&sub=overview';\">"; | ||
?> | ||
|
||
$bouton1 .= "<span style=\"color: lime; \">" . $lang['autoupdate_autoupdate_table'] . "</span>"; | ||
$bouton1 .= "</td>\n"; | ||
} else { | ||
$bouton1 = "\t\t" . "<th width='150'>"; | ||
$bouton1 .= "<span style=\"color: #5CCCE8; \">" . $lang['autoupdate_autoupdate_table'] . "</span>"; | ||
$bouton1 .= "</th>\n"; | ||
} | ||
if ($sub != "down") { | ||
$bouton2 = "\t\t" . "<td class='c' align='center' width='150' style='cursor:pointer' onclick=\"window.location = 'index.php?action=autoupdate&sub=down';\">"; | ||
$bouton2 .= "<span style=\"color: lime; \">" . $lang['autoupdate_autoupdate_down'] . "</span>"; | ||
$bouton2 .= "</td>\n"; | ||
} else { | ||
$bouton2 = "\t\t" . "<th width='150'>"; | ||
$bouton2 .= "<span style=\"color: #5CCCE8; \">" . $lang['autoupdate_autoupdate_down'] . "</span>"; | ||
$bouton2 .= "</th>\n"; | ||
} | ||
} else { | ||
$bouton1 = ""; | ||
$bouton2 = ""; | ||
} | ||
if ($user_data["user_admin"] == 1) { | ||
if ($sub != "admin") { | ||
$bouton3 = "\t\t" . "<td class='c' align='center' width='150' style='cursor:pointer' onclick=\"window.location = 'index.php?action=autoupdate&sub=admin';\">"; | ||
$bouton3 .= "<span style=\"color: lime; \">" . $lang['autoupdate_autoupdate_admin'] . "</span>"; | ||
$bouton3 .= "</td>\n"; | ||
} else { | ||
$bouton3 = "\t\t" . "<th width='150'>"; | ||
$bouton3 .= "<span style=\"color: #5CCCE8; \">" . $lang['autoupdate_autoupdate_admin'] . "</span>"; | ||
$bouton3 .= "</th>\n"; | ||
} | ||
} else { | ||
$bouton3 = ""; | ||
} | ||
echo "\n<table>\n"; | ||
echo "\t<tr>\n"; | ||
echo $bouton1 . $bouton2 . $bouton3; | ||
echo "\t</tr><br>\n"; | ||
echo "</table>\n<br>\n"; | ||
<div class="og-msg "> | ||
<h3 class="og-title">Autoupdate</h3> | ||
<p class="og-content">Autoupdate permet d'installer ou de mettre à jour vos modules OGSpy</p> | ||
<p class="og-content">Il permet aussi d'obtenir les préversions des modules ainsi que de soumettre des tickets à l'équipe de développement.</p> | ||
</div> | ||
|
||
<div class="nav-page-menu"> | ||
|
||
<div class="nav-page-menu-item"> | ||
<a class="nav-page-menu-link" href='index.php?action=autoupdate&sub=overview'> | ||
<?= $lang['autoupdate_autoupdate_table'] ?> | ||
</a> | ||
</div> | ||
<div class="nav-page-menu-item"> | ||
<a class="nav-page-menu-link" href='index.php?action=autoupdate&sub=down'> | ||
<?= $lang['autoupdate_autoupdate_down'] ?> | ||
</a> | ||
</div> | ||
<?php if ($user_data["user_admin"] == 1) { ?> | ||
<div class="nav-page-menu-item"> | ||
<a class="nav-page-menu-link" href='index.php?action=autoupdate&sub=admin'> | ||
<?= $lang['autoupdate_autoupdate_admin'] ?> | ||
</a> | ||
</div> | ||
<?php } ?> | ||
</div> | ||
|
||
|
||
<br> | ||
<?php | ||
if (!isset($pub_sub)) { | ||
$sub = 'overview'; | ||
} else { | ||
|
Oops, something went wrong.