mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-23 19:50:40 -05:00
Apply fixes from StyleCI
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserFilled100Requests extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "Filled100Requests";
|
||||
public $name = 'Filled100Requests';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "DAMN BRO! You have already filled 100 requests!";
|
||||
public $description = 'DAMN BRO! You have already filled 100 requests!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserFilled25Requests extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "Filled25Requests";
|
||||
public $name = 'Filled25Requests';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Congrats! You have already filled 25 requests!";
|
||||
public $description = 'Congrats! You have already filled 25 requests!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserFilled50Requests extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "Filled50Requests";
|
||||
public $name = 'Filled50Requests';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already filled 50 requests!";
|
||||
public $description = 'Wow! You have already filled 50 requests!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserFilled75Requests extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "Filled75Requests";
|
||||
public $name = 'Filled75Requests';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Woot! You have already filled 75 requests!";
|
||||
public $description = 'Woot! You have already filled 75 requests!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade100Comments extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "100Comments";
|
||||
public $name = '100Comments';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 100 comments!";
|
||||
public $description = 'Wow! You have already made 100 comments!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade100Posts extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "100Posts";
|
||||
public $name = '100Posts';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 100 posts!";
|
||||
public $description = 'Wow! You have already made 100 posts!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade100Uploads extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "100Uploads";
|
||||
public $name = '100Uploads';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "You have made 100 torrent uploads!";
|
||||
public $description = 'You have made 100 torrent uploads!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade200Comments extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "200Comments";
|
||||
public $name = '200Comments';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 200 comments!";
|
||||
public $description = 'Wow! You have already made 200 comments!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade200Posts extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "200Posts";
|
||||
public $name = '200Posts';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 200 posts!";
|
||||
public $description = 'Wow! You have already made 200 posts!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade200Uploads extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "200Uploads";
|
||||
public $name = '200Uploads';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "You have made 200 torrent uploads!";
|
||||
public $description = 'You have made 200 torrent uploads!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade25Posts extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "25Posts";
|
||||
public $name = '25Posts';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 25 posts!";
|
||||
public $description = 'Wow! You have already made 25 posts!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade25Uploads extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "25Uploads";
|
||||
public $name = '25Uploads';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "You have made 25 torrent uploads!";
|
||||
public $description = 'You have made 25 torrent uploads!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade300Comments extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "300Comments";
|
||||
public $name = '300Comments';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 300 comments!";
|
||||
public $description = 'Wow! You have already made 300 comments!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade300Posts extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "300Posts";
|
||||
public $name = '300Posts';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 300 posts!";
|
||||
public $description = 'Wow! You have already made 300 posts!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade300Uploads extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "300Uploads";
|
||||
public $name = '300Uploads';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "You have made 300 torrent uploads!";
|
||||
public $description = 'You have made 300 torrent uploads!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade400Comments extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "400Comments";
|
||||
public $name = '400Comments';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 400 comments!";
|
||||
public $description = 'Wow! You have already made 400 comments!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade400Posts extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "400Posts";
|
||||
public $name = '400Posts';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 400 posts!";
|
||||
public $description = 'Wow! You have already made 400 posts!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade400Uploads extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "400Uploads";
|
||||
public $name = '400Uploads';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "You have made 400 torrent uploads!";
|
||||
public $description = 'You have made 400 torrent uploads!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade500Comments extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "500Comments";
|
||||
public $name = '500Comments';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 500 comments!";
|
||||
public $description = 'Wow! You have already made 500 comments!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade500Posts extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "500Posts";
|
||||
public $name = '500Posts';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 500 posts!";
|
||||
public $description = 'Wow! You have already made 500 posts!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade500Uploads extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "500Uploads";
|
||||
public $name = '500Uploads';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "You have made 500 torrent uploads!";
|
||||
public $description = 'You have made 500 torrent uploads!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade50Comments extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "50Comments";
|
||||
public $name = '50Comments';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 50 comments!";
|
||||
public $description = 'Wow! You have already made 50 comments!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade50Posts extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "50Posts";
|
||||
public $name = '50Posts';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 50 posts!";
|
||||
public $description = 'Wow! You have already made 50 posts!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade50Uploads extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "50Uploads";
|
||||
public $name = '50Uploads';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "You have made 50 torrent uploads!";
|
||||
public $description = 'You have made 50 torrent uploads!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade600Comments extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "600Comments";
|
||||
public $name = '600Comments';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 600 comments!";
|
||||
public $description = 'Wow! You have already made 600 comments!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade600Posts extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "600Posts";
|
||||
public $name = '600Posts';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 600 posts!";
|
||||
public $description = 'Wow! You have already made 600 posts!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade600Uploads extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "600Uploads";
|
||||
public $name = '600Uploads';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "You have made 600 torrent uploads!";
|
||||
public $description = 'You have made 600 torrent uploads!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade700Comments extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "700Comments";
|
||||
public $name = '700Comments';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 700 comments!";
|
||||
public $description = 'Wow! You have already made 700 comments!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade700Posts extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "700Posts";
|
||||
public $name = '700Posts';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 700 posts!";
|
||||
public $description = 'Wow! You have already made 700 posts!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade700Uploads extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "700Uploads";
|
||||
public $name = '700Uploads';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "You have made 700 torrent uploads!";
|
||||
public $description = 'You have made 700 torrent uploads!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade800Comments extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "800Comments";
|
||||
public $name = '800Comments';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 800 comments!";
|
||||
public $description = 'Wow! You have already made 800 comments!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade800Posts extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "800Posts";
|
||||
public $name = '800Posts';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 800 posts!";
|
||||
public $description = 'Wow! You have already made 800 posts!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade800Uploads extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "800Uploads";
|
||||
public $name = '800Uploads';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "You have made 800 torrent uploads!";
|
||||
public $description = 'You have made 800 torrent uploads!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade900Comments extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "900Comments";
|
||||
public $name = '900Comments';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "DAMN BRO! You have made 900 comments!";
|
||||
public $description = 'DAMN BRO! You have made 900 comments!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade900Posts extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "900Posts";
|
||||
public $name = '900Posts';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 900 posts!";
|
||||
public $description = 'Wow! You have already made 900 posts!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMade900Uploads extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "900Uploads";
|
||||
public $name = '900Uploads';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "DAMN BRO, you have made 900 torrent uploads!";
|
||||
public $description = 'DAMN BRO, you have made 900 torrent uploads!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,10 +20,10 @@ class UserMadeComment extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "FirstComment";
|
||||
public $name = 'FirstComment';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Congratulations! You have made your first comment!";
|
||||
public $description = 'Congratulations! You have made your first comment!';
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,10 +20,10 @@ class UserMadeFirstPost extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "FirstPost";
|
||||
public $name = 'FirstPost';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Congratulations! You have made your first post!";
|
||||
public $description = 'Congratulations! You have made your first post!';
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,12 +20,12 @@ class UserMadeTenComments extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "10Comments";
|
||||
public $name = '10Comments';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Wow! You have already made 10 comments!";
|
||||
public $description = 'Wow! You have already made 10 comments!';
|
||||
|
||||
/*
|
||||
* The amount of "points" this user need to obtain in order to complete this achievement
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -19,10 +20,10 @@ class UserMadeUpload extends Achievement
|
||||
/*
|
||||
* The achievement name
|
||||
*/
|
||||
public $name = "FirstUpload";
|
||||
public $name = 'FirstUpload';
|
||||
|
||||
/*
|
||||
* A small description for the achievement
|
||||
*/
|
||||
public $description = "Congratulations! You have made your first torrent upload!";
|
||||
public $description = 'Congratulations! You have made your first torrent upload!';
|
||||
}
|
||||
|
||||
+5
-4
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -17,7 +18,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Album extends Model
|
||||
{
|
||||
/**
|
||||
* Belongs To A User
|
||||
* Belongs To A User.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
@@ -25,12 +26,12 @@ class Album extends Model
|
||||
{
|
||||
return $this->belongsTo(User::class)->withDefault([
|
||||
'username' => 'System',
|
||||
'id' => '1'
|
||||
'id' => '1',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Has Many Images
|
||||
* Has Many Images.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
|
||||
+9
-7
@@ -1,24 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Helpers\Bbcode;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Article extends Model
|
||||
{
|
||||
/**
|
||||
* Belongs To A User
|
||||
* Belongs To A User.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
@@ -26,12 +27,12 @@ class Article extends Model
|
||||
{
|
||||
return $this->belongsTo(User::class)->withDefault([
|
||||
'username' => 'System',
|
||||
'id' => '1'
|
||||
'id' => '1',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Has Many Comments
|
||||
* Has Many Comments.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
@@ -41,11 +42,12 @@ class Article extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Article Trimming
|
||||
* Article Trimming.
|
||||
*
|
||||
* @param $length
|
||||
* @param $ellipses
|
||||
* @param $strip_html
|
||||
*
|
||||
* @return string Formatted And Trimmed Content
|
||||
*/
|
||||
public function getBrief($length = 100, $ellipses = true, $strip_html = false)
|
||||
@@ -74,7 +76,7 @@ class Article extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse Content And Return Valid HTML
|
||||
* Parse Content And Return Valid HTML.
|
||||
*
|
||||
* @return string Parsed BBCODE To HTML
|
||||
*/
|
||||
|
||||
+8
-7
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -17,28 +18,28 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Ban extends Model
|
||||
{
|
||||
/**
|
||||
* Belongs To A User
|
||||
* Belongs To A User.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function banneduser()
|
||||
{
|
||||
return $this->belongsTo(User::class, "owned_by")->withDefault([
|
||||
return $this->belongsTo(User::class, 'owned_by')->withDefault([
|
||||
'username' => 'System',
|
||||
'id' => '1'
|
||||
'id' => '1',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Belongs To A User
|
||||
* Belongs To A User.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function staffuser()
|
||||
{
|
||||
return $this->belongsTo(User::class, "created_by")->withDefault([
|
||||
return $this->belongsTo(User::class, 'created_by')->withDefault([
|
||||
'username' => 'System',
|
||||
'id' => '1'
|
||||
'id' => '1',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
+14
-13
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Mr.G
|
||||
*/
|
||||
@@ -17,29 +18,29 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class BonExchange extends Model
|
||||
{
|
||||
/**
|
||||
* The Database Table Used By The Model
|
||||
* The Database Table Used By The Model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'bon_exchange';
|
||||
|
||||
/**
|
||||
* Indicates If The Model Should Be Timestamped
|
||||
* Indicates If The Model Should Be Timestamped.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* The Attributes That Should Be Casted To Native Types
|
||||
* The Attributes That Should Be Casted To Native Types.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'upload' => 'boolean',
|
||||
'download' => 'boolean',
|
||||
'upload' => 'boolean',
|
||||
'download' => 'boolean',
|
||||
'personal_freeleech' => 'boolean',
|
||||
'invite' => 'boolean',
|
||||
'invite' => 'boolean',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -49,7 +50,7 @@ class BonExchange extends Model
|
||||
*/
|
||||
public function getDownloadOptions()
|
||||
{
|
||||
return BonExchange::where('download', true)
|
||||
return self::where('download', true)
|
||||
->orderBy('value', 'asc')
|
||||
->get()
|
||||
->toArray();
|
||||
@@ -62,7 +63,7 @@ class BonExchange extends Model
|
||||
*/
|
||||
public function getUploadOptions()
|
||||
{
|
||||
return BonExchange::where('upload', true)
|
||||
return self::where('upload', true)
|
||||
->orderBy('value', 'asc')
|
||||
->get()
|
||||
->toArray();
|
||||
@@ -75,7 +76,7 @@ class BonExchange extends Model
|
||||
*/
|
||||
public function getPersonalFreeleechOption()
|
||||
{
|
||||
return BonExchange::where('personal_freeleech', true)
|
||||
return self::where('personal_freeleech', true)
|
||||
->orderBy('value', 'asc')
|
||||
->get()
|
||||
->toArray();
|
||||
@@ -88,7 +89,7 @@ class BonExchange extends Model
|
||||
*/
|
||||
public function getInviteOption()
|
||||
{
|
||||
return BonExchange::where('invite', true)
|
||||
return self::where('invite', true)
|
||||
->orderBy('value', 'asc')
|
||||
->get()
|
||||
->toArray();
|
||||
@@ -97,11 +98,11 @@ class BonExchange extends Model
|
||||
/**
|
||||
* @method getItemCost
|
||||
*
|
||||
* @return integer
|
||||
* @return int
|
||||
*/
|
||||
public function getItemCost($id)
|
||||
{
|
||||
return BonExchange::where('id', '=', $id)
|
||||
return self::where('id', '=', $id)
|
||||
->get()
|
||||
->toArray()[0]['cost'];
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Mr.G
|
||||
*/
|
||||
@@ -17,14 +18,14 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class BonTransactions extends Model
|
||||
{
|
||||
/**
|
||||
* The Database Table Used By The Model
|
||||
* The Database Table Used By The Model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'bon_transactions';
|
||||
|
||||
/**
|
||||
* Indicates If The Model Should Be Timestamped
|
||||
* Indicates If The Model Should Be Timestamped.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
|
||||
+5
-4
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -17,7 +18,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Bookmark extends Model
|
||||
{
|
||||
/**
|
||||
* Belongs To A User
|
||||
* Belongs To A User.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
@@ -25,12 +26,12 @@ class Bookmark extends Model
|
||||
{
|
||||
return $this->belongsTo(User::class)->withDefault([
|
||||
'username' => 'System',
|
||||
'id' => '1'
|
||||
'id' => '1',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Belongs To A Torrent
|
||||
* Belongs To A Torrent.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -30,7 +31,6 @@ class IRCAnnounceBot
|
||||
$this->joinchannels = config('irc-bot.joinchannels');
|
||||
$this->socket = fsockopen($this->server, $this->port);
|
||||
|
||||
|
||||
$this->send_data("NICK {$this->username}");
|
||||
$this->send_data("USER {$this->username} {$this->hostname} {$this->server} {$this->username}");
|
||||
|
||||
@@ -48,13 +48,14 @@ class IRCAnnounceBot
|
||||
{
|
||||
while ($data = fgets($this->socket)) {
|
||||
flush();
|
||||
$ex = explode(" ", $data);
|
||||
$ex = explode(' ', $data);
|
||||
|
||||
if ($ex[0] == "PING") {
|
||||
$this->send_data("PONG " . $ex[1]);
|
||||
if ($ex[0] == 'PING') {
|
||||
$this->send_data('PONG '.$ex[1]);
|
||||
if ($this->nickservpass) {
|
||||
$this->send_data("NICKSERV IDENTIFY {$this->nickservpass}");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -62,7 +63,7 @@ class IRCAnnounceBot
|
||||
|
||||
private function send_data($data)
|
||||
{
|
||||
fputs($this->socket, "$data\r\n");
|
||||
fwrite($this->socket, "$data\r\n");
|
||||
}
|
||||
|
||||
private function say($channel, $string)
|
||||
|
||||
+4
-3
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -17,12 +18,12 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Catalog extends Model
|
||||
{
|
||||
/**
|
||||
* The Attributes That Are Mass Assignable
|
||||
* The Attributes That Are Mass Assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'slug'
|
||||
'slug',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -17,20 +18,20 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class CatalogTorrent extends Model
|
||||
{
|
||||
/**
|
||||
* The Database Table Used By The Model
|
||||
* The Database Table Used By The Model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = "catalog_torrent";
|
||||
protected $table = 'catalog_torrent';
|
||||
|
||||
/**
|
||||
* The Attributes That Are Mass Assignable
|
||||
* The Attributes That Are Mass Assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'imdb',
|
||||
'tvdb',
|
||||
'catalog_id'
|
||||
'catalog_id',
|
||||
];
|
||||
}
|
||||
|
||||
+5
-4
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -17,14 +18,14 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Category extends Model
|
||||
{
|
||||
/**
|
||||
* Indicates If The Model Should Be Timestamped
|
||||
* Indicates If The Model Should Be Timestamped.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Has Many Torrents
|
||||
* Has Many Torrents.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
@@ -34,7 +35,7 @@ class Category extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Has Many Requests
|
||||
* Has Many Requests.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
|
||||
+3
-2
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Poppabear
|
||||
*/
|
||||
@@ -17,7 +18,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class ChatStatus extends Model
|
||||
{
|
||||
/**
|
||||
* A Status Has Many Users
|
||||
* A Status Has Many Users.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
|
||||
+6
-5
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -20,16 +21,16 @@ class Chatroom extends Model
|
||||
use Notifiable;
|
||||
|
||||
/**
|
||||
* The Attributes That Are Mass Assignable
|
||||
* The Attributes That Are Mass Assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name'
|
||||
'name',
|
||||
];
|
||||
|
||||
/**
|
||||
* A User Has Many Messages
|
||||
* A User Has Many Messages.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
@@ -39,7 +40,7 @@ class Chatroom extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* A Chat Room Has Many Users
|
||||
* A Chat Room Has Many Users.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
|
||||
+2
-1
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
+9
-8
@@ -1,24 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Helpers\Bbcode;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Comment extends Model
|
||||
{
|
||||
/**
|
||||
* Belongs To A Torrent
|
||||
* Belongs To A Torrent.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
@@ -28,7 +29,7 @@ class Comment extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Belongs To A Article
|
||||
* Belongs To A Article.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
@@ -38,7 +39,7 @@ class Comment extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Belongs To A Request
|
||||
* Belongs To A Request.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
@@ -48,7 +49,7 @@ class Comment extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Belongs To A User
|
||||
* Belongs To A User.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
@@ -56,12 +57,12 @@ class Comment extends Model
|
||||
{
|
||||
return $this->belongsTo(User::class)->withDefault([
|
||||
'username' => 'System',
|
||||
'id' => '1'
|
||||
'id' => '1',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse Content And Return Valid HTML
|
||||
* Parse Content And Return Valid HTML.
|
||||
*
|
||||
* @return string Parsed BBCODE To HTML
|
||||
*/
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Mr.G
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Ban;
|
||||
use App\Group;
|
||||
use App\Mail\BanUser;
|
||||
use App\Warning;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use App\Mail\BanUser;
|
||||
use App\Warning;
|
||||
use App\Ban;
|
||||
use App\Group;
|
||||
|
||||
class AutoBan extends Command
|
||||
{
|
||||
@@ -62,8 +63,8 @@ class AutoBan extends Command
|
||||
$logban = new Ban();
|
||||
$logban->owned_by = $ban->warneduser->id;
|
||||
$logban->created_by = 1;
|
||||
$logban->ban_reason = "Warning Limit Reached, has " . $ban->value . " warnings.";
|
||||
$logban->unban_reason = "";
|
||||
$logban->ban_reason = 'Warning Limit Reached, has '.$ban->value.' warnings.';
|
||||
$logban->unban_reason = '';
|
||||
$logban->save();
|
||||
|
||||
// Send Email
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Mr.G
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\BonTransactions;
|
||||
use App\Peer;
|
||||
use App\User;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class AutoBonAllocation extends Command
|
||||
{
|
||||
@@ -115,7 +116,6 @@ class AutoBonAllocation extends Command
|
||||
->get()
|
||||
->toArray();
|
||||
|
||||
|
||||
$teamplayer_seeder = DB::table('history')
|
||||
->select(DB::raw('count(DISTINCT(history.info_hash)) as value'), 'history.user_id')
|
||||
->join('torrents', 'torrents.info_hash', 'history.info_hash')
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\History;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoCorrectHistory extends Command
|
||||
{
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Mr.G
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\PrivateMessage;
|
||||
use App\Warning;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoDeactivateWarning extends Command
|
||||
{
|
||||
@@ -45,15 +46,15 @@ class AutoDeactivateWarning extends Command
|
||||
|
||||
foreach ($warnings as $warning) {
|
||||
// Set Records Active To 0 in warnings table
|
||||
$warning->active = "0";
|
||||
$warning->active = '0';
|
||||
$warning->save();
|
||||
|
||||
// Send Private Message
|
||||
$pm = new PrivateMessage;
|
||||
$pm = new PrivateMessage();
|
||||
$pm->sender_id = 1;
|
||||
$pm->receiver_id = $warning->warneduser->id;
|
||||
$pm->subject = "Hit and Run Warning Deactivated";
|
||||
$pm->message = "The [b]WARNING[/b] you received relating to Torrent " . $warning->torrenttitle->name . " has expired! Try not to get more! [color=red][b]THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]";
|
||||
$pm->subject = 'Hit and Run Warning Deactivated';
|
||||
$pm->message = 'The [b]WARNING[/b] you received relating to Torrent '.$warning->torrenttitle->name.' has expired! Try not to get more! [color=red][b]THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]';
|
||||
$pm->save();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\User;
|
||||
use App\Group;
|
||||
use App\Jobs\SendDisableUserMail;
|
||||
use App\User;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoDisableInactiveUsers extends Command
|
||||
{
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Mr.G
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\History;
|
||||
use App\Peer;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoFlushPeers extends Command
|
||||
{
|
||||
@@ -54,7 +55,7 @@ class AutoFlushPeers extends Command
|
||||
$peers = Peer::select(['id', 'info_hash', 'user_id', 'updated_at'])->where('updated_at', '<', $current->copy()->subHours(2)->toDateTimeString())->get();
|
||||
|
||||
foreach ($peers as $peer) {
|
||||
$history = History::where("info_hash", $peer->info_hash)->where("user_id", $peer->user_id)->first();
|
||||
$history = History::where('info_hash', $peer->info_hash)->where('user_id', $peer->user_id)->first();
|
||||
if ($history) {
|
||||
$history->active = false;
|
||||
$history->save();
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Repositories\ChatRepository;
|
||||
use Illuminate\Console\Command;
|
||||
use App\Torrent;
|
||||
use App\History;
|
||||
use App\Graveyard;
|
||||
use App\PrivateMessage;
|
||||
use App\User;
|
||||
use App\History;
|
||||
use App\Message;
|
||||
use App\PrivateMessage;
|
||||
use App\Repositories\ChatRepository;
|
||||
use App\Torrent;
|
||||
use App\User;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoGraveyard extends Command
|
||||
{
|
||||
|
||||
/**
|
||||
* @var ChatRepository
|
||||
*/
|
||||
@@ -86,12 +86,12 @@ class AutoGraveyard extends Command
|
||||
);
|
||||
|
||||
// Send Private Message
|
||||
$pm = new PrivateMessage;
|
||||
$pm = new PrivateMessage();
|
||||
$pm->sender_id = 1;
|
||||
$pm->receiver_id = $user->id;
|
||||
$pm->subject = "Successful Graveyard Resurrection";
|
||||
$pm->message = "You have successfully resurrected [url={$appurl}/torrents/" . $torrent->slug . "." . $torrent->id . "]" . $torrent->name . "[/url] :zombie: ! Thank you for bringing a torrent back from the dead! Enjoy the freeleech tokens!
|
||||
[color=red][b]THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]";
|
||||
$pm->subject = 'Successful Graveyard Resurrection';
|
||||
$pm->message = "You have successfully resurrected [url={$appurl}/torrents/".$torrent->slug.'.'.$torrent->id.']'.$torrent->name.'[/url] :zombie: ! Thank you for bringing a torrent back from the dead! Enjoy the freeleech tokens!
|
||||
[color=red][b]THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]';
|
||||
$pm->save();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Mr.G
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\User;
|
||||
use App\Group;
|
||||
use App\History;
|
||||
use App\User;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoGroup extends Command
|
||||
{
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Client;
|
||||
use App\Peer;
|
||||
use App\Torrent;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Torrent;
|
||||
use App\Peer;
|
||||
use App\Client;
|
||||
|
||||
class AutoHighspeedTag extends Command
|
||||
{
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Repositories\ChatRepository;
|
||||
use Illuminate\Console\Command;
|
||||
use App\Peer;
|
||||
use App\User;
|
||||
use App\Repositories\ChatRepository;
|
||||
use App\Torrent;
|
||||
use App\User;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoNerdStat extends Command
|
||||
{
|
||||
@@ -81,18 +82,18 @@ class AutoNerdStat extends Command
|
||||
$peers = Peer::count();
|
||||
|
||||
// Select A Random Nerd Stat
|
||||
$statArray = ["In The Last 24 Hours " . $logins . " Unique Users Have Logged Into " . config('other.title') . "!",
|
||||
"In The Last 24 Hours " . $uploads . " Torrents Have Been Uploaded To " . config('other.title') . "!",
|
||||
"In The Last 24 Hours " . $users . " Users Have Registered To " . config('other.title') . "!",
|
||||
"There Are Currently " . $fl . " Freeleech Torrents On " . config('other.title') . "!",
|
||||
"There Are Currently " . $du . " DoubleUpload Torrents On " . config('other.title') . "!",
|
||||
"Currently " . $seeders->name . " Is The Best Seeded Torrent On " . config('other.title') . "!",
|
||||
"Currently " . $leechers->name . " Is The Most Leeched Torrent On " . config('other.title') . "!",
|
||||
"Currently " . $snatched->name . " Is The Most Snatched Torrent On " . config('other.title') . "!",
|
||||
"Currently " . $banker->username . " Is The Top BON Holder On " . config('other.title') . "!",
|
||||
config('other.title') . " Birthday Is " . $bday . "!",
|
||||
config('other.title') . " Is King!",
|
||||
"Currently There Is " . $peers . " Peers On " . config('other.title') . "!",
|
||||
$statArray = ['In The Last 24 Hours '.$logins.' Unique Users Have Logged Into '.config('other.title').'!',
|
||||
'In The Last 24 Hours '.$uploads.' Torrents Have Been Uploaded To '.config('other.title').'!',
|
||||
'In The Last 24 Hours '.$users.' Users Have Registered To '.config('other.title').'!',
|
||||
'There Are Currently '.$fl.' Freeleech Torrents On '.config('other.title').'!',
|
||||
'There Are Currently '.$du.' DoubleUpload Torrents On '.config('other.title').'!',
|
||||
'Currently '.$seeders->name.' Is The Best Seeded Torrent On '.config('other.title').'!',
|
||||
'Currently '.$leechers->name.' Is The Most Leeched Torrent On '.config('other.title').'!',
|
||||
'Currently '.$snatched->name.' Is The Most Snatched Torrent On '.config('other.title').'!',
|
||||
'Currently '.$banker->username.' Is The Top BON Holder On '.config('other.title').'!',
|
||||
config('other.title').' Birthday Is '.$bday.'!',
|
||||
config('other.title').' Is King!',
|
||||
'Currently There Is '.$peers.' Peers On '.config('other.title').'!',
|
||||
];
|
||||
$selected = mt_rand(0, count($statArray) - 1);
|
||||
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\History;
|
||||
use App\PrivateMessage;
|
||||
use App\User;
|
||||
use App\Warning;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoPreWarning extends Command
|
||||
{
|
||||
@@ -67,13 +68,13 @@ class AutoPreWarning extends Command
|
||||
$timeleft = config('hitrun.grace') - config('hitrun.prewarn');
|
||||
|
||||
// Send Private Message
|
||||
$pm = new PrivateMessage;
|
||||
$pm = new PrivateMessage();
|
||||
$pm->sender_id = 1;
|
||||
$pm->receiver_id = $pre->user->id;
|
||||
$pm->subject = "Hit and Run Warning Incoming";
|
||||
$pm->message = "You have received a automated [b]PRE-WARNING PM[/b] from the system because [b]you have been disconnected for " . config('hitrun.prewarn') . " days on Torrent {$pre->torrent->name}
|
||||
and have not yet met the required seedtime rules set by " . config('other.title') .". If you fail to seed it within {$timeleft} day(s) you will recieve a automated WARNING which will last " . config('hitrun.expire') ." days![/b]
|
||||
[color=red][b] THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]";
|
||||
$pm->subject = 'Hit and Run Warning Incoming';
|
||||
$pm->message = 'You have received a automated [b]PRE-WARNING PM[/b] from the system because [b]you have been disconnected for '.config('hitrun.prewarn')." days on Torrent {$pre->torrent->name}
|
||||
and have not yet met the required seedtime rules set by ".config('other.title').". If you fail to seed it within {$timeleft} day(s) you will recieve a automated WARNING which will last ".config('hitrun.expire').' days![/b]
|
||||
[color=red][b] THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]';
|
||||
$pm->save();
|
||||
|
||||
// Set History Prewarn
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\LogActivity;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoRecycleActivityLog extends Command
|
||||
{
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\Repositories\ChatRepository;
|
||||
use App\TorrentRequest;
|
||||
use App\TorrentRequestClaim;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoRecycleClaimedTorrentRequests extends Command
|
||||
{
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\FailedLoginAttempt;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoRecycleFailedLogins extends Command
|
||||
{
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\Invite;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoRecycleInvites extends Command
|
||||
{
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Repositories\ChatRepository;
|
||||
use Illuminate\Console\Command;
|
||||
use App\Message;
|
||||
use App\FeaturedTorrent;
|
||||
use App\Repositories\ChatRepository;
|
||||
use App\Torrent;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoRemoveFeaturedTorrent extends Command
|
||||
{
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\PrivateMessage;
|
||||
use App\PersonalFreeleech;
|
||||
use App\PrivateMessage;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoRemovePersonalFreeleech extends Command
|
||||
{
|
||||
@@ -45,11 +46,11 @@ class AutoRemovePersonalFreeleech extends Command
|
||||
|
||||
foreach ($personal_freeleech as $pfl) {
|
||||
// Send Private Message
|
||||
$pm = new PrivateMessage;
|
||||
$pm = new PrivateMessage();
|
||||
$pm->sender_id = 1;
|
||||
$pm->receiver_id = $pfl->user_id;
|
||||
$pm->subject = "Personal 24 Hour Freeleech Expired";
|
||||
$pm->message = "Your [b]Personal 24 Hour Freeleech[/b] has expired! Feel free to reenable it in the BON Store! [color=red][b]THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]";
|
||||
$pm->subject = 'Personal 24 Hour Freeleech Expired';
|
||||
$pm->message = 'Your [b]Personal 24 Hour Freeleech[/b] has expired! Feel free to reenable it in the BON Store! [color=red][b]THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]';
|
||||
$pm->save();
|
||||
|
||||
// Delete The Record From DB
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Mr.G
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Group;
|
||||
use App\User;
|
||||
use App\Warning;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\PrivateMessage;
|
||||
use App\Warning;
|
||||
use App\User;
|
||||
use App\Group;
|
||||
|
||||
class AutoRevokePermissions extends Command
|
||||
{
|
||||
@@ -48,8 +48,8 @@ class AutoRevokePermissions extends Command
|
||||
$disabledGroup = Group::where('slug', '=', 'disabled')->select('id')->first();
|
||||
$prunedGroup = Group::where('slug', '=', 'pruned')->select('id')->first();
|
||||
|
||||
User::whereNotIn('group_id', [$bannedGroup->id,$validatingGroup->id,$leechGroup->id,$disabledGroup->id,$prunedGroup->id])->update(['can_download' => '1', 'can_request' => '1']);
|
||||
User::whereIn('group_id', [$bannedGroup->id,$validatingGroup->id,$leechGroup->id,$disabledGroup->id,$prunedGroup->id])->update(['can_download' => '0', 'can_request' => '0']);
|
||||
User::whereNotIn('group_id', [$bannedGroup->id, $validatingGroup->id, $leechGroup->id, $disabledGroup->id, $prunedGroup->id])->update(['can_download' => '1', 'can_request' => '1']);
|
||||
User::whereIn('group_id', [$bannedGroup->id, $validatingGroup->id, $leechGroup->id, $disabledGroup->id, $prunedGroup->id])->update(['can_download' => '0', 'can_request' => '0']);
|
||||
|
||||
$warning = Warning::with('warneduser')->select(DB::raw('user_id, count(*) as value'))->where('active', 1)->groupBy('user_id')->having('value', '>=', config('hitrun.revoke'))->get();
|
||||
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\User;
|
||||
use App\Group;
|
||||
use App\Jobs\SendDeleteUserMail;
|
||||
use App\User;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoSoftDeleteDisabledUsers extends Command
|
||||
{
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Mr.G
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\History;
|
||||
use App\PrivateMessage;
|
||||
use App\Warning;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoWarning extends Command
|
||||
{
|
||||
@@ -65,11 +66,11 @@ class AutoWarning extends Command
|
||||
if (!$exsist) {
|
||||
$warning = new Warning();
|
||||
$warning->user_id = $hr->user->id;
|
||||
$warning->warned_by = "1";
|
||||
$warning->warned_by = '1';
|
||||
$warning->torrent = $hr->torrent->id;
|
||||
$warning->reason = "Hit and Run Warning For Torrent {$hr->torrent->name}";
|
||||
$warning->expires_on = $current->copy()->addDays(config('hitrun.expire'));
|
||||
$warning->active = "1";
|
||||
$warning->active = '1';
|
||||
$warning->save();
|
||||
|
||||
// Add +1 To Users Warnings Count In Users Table
|
||||
@@ -78,12 +79,12 @@ class AutoWarning extends Command
|
||||
$hr->user->save();
|
||||
|
||||
// Send Private Message
|
||||
$pm = new PrivateMessage;
|
||||
$pm = new PrivateMessage();
|
||||
$pm->sender_id = 1;
|
||||
$pm->receiver_id = $hr->user->id;
|
||||
$pm->subject = "Hit and Run Warning Received";
|
||||
$pm->message = "You have received a automated [b]WARNING[/b] from the system because [b]you failed to follow the Hit and Run rules in relation to Torrent " . $hr->torrent->name . "[/b]
|
||||
[color=red][b]THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]";
|
||||
$pm->subject = 'Hit and Run Warning Received';
|
||||
$pm->message = 'You have received a automated [b]WARNING[/b] from the system because [b]you failed to follow the Hit and Run rules in relation to Torrent '.$hr->torrent->name.'[/b]
|
||||
[color=red][b]THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]';
|
||||
$pm->save();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Poppabear
|
||||
*/
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Poppabear
|
||||
*/
|
||||
@@ -13,16 +14,12 @@
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\Clients\OmdbClient;
|
||||
use App\Services\MovieScrapper;
|
||||
use App\Torrent;
|
||||
use App\User;
|
||||
use Illuminate\Console\Command;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
|
||||
class DemoSeed extends Command
|
||||
{
|
||||
|
||||
/**
|
||||
* The console command name.
|
||||
*
|
||||
@@ -70,18 +67,18 @@ class DemoSeed extends Command
|
||||
|
||||
foreach ($value as $id) {
|
||||
// random boolean
|
||||
if ([false,true][rand(0, 1)]) {
|
||||
$r = $this->search('tt' . $id);
|
||||
if ([false, true][rand(0, 1)]) {
|
||||
$r = $this->search('tt'.$id);
|
||||
|
||||
// Torrents
|
||||
$this->info('Creating Movie Torrents for Account ID #'.$uid);
|
||||
|
||||
try {
|
||||
factory(Torrent::class)->create([
|
||||
'user_id' => $uid,
|
||||
'imdb' => $id,
|
||||
'name' => $r['Title'],
|
||||
'slug' => str_slug($r['Title']),
|
||||
'user_id' => $uid,
|
||||
'imdb' => $id,
|
||||
'name' => $r['Title'],
|
||||
'slug' => str_slug($r['Title']),
|
||||
'description' => $r['Plot'],
|
||||
'category_id' => 1,
|
||||
]);
|
||||
@@ -124,7 +121,7 @@ class DemoSeed extends Command
|
||||
|
||||
$key = config('api-keys.omdb');
|
||||
|
||||
$url = 'http://www.omdbapi.com/?apikey=' . $key . '&i=' . $id . '&r=json&plot=full';
|
||||
$url = 'http://www.omdbapi.com/?apikey='.$key.'&i='.$id.'&r=json&plot=full';
|
||||
|
||||
$omdb = new OmdbClient($key);
|
||||
|
||||
@@ -134,16 +131,16 @@ class DemoSeed extends Command
|
||||
private function ids()
|
||||
{
|
||||
return [
|
||||
["2948356", "2094766", "2592614", "0139809", "0088323", "1959409", "0076729", "0089175", "3553976"],
|
||||
["0051622", "0078788", "6315800", "0472033", "2488496", "3748528", "0230011", "0158983", "4972582"],
|
||||
["3783958", "4276820", "0311113", "4276820", "4972582", "2072233", "4385888", "0106611", "3640424"],
|
||||
["2713180", "2282016", "0402022", "0467406", "0448134", "0079116", "0386064", "0120657", "0111161"],
|
||||
["0113568", "0108399", "0265086", "0317248", "1675434", "1436045", "0416044", "0103639", "0399201"],
|
||||
["2960470", "0101414", "0325710", "2488496", "3631112", "0120591", "0395169", "1862079", "0133093"],
|
||||
["0289043", "3289956", "3521164", "0325980", "0377062", "1598778", "0401792", "4418398", "4303340"],
|
||||
["4276820", "0118929", "1540133", "0499549", "3393786", "1620935", "1878870", "0387808", "0159365"],
|
||||
["3470600", "3717252", "0266987", "0046438", "2094766", "1032755", "3521164", "3183660", "2119532"],
|
||||
["4662420", "4276820", "2278388", "1895315", "0342258", "0266308", "0477348", "0120746", "0129167"],
|
||||
['2948356', '2094766', '2592614', '0139809', '0088323', '1959409', '0076729', '0089175', '3553976'],
|
||||
['0051622', '0078788', '6315800', '0472033', '2488496', '3748528', '0230011', '0158983', '4972582'],
|
||||
['3783958', '4276820', '0311113', '4276820', '4972582', '2072233', '4385888', '0106611', '3640424'],
|
||||
['2713180', '2282016', '0402022', '0467406', '0448134', '0079116', '0386064', '0120657', '0111161'],
|
||||
['0113568', '0108399', '0265086', '0317248', '1675434', '1436045', '0416044', '0103639', '0399201'],
|
||||
['2960470', '0101414', '0325710', '2488496', '3631112', '0120591', '0395169', '1862079', '0133093'],
|
||||
['0289043', '3289956', '3521164', '0325980', '0377062', '1598778', '0401792', '4418398', '4303340'],
|
||||
['4276820', '0118929', '1540133', '0499549', '3393786', '1620935', '1878870', '0387808', '0159365'],
|
||||
['3470600', '3717252', '0266987', '0046438', '2094766', '1032755', '3521164', '3183660', '2119532'],
|
||||
['4662420', '4276820', '2278388', '1895315', '0342258', '0266308', '0477348', '0120746', '0129167'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Poppabear
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Console\ConsoleTools;
|
||||
use Illuminate\Console\Command;
|
||||
use Symfony\Component\Console\Input\ArgvInput;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
|
||||
use App\Console\ConsoleTools;
|
||||
|
||||
class GitUpdater extends Command
|
||||
{
|
||||
use ConsoleTools;
|
||||
|
||||
/**
|
||||
* The copy command
|
||||
* The copy command.
|
||||
*/
|
||||
protected $copy_command = 'cp -Rfp';
|
||||
|
||||
@@ -115,11 +113,11 @@ class GitUpdater extends Command
|
||||
|
||||
if ($this->io->confirm('Start the update process', false)) {
|
||||
$this->call('down', [
|
||||
'--message' => "Currently Updating",
|
||||
'--retry' => '300'
|
||||
'--message' => 'Currently Updating',
|
||||
'--retry' => '300',
|
||||
]);
|
||||
|
||||
$this->process("git add .");
|
||||
$this->process('git add .');
|
||||
|
||||
$paths = $this->paths();
|
||||
|
||||
@@ -166,13 +164,13 @@ class GitUpdater extends Command
|
||||
die();
|
||||
}
|
||||
} else {
|
||||
$this->alertSuccess("No Available Updates Found");
|
||||
$this->alertSuccess('No Available Updates Found');
|
||||
}
|
||||
}
|
||||
|
||||
private function checkForUpdates()
|
||||
{
|
||||
$this->header("Checking For Updates");
|
||||
$this->header('Checking For Updates');
|
||||
|
||||
$this->process('git fetch origin');
|
||||
$process = $this->process('git diff ..origin/master --name-only');
|
||||
@@ -185,8 +183,8 @@ class GitUpdater extends Command
|
||||
|
||||
private function manualUpdate($updating)
|
||||
{
|
||||
$this->alertInfo("Manual Update");
|
||||
$this->red("Updating will cause you to LOSE any changes you might have made to the file!");
|
||||
$this->alertInfo('Manual Update');
|
||||
$this->red('Updating will cause you to LOSE any changes you might have made to the file!');
|
||||
|
||||
foreach ($updating as $file) {
|
||||
if ($this->io->confirm("Update $file", false)) {
|
||||
@@ -207,14 +205,14 @@ class GitUpdater extends Command
|
||||
$this->header('Backing Up Files');
|
||||
|
||||
$this->commands([
|
||||
'rm -rf ' . storage_path('gitupdate'),
|
||||
'mkdir ' . storage_path('gitupdate')
|
||||
'rm -rf '.storage_path('gitupdate'),
|
||||
'mkdir '.storage_path('gitupdate'),
|
||||
], true);
|
||||
|
||||
foreach ($paths as $path) {
|
||||
$this->validatePath($path);
|
||||
$this->createBackupPath($path);
|
||||
$this->process($this->copy_command . ' ' . base_path($path) . ' ' . storage_path('gitupdate') . '/' . $path);
|
||||
$this->process($this->copy_command.' '.base_path($path).' '.storage_path('gitupdate').'/'.$path);
|
||||
}
|
||||
|
||||
$this->done();
|
||||
@@ -226,7 +224,7 @@ class GitUpdater extends Command
|
||||
|
||||
foreach ($paths as $path) {
|
||||
$to = str_replace_last('/.', '', base_path(dirname($path)));
|
||||
$from = storage_path('gitupdate') . '/' . $path;
|
||||
$from = storage_path('gitupdate').'/'.$path;
|
||||
|
||||
if (is_dir($from)) {
|
||||
$to .= '/'.basename($from).'/';
|
||||
@@ -239,17 +237,17 @@ class GitUpdater extends Command
|
||||
$this->commands([
|
||||
'git add .',
|
||||
'git checkout origin/master -- package-lock.json',
|
||||
'git checkout origin/master -- composer.lock'
|
||||
'git checkout origin/master -- composer.lock',
|
||||
]);
|
||||
}
|
||||
|
||||
private function composer()
|
||||
{
|
||||
$this->header("Installing Composer Packages");
|
||||
$this->header('Installing Composer Packages');
|
||||
|
||||
$this->commands([
|
||||
'composer install',
|
||||
'composer dump-autoload'
|
||||
'composer dump-autoload',
|
||||
]);
|
||||
|
||||
$this->done();
|
||||
@@ -262,7 +260,7 @@ class GitUpdater extends Command
|
||||
$this->commands([
|
||||
'rm -rf node_modules',
|
||||
'npm install',
|
||||
'npm run prod'
|
||||
'npm run prod',
|
||||
]);
|
||||
|
||||
$this->done();
|
||||
@@ -270,28 +268,28 @@ class GitUpdater extends Command
|
||||
|
||||
private function updateUNIT3DConfig()
|
||||
{
|
||||
$this->header("Updating UNIT3D Configuration File");
|
||||
$this->process("git fetch origin && git checkout origin/master -- config/unit3d.php");
|
||||
$this->header('Updating UNIT3D Configuration File');
|
||||
$this->process('git fetch origin && git checkout origin/master -- config/unit3d.php');
|
||||
$this->done();
|
||||
}
|
||||
|
||||
private function clearCache()
|
||||
{
|
||||
$this->header("Clearing Cache");
|
||||
$this->header('Clearing Cache');
|
||||
$this->call('clear:all_cache');
|
||||
$this->done();
|
||||
}
|
||||
|
||||
private function setCache()
|
||||
{
|
||||
$this->header("Setting Cache");
|
||||
$this->header('Setting Cache');
|
||||
$this->call('set:all_cache');
|
||||
$this->done();
|
||||
}
|
||||
|
||||
private function migrations()
|
||||
{
|
||||
$this->header("Running New Migrations");
|
||||
$this->header('Running New Migrations');
|
||||
$this->call('migrate');
|
||||
$this->done();
|
||||
}
|
||||
@@ -334,7 +332,7 @@ class GitUpdater extends Command
|
||||
*/
|
||||
private function paths()
|
||||
{
|
||||
$p = $this->process("git diff master --name-only");
|
||||
$p = $this->process('git diff master --name-only');
|
||||
$paths = array_filter(explode("\n", $p->getOutput()), 'strlen');
|
||||
|
||||
$additional = [
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use App\Bots\IRCAnnounceBot;
|
||||
use Illuminate\Console\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
||||
class IrcBroadcast extends Command
|
||||
{
|
||||
|
||||
/**
|
||||
* The console command name.
|
||||
*
|
||||
@@ -51,7 +51,7 @@ class IrcBroadcast extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->info("Broadcasting: " . $this->argument('message'));
|
||||
$this->info('Broadcasting: '.$this->argument('message'));
|
||||
$bot = new IRCAnnounceBot();
|
||||
$bot->broadcast($this->argument('message'));
|
||||
}
|
||||
@@ -68,7 +68,7 @@ class IrcBroadcast extends Command
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the console command options.
|
||||
*
|
||||
* @return array
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use App\Bots\IRCAnnounceBot;
|
||||
use Illuminate\Console\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
||||
class IrcMessage extends Command
|
||||
{
|
||||
|
||||
/**
|
||||
* The console command name.
|
||||
*
|
||||
@@ -51,7 +51,7 @@ class IrcMessage extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->info('Messaging ' . $this->argument('channel') . ": " . $this->argument('message'));
|
||||
$this->info('Messaging '.$this->argument('channel').': '.$this->argument('message'));
|
||||
$bot = new IRCAnnounceBot();
|
||||
$bot->message($this->argument('channel'), $this->argument('message'));
|
||||
}
|
||||
@@ -69,7 +69,7 @@ class IrcMessage extends Command
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the console command options.
|
||||
*
|
||||
* @return array
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Console\Command;
|
||||
use App\Mail\TestEmail;
|
||||
use App\User;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
class TestMailSettings extends Command
|
||||
{
|
||||
@@ -33,7 +34,6 @@ class TestMailSettings extends Command
|
||||
*/
|
||||
protected $description = 'Send A Test Email To Owner Account Using The Current Mail Configuration';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
@@ -43,7 +43,7 @@ class TestMailSettings extends Command
|
||||
{
|
||||
$owner = User::where('id', '=', 3)->pluck('email');
|
||||
|
||||
$this->info('Sending Test Email To ' . $owner);
|
||||
$this->info('Sending Test Email To '.$owner);
|
||||
sleep(5);
|
||||
|
||||
try {
|
||||
|
||||
@@ -10,7 +10,7 @@ use Symfony\Component\Process\Process;
|
||||
trait ConsoleTools
|
||||
{
|
||||
/**
|
||||
* @var SymfonyStyle $io
|
||||
* @var SymfonyStyle
|
||||
*/
|
||||
protected $io;
|
||||
|
||||
@@ -46,7 +46,7 @@ trait ConsoleTools
|
||||
|
||||
private function done()
|
||||
{
|
||||
$this->green("<fg=white>[</>Done<fg=white>]</>");
|
||||
$this->green('<fg=white>[</>Done<fg=white>]</>');
|
||||
}
|
||||
|
||||
private function header($line)
|
||||
@@ -147,7 +147,7 @@ trait ConsoleTools
|
||||
*/
|
||||
protected function progressStop(ProgressBar $bar)
|
||||
{
|
||||
$bar->setMessage("<fg=green>Done!</>");
|
||||
$bar->setMessage('<fg=green>Done!</>');
|
||||
$bar->finish();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
@@ -43,13 +42,14 @@ class Kernel extends ConsoleKernel
|
||||
\App\Console\Commands\GitUpdater::class,
|
||||
\App\Console\Commands\ClearCache::class,
|
||||
\App\Console\Commands\SetCache::class,
|
||||
\App\Console\Commands\TestMailSettings::class
|
||||
\App\Console\Commands\TestMailSettings::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Events;
|
||||
|
||||
use App\Http\Resources\ChatMessageResource;
|
||||
use App\Message;
|
||||
use Illuminate\Broadcasting\Channel;
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
@@ -26,13 +26,12 @@ class MessageDeleted implements ShouldBroadcastNow
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
/**
|
||||
* Message details
|
||||
* Message details.
|
||||
*
|
||||
* @var Message
|
||||
*/
|
||||
public $message;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
@@ -52,7 +51,7 @@ class MessageDeleted implements ShouldBroadcastNow
|
||||
{
|
||||
// $this->dontBroadcastToCurrentUser();
|
||||
|
||||
return new PresenceChannel('chatroom.' . $this->message->chatroom_id);
|
||||
return new PresenceChannel('chatroom.'.$this->message->chatroom_id);
|
||||
}
|
||||
|
||||
public function broadcastAs()
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -26,13 +27,12 @@ class MessageEdited implements ShouldBroadcastNow
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
/**
|
||||
* Message details
|
||||
* Message details.
|
||||
*
|
||||
* @var Message
|
||||
*/
|
||||
public $message;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
@@ -53,7 +53,7 @@ class MessageEdited implements ShouldBroadcastNow
|
||||
{
|
||||
// $this->dontBroadcastToCurrentUser();
|
||||
|
||||
return new PresenceChannel('chatroom.' . $this->message->chatroom_id);
|
||||
return new PresenceChannel('chatroom.'.$this->message->chatroom_id);
|
||||
}
|
||||
|
||||
public function broadcastAs()
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -26,13 +27,12 @@ class MessageSent implements ShouldBroadcastNow
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
/**
|
||||
* Message details
|
||||
* Message details.
|
||||
*
|
||||
* @var Message
|
||||
*/
|
||||
public $message;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
@@ -53,7 +53,7 @@ class MessageSent implements ShouldBroadcastNow
|
||||
{
|
||||
// $this->dontBroadcastToCurrentUser();
|
||||
|
||||
return new PresenceChannel('chatroom.' . $this->message->chatroom_id);
|
||||
return new PresenceChannel('chatroom.'.$this->message->chatroom_id);
|
||||
}
|
||||
|
||||
public function broadcastAs()
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -45,7 +46,8 @@ class Handler extends ExceptionHandler
|
||||
*
|
||||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||
*
|
||||
* @param \Exception $exception
|
||||
* @param \Exception $exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function report(Exception $exception)
|
||||
@@ -56,8 +58,9 @@ class Handler extends ExceptionHandler
|
||||
/**
|
||||
* Render an exception into an HTTP response.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Exception $exception
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Exception $exception
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function render($request, Exception $exception)
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -17,22 +18,22 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class FailedLoginAttempt extends Model
|
||||
{
|
||||
/**
|
||||
* The Attributes That Are Mass Assignable
|
||||
* The Attributes That Are Mass Assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'username',
|
||||
'ip_address'
|
||||
'ip_address',
|
||||
];
|
||||
|
||||
public static function record($user = null, $username, $ip)
|
||||
public static function record($user, $username, $ip)
|
||||
{
|
||||
return static::create([
|
||||
'user_id' => is_null($user) ? null : $user->id,
|
||||
'username' => $username,
|
||||
'ip_address' => $ip
|
||||
'user_id' => is_null($user) ? null : $user->id,
|
||||
'username' => $username,
|
||||
'ip_address' => $ip,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -17,7 +18,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class FeaturedTorrent extends Model
|
||||
{
|
||||
/**
|
||||
* Belongs To A Torrent
|
||||
* Belongs To A Torrent.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
@@ -27,7 +28,7 @@ class FeaturedTorrent extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Belongs To A User
|
||||
* Belongs To A User.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
|
||||
+6
-5
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -20,7 +21,7 @@ class Follow extends Model
|
||||
use Notifiable;
|
||||
|
||||
/**
|
||||
* Belongs To A User
|
||||
* Belongs To A User.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
@@ -28,12 +29,12 @@ class Follow extends Model
|
||||
{
|
||||
return $this->belongsTo(User::class)->withDefault([
|
||||
'username' => 'System',
|
||||
'id' => '1'
|
||||
'id' => '1',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Belongs To A User
|
||||
* Belongs To A User.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
@@ -41,7 +42,7 @@ class Follow extends Model
|
||||
{
|
||||
return $this->belongsTo(User::class)->withDefault([
|
||||
'username' => 'System',
|
||||
'id' => '1'
|
||||
'id' => '1',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
+16
-12
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -17,7 +18,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Forum extends Model
|
||||
{
|
||||
/**
|
||||
* Has Many Topic
|
||||
* Has Many Topic.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
@@ -27,7 +28,7 @@ class Forum extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Has Many Permissions
|
||||
* Has Many Permissions.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
@@ -37,54 +38,56 @@ class Forum extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns A Table With The Forums In The Category
|
||||
* Returns A Table With The Forums In The Category.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getForumsInCategory()
|
||||
{
|
||||
return Forum::where('parent_id', '=', $this->id)->get();
|
||||
return self::where('parent_id', '=', $this->id)->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns The Category Nn Which The Forum Is Located
|
||||
* Returns The Category Nn Which The Forum Is Located.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCategory()
|
||||
{
|
||||
return Forum::find($this->parent_id);
|
||||
return self::find($this->parent_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Count The Number Of Posts In The Forum
|
||||
* Count The Number Of Posts In The Forum.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPostCount($forumId)
|
||||
{
|
||||
$forum = Forum::find($forumId);
|
||||
$forum = self::find($forumId);
|
||||
$topics = $forum->topics;
|
||||
$count = 0;
|
||||
foreach ($topics as $t) {
|
||||
$count += $t->posts()->count();
|
||||
}
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Count The Number Of Topics In The Forum
|
||||
* Count The Number Of Topics In The Forum.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTopicCount($forumId)
|
||||
{
|
||||
$forum = Forum::find($forumId);
|
||||
$forum = self::find($forumId);
|
||||
|
||||
return Topic::where('forum_id', '=', $forum->id)->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns The Permission Field
|
||||
* Returns The Permission Field.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -95,6 +98,7 @@ class Forum extends Model
|
||||
} else {
|
||||
$group = Group::find(2);
|
||||
}
|
||||
|
||||
return Permission::whereRaw('forum_id = ? AND group_id = ?', [$this->id, $group->id])->first();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
+4
-3
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -17,9 +18,9 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Graveyard extends Model
|
||||
{
|
||||
/**
|
||||
* The Database Table Used By The Model
|
||||
* The Database Table Used By The Model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = "graveyard";
|
||||
protected $table = 'graveyard';
|
||||
}
|
||||
|
||||
+7
-7
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -17,21 +18,21 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Group extends Model
|
||||
{
|
||||
/**
|
||||
* The Attributes That Aren't Mass Assignable
|
||||
* The Attributes That Aren't Mass Assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $guarded = ['id'];
|
||||
|
||||
/**
|
||||
* Indicates If The Model Should Be Timestamped
|
||||
* Indicates If The Model Should Be Timestamped.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Has Many Users
|
||||
* Has Many Users.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
@@ -41,7 +42,7 @@ class Group extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Has Many Permissions
|
||||
* Has Many Permissions.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
@@ -51,8 +52,7 @@ class Group extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns The Requested Row From The Permissions Table
|
||||
*
|
||||
* Returns The Requested Row From The Permissions Table.
|
||||
*/
|
||||
public function getPermissionsByForum($forum)
|
||||
{
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Ryuu
|
||||
*/
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
use Decoda\Decoda;
|
||||
use App\Hook\ClickableHook;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Decoda\Decoda;
|
||||
|
||||
class Bbcode
|
||||
{
|
||||
@@ -32,6 +32,7 @@ class Bbcode
|
||||
$code->setXhtml(false);
|
||||
$code->setStrict(false);
|
||||
$code->setLineBreaks(true);
|
||||
|
||||
return $code;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ if (!function_exists('hrefProfile')) {
|
||||
function hrefProfile($user)
|
||||
{
|
||||
$appurl = appurl();
|
||||
|
||||
return "{$appurl}/{$user->username}.{$user->id}";
|
||||
}
|
||||
}
|
||||
@@ -19,6 +20,7 @@ if (!function_exists('hrefArticle')) {
|
||||
function hrefArticle($article)
|
||||
{
|
||||
$appurl = appurl();
|
||||
|
||||
return "{$appurl}/articles/{$article->slug}.{$article->id}";
|
||||
}
|
||||
}
|
||||
@@ -27,6 +29,7 @@ if (!function_exists('hrefTorrent')) {
|
||||
function hrefTorrent($torrent)
|
||||
{
|
||||
$appurl = appurl();
|
||||
|
||||
return "{$appurl}/torrents/{$torrent->slug}.{$torrent->id}";
|
||||
}
|
||||
}
|
||||
@@ -36,6 +39,7 @@ if (!function_exists('hrefTorrentRequest')) {
|
||||
{
|
||||
$appurl = appurl();
|
||||
$slug = str_slug($torrentRequest->name);
|
||||
|
||||
return "{$appurl}/request/{$torrentRequest->id}";
|
||||
}
|
||||
}
|
||||
@@ -44,6 +48,7 @@ if (!function_exists('hrefPoll')) {
|
||||
function hrefPoll($poll)
|
||||
{
|
||||
$appurl = appurl();
|
||||
|
||||
return "{$appurl}/poll/{$poll->slug}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
if (!function_exists('language')) {
|
||||
/**
|
||||
* Get the language instance.
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -13,16 +14,16 @@
|
||||
namespace App\Helpers;
|
||||
|
||||
/**
|
||||
* Class LanguageCensor
|
||||
* Class LanguageCensor.
|
||||
*
|
||||
* A class that can redact/replace words.
|
||||
*
|
||||
*/
|
||||
class LanguageCensor
|
||||
{
|
||||
protected static function isSpecial($c)
|
||||
{
|
||||
$specialChars = "<>\n [].;,";
|
||||
|
||||
return strpos($specialChars, $c) !== false;
|
||||
}
|
||||
|
||||
@@ -55,19 +56,19 @@ class LanguageCensor
|
||||
{
|
||||
$redactArray = config('censor.redact', []);
|
||||
foreach ($redactArray as $word) {
|
||||
$result = "";
|
||||
$result = '';
|
||||
$length = strlen($source);
|
||||
$word_length = strlen($word);
|
||||
assert($word_length > 0);
|
||||
$indexes = self::matchWordIndexes($source, $word);
|
||||
$ignore = 0;
|
||||
for ($i = 0; $i < $length; ++$i) {
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
if (count($indexes) > 0 && $indexes[0] == $i) {
|
||||
$match = substr($source, $indexes[0], $word_length);
|
||||
$result .= "<span class='censor'>{$match}</span>";
|
||||
$ignore = $word_length - 1;
|
||||
} elseif ($ignore > 0) {
|
||||
--$ignore;
|
||||
$ignore--;
|
||||
} else {
|
||||
$result .= $source[$i];
|
||||
}
|
||||
@@ -79,6 +80,7 @@ class LanguageCensor
|
||||
foreach ($replaceDict as $word => $replacement) {
|
||||
$source = str_ireplace($word, $replacement, $source);
|
||||
}
|
||||
|
||||
return $source;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use App\LogActivity as LogActivityModel;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
|
||||
class LogActivity
|
||||
{
|
||||
|
||||
public static function addToLog($subject)
|
||||
{
|
||||
$log = [];
|
||||
|
||||
+104
-100
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -33,12 +34,10 @@ class MediaInfo
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (count($output)) {
|
||||
$output = $this->parseSections($output);
|
||||
}
|
||||
|
||||
|
||||
return $this->formatOutput($output);
|
||||
}
|
||||
|
||||
@@ -55,6 +54,7 @@ class MediaInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ class MediaInfo
|
||||
foreach ($sections as $info) {
|
||||
$property = null;
|
||||
$value = null;
|
||||
$info = explode(":", $info, 2);
|
||||
$info = explode(':', $info, 2);
|
||||
if (count($info) >= 2) {
|
||||
$property = trim(strtolower($info[0]));
|
||||
$value = trim($info[1]);
|
||||
@@ -73,22 +73,22 @@ class MediaInfo
|
||||
switch (strtolower($section)) {
|
||||
case 'general':
|
||||
switch ($property) {
|
||||
case "complete name":
|
||||
case "completename":
|
||||
case 'complete name':
|
||||
case 'completename':
|
||||
$output['file_name'] = self::stripPath($value);
|
||||
break;
|
||||
case "format":
|
||||
case 'format':
|
||||
$output['format'] = $value;
|
||||
break;
|
||||
case "duration":
|
||||
case 'duration':
|
||||
$output['duration'] = $value;
|
||||
break;
|
||||
case "file size":
|
||||
case "filesize":
|
||||
case 'file size':
|
||||
case 'filesize':
|
||||
$output['file_size'] = $this->parseFileSize($value);
|
||||
break;
|
||||
case "overall bit rate":
|
||||
case "overallbitrate":
|
||||
case 'overall bit rate':
|
||||
case 'overallbitrate':
|
||||
$output['bit_rate'] = $this->parseBitRate($value);
|
||||
break;
|
||||
}
|
||||
@@ -96,80 +96,80 @@ class MediaInfo
|
||||
|
||||
case 'video':
|
||||
switch ($property) {
|
||||
case "format":
|
||||
case 'format':
|
||||
$output['format'] = $value;
|
||||
break;
|
||||
case "format version":
|
||||
case "format_version":
|
||||
case 'format version':
|
||||
case 'format_version':
|
||||
$output['format_version'] = $value;
|
||||
break;
|
||||
case "codec id":
|
||||
case "codecid":
|
||||
case 'codec id':
|
||||
case 'codecid':
|
||||
$output['codec'] = $value;
|
||||
break;
|
||||
case "width":
|
||||
case 'width':
|
||||
$output['width'] = $this->parseWidthHeight($value);
|
||||
break;
|
||||
case "height":
|
||||
case 'height':
|
||||
$output['height'] = $this->parseWidthHeight($value);
|
||||
break;
|
||||
case "stream size":
|
||||
case "stream_size":
|
||||
case 'stream size':
|
||||
case 'stream_size':
|
||||
$output['stream_size'] = $this->parseFileSize($value);
|
||||
break;
|
||||
case "writing library":
|
||||
case "encoded_library":
|
||||
case 'writing library':
|
||||
case 'encoded_library':
|
||||
$output['writing_library'] = $value;
|
||||
break;
|
||||
case "frame rate mode":
|
||||
case "framerate_mode":
|
||||
case 'frame rate mode':
|
||||
case 'framerate_mode':
|
||||
$output['framerate_mode'] = $value;
|
||||
break;
|
||||
case "frame rate":
|
||||
case "framerate":
|
||||
case 'frame rate':
|
||||
case 'framerate':
|
||||
// if variable this becomes Original frame rate
|
||||
$output['frame_rate'] = $value;
|
||||
break;
|
||||
case "display aspect ratio":
|
||||
case "displayaspectratio":
|
||||
$output['aspect_ratio'] = str_replace("/", ":", $value); // mediainfo sometimes uses / instead of :
|
||||
case 'display aspect ratio':
|
||||
case 'displayaspectratio':
|
||||
$output['aspect_ratio'] = str_replace('/', ':', $value); // mediainfo sometimes uses / instead of :
|
||||
break;
|
||||
case "bit rate":
|
||||
case "bitrate":
|
||||
case 'bit rate':
|
||||
case 'bitrate':
|
||||
$output['bit_rate'] = $this->parseBitRate($value);
|
||||
break;
|
||||
case "bit rate mode":
|
||||
case "bitrate_mode":
|
||||
case 'bit rate mode':
|
||||
case 'bitrate_mode':
|
||||
$output['bit_rate_mode'] = $value;
|
||||
break;
|
||||
case "nominal bit rate":
|
||||
case "bitrate_nominal":
|
||||
case 'nominal bit rate':
|
||||
case 'bitrate_nominal':
|
||||
$output['bit_rate_nominal'] = $this->parseBitRate($value);
|
||||
break;
|
||||
case "bits/(pixel*frame)":
|
||||
case "bits-(pixel*frame)":
|
||||
case 'bits/(pixel*frame)':
|
||||
case 'bits-(pixel*frame)':
|
||||
$output['bit_pixel_frame'] = $value;
|
||||
break;
|
||||
case "bit depth":
|
||||
case "bitdepth":
|
||||
case 'bit depth':
|
||||
case 'bitdepth':
|
||||
$output['bit_depth'] = $value;
|
||||
break;
|
||||
case "encoding settings":
|
||||
case 'encoding settings':
|
||||
$output['encoding_settings'] = $value;
|
||||
break;
|
||||
case "language":
|
||||
case 'language':
|
||||
$output['language'] = $value;
|
||||
break;
|
||||
case "format profile":
|
||||
case 'format profile':
|
||||
$output['format_profile'] = $value;
|
||||
break;
|
||||
case "title":
|
||||
case 'title':
|
||||
$output['title'] = $value;
|
||||
break;
|
||||
case "color primaries":
|
||||
case 'color primaries':
|
||||
$output['title'] = $value;
|
||||
break;
|
||||
case "scan type":
|
||||
case 'scan type':
|
||||
$output['scan_type'] = $value;
|
||||
break;
|
||||
}
|
||||
@@ -177,32 +177,32 @@ class MediaInfo
|
||||
|
||||
case 'audio':
|
||||
switch ($property) {
|
||||
case "codec id":
|
||||
case "codecid":
|
||||
case 'codec id':
|
||||
case 'codecid':
|
||||
$output['codec'] = $value;
|
||||
break;
|
||||
case "format":
|
||||
case 'format':
|
||||
$output['format'] = $value;
|
||||
break;
|
||||
case "bit rate":
|
||||
case "bitrate":
|
||||
case 'bit rate':
|
||||
case 'bitrate':
|
||||
$output['bit_rate'] = $this->parseBitRate($value);
|
||||
break;
|
||||
case "channel(s)":
|
||||
case 'channel(s)':
|
||||
$output['channels'] = $this->parseAudioChannels($value);
|
||||
break;
|
||||
case "title":
|
||||
case 'title':
|
||||
$output['title'] = $value;
|
||||
break;
|
||||
case "language":
|
||||
case 'language':
|
||||
$output['language'] = $value;
|
||||
break;
|
||||
case "format profile":
|
||||
case "format_profile":
|
||||
case 'format profile':
|
||||
case 'format_profile':
|
||||
$output['format_profile'] = $value;
|
||||
break;
|
||||
case "stream size":
|
||||
case "stream_size":
|
||||
case 'stream size':
|
||||
case 'stream_size':
|
||||
$output['stream_size'] = $this->parseFileSize($value);
|
||||
break;
|
||||
}
|
||||
@@ -210,23 +210,23 @@ class MediaInfo
|
||||
|
||||
case 'text':
|
||||
switch ($property) {
|
||||
case "codec id":
|
||||
case "codecid":
|
||||
case 'codec id':
|
||||
case 'codecid':
|
||||
$output['codec'] = $value;
|
||||
break;
|
||||
case "format":
|
||||
case 'format':
|
||||
$output['format'] = $value;
|
||||
break;
|
||||
case "title":
|
||||
case 'title':
|
||||
$output['title'] = $value;
|
||||
break;
|
||||
case "language":
|
||||
case 'language':
|
||||
$output['language'] = $value;
|
||||
break;
|
||||
case "default":
|
||||
case 'default':
|
||||
$output['default'] = $value;
|
||||
break;
|
||||
case "forced":
|
||||
case 'forced':
|
||||
$output['forced'] = $value;
|
||||
break;
|
||||
}
|
||||
@@ -234,22 +234,24 @@ class MediaInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
public static function stripPath($string)
|
||||
{
|
||||
$string = str_replace("\\", "/", $string);
|
||||
$string = str_replace('\\', '/', $string);
|
||||
$path_parts = pathinfo($string);
|
||||
|
||||
return $path_parts['basename'];
|
||||
}
|
||||
|
||||
private function parseFileSize($string)
|
||||
{
|
||||
$number = (float)$string;
|
||||
preg_match("/[KMGTPEZ]/i", $string, $size);
|
||||
$number = (float) $string;
|
||||
preg_match('/[KMGTPEZ]/i', $string, $size);
|
||||
if (!empty($size[0])) {
|
||||
$number = $this->computerSize($number, $size[0] . 'b');
|
||||
$number = $this->computerSize($number, $size[0].'b');
|
||||
}
|
||||
|
||||
return $number;
|
||||
@@ -259,6 +261,7 @@ class MediaInfo
|
||||
{
|
||||
$string = str_replace(' ', '', strtolower($string));
|
||||
$string = str_replace('kbps', ' kbps', $string);
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
@@ -270,14 +273,15 @@ class MediaInfo
|
||||
private function parseAudioChannels($string)
|
||||
{
|
||||
$replace = [
|
||||
' ' => '',
|
||||
' ' => '',
|
||||
'channels' => 'ch',
|
||||
'channel' => 'ch',
|
||||
'1ch' => '1.0ch',
|
||||
'7ch' => '6.1ch',
|
||||
'6ch' => '5.1ch',
|
||||
'2ch' => '2.0ch'
|
||||
'channel' => 'ch',
|
||||
'1ch' => '1.0ch',
|
||||
'7ch' => '6.1ch',
|
||||
'6ch' => '5.1ch',
|
||||
'2ch' => '2.0ch',
|
||||
];
|
||||
|
||||
return str_ireplace(array_keys($replace), $replace, $string);
|
||||
}
|
||||
|
||||
@@ -288,17 +292,18 @@ class MediaInfo
|
||||
$output['video'] = !empty($data['video']) ? $data['video'] : null;
|
||||
$output['audio'] = !empty($data['audio']) ? $data['audio'] : null;
|
||||
$output['text'] = !empty($data['text']) ? $data['text'] : null;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
public function prepareViewCrumbs($data)
|
||||
{
|
||||
$output = ["general"=>[],"video"=>[],"audio"=>[]];
|
||||
$output = ['general'=>[], 'video'=>[], 'audio'=>[]];
|
||||
|
||||
$general_crumbs = ["format"=>"ucfirst","duration"=>null];
|
||||
$general_crumbs = ['format'=>'ucfirst', 'duration'=>null];
|
||||
|
||||
if ($data['general'] === null) {
|
||||
$output["general"] = null;
|
||||
$output['general'] = null;
|
||||
} else {
|
||||
if (isset($data['general']['format'])) {
|
||||
$output['general'][] = ucfirst($data['general']['format']);
|
||||
@@ -307,77 +312,76 @@ class MediaInfo
|
||||
$output['general'][] = $data['general']['duration'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($data['video'] === null) {
|
||||
$output["video"] = null;
|
||||
$output['video'] = null;
|
||||
} else {
|
||||
$temp_output = [];
|
||||
foreach ($data["video"] as $video_element) {
|
||||
foreach ($data['video'] as $video_element) {
|
||||
$temp_video_output = [];
|
||||
if (isset($video_element['format'])) {
|
||||
$temp_video_output[] = strtoupper($video_element['format']);
|
||||
}
|
||||
if (isset($video_element['width']) && isset($video_element['height'])) {
|
||||
$temp_video_output[] = $video_element['width']." x ".$video_element['height'];
|
||||
$temp_video_output[] = $video_element['width'].' x '.$video_element['height'];
|
||||
}
|
||||
foreach (["aspect_ratio","frame_rate","bit_depth","bit_rate","format_profile","scan_type","title","color primaries"] as $property) {
|
||||
foreach (['aspect_ratio', 'frame_rate', 'bit_depth', 'bit_rate', 'format_profile', 'scan_type', 'title', 'color primaries'] as $property) {
|
||||
if (isset($video_element[$property])) {
|
||||
$temp_video_output[] = $video_element[$property];
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($temp_video_output)) {
|
||||
$temp_output[]=$temp_video_output;
|
||||
$temp_output[] = $temp_video_output;
|
||||
}
|
||||
}
|
||||
|
||||
$output["video"] = !empty($temp_output) ? $temp_output : null;
|
||||
$output['video'] = !empty($temp_output) ? $temp_output : null;
|
||||
}
|
||||
|
||||
if ($data['audio'] === null) {
|
||||
$output["audio"] = null;
|
||||
$output['audio'] = null;
|
||||
} else {
|
||||
$temp_output = [];
|
||||
foreach ($data["audio"] as $audio_element) {
|
||||
foreach ($data['audio'] as $audio_element) {
|
||||
$temp_audio_output = [];
|
||||
foreach (["language","format","channels","bit_rate","title"] as $property) {
|
||||
foreach (['language', 'format', 'channels', 'bit_rate', 'title'] as $property) {
|
||||
if (isset($audio_element[$property])) {
|
||||
$temp_audio_output[] = $audio_element[$property];
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($temp_audio_output)) {
|
||||
$temp_output[]=$temp_audio_output;
|
||||
$temp_output[] = $temp_audio_output;
|
||||
}
|
||||
}
|
||||
|
||||
$output["audio"] = !empty($temp_output) ? $temp_output : null;
|
||||
$output['audio'] = !empty($temp_output) ? $temp_output : null;
|
||||
}
|
||||
|
||||
if ($data['text'] === null) {
|
||||
$output["text"] = null;
|
||||
$output['text'] = null;
|
||||
} else {
|
||||
$temp_output = [];
|
||||
foreach ($data["text"] as $text_element) {
|
||||
foreach ($data['text'] as $text_element) {
|
||||
$temp_text_output = [];
|
||||
foreach (["language","format","title"] as $property) {
|
||||
foreach (['language', 'format', 'title'] as $property) {
|
||||
if (isset($text_element[$property])) {
|
||||
$temp_text_output[] = $text_element[$property];
|
||||
}
|
||||
}
|
||||
if (isset($text_element['forced']) && strtolower($text_element['forced']) == "yes") {
|
||||
$temp_text_output[] = "Forced";
|
||||
if (isset($text_element['forced']) && strtolower($text_element['forced']) == 'yes') {
|
||||
$temp_text_output[] = 'Forced';
|
||||
}
|
||||
|
||||
if (!empty($temp_text_output)) {
|
||||
$temp_output[]=$temp_text_output;
|
||||
$temp_output[] = $temp_text_output;
|
||||
}
|
||||
}
|
||||
|
||||
$output["text"] = !empty($temp_output) ? $temp_output : null;
|
||||
$output['text'] = !empty($temp_output) ? $temp_output : null;
|
||||
}
|
||||
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
@@ -387,13 +391,13 @@ class MediaInfo
|
||||
|
||||
private function computerSize($number, $size)
|
||||
{
|
||||
$bytes = (float)$number;
|
||||
$bytes = (float) $number;
|
||||
$size = strtolower($size);
|
||||
|
||||
$factors = ['b' => 0, 'kb' => 1, 'mb' => 2, 'gb' => 3, 'tb' => 4, 'pb' => 5, 'eb' => 6, 'zb' => 7, 'yb' => 8];
|
||||
|
||||
if (isset($factors[$size])) {
|
||||
return (float)number_format($bytes * pow(1024, $factors[$size]), 2, '.', '');
|
||||
return (float) number_format($bytes * pow(1024, $factors[$size]), 2, '.', '');
|
||||
}
|
||||
|
||||
return $bytes;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user