Adapt examples to madeline.php

This commit is contained in:
Daniil Gentili 2018-10-13 15:16:10 +00:00
parent e026afe089
commit 37a71b86a2
3 changed files with 31 additions and 3 deletions

View File

@ -11,7 +11,16 @@ You should have received a copy of the GNU General Public License along with Mad
If not, see <http://www.gnu.org/licenses/>.
*/
require '../vendor/autoload.php';
if (!file_exists(__DIR__.'/../vendor/autoload.php')) {
echo 'You did not run composer update, using madeline.php'.PHP_EOL;
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
} else {
require_once 'vendor/autoload.php';
}
$settings = [];
$MadelineProto = false;

View File

@ -11,7 +11,16 @@ You should have received a copy of the GNU General Public License along with Mad
If not, see <http://www.gnu.org/licenses/>.
*/
require '../vendor/autoload.php';
if (!file_exists(__DIR__.'/../vendor/autoload.php')) {
echo 'You did not run composer update, using madeline.php'.PHP_EOL;
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
} else {
require_once 'vendor/autoload.php';
}
$settings = [];
$MadelineProto = false;
$uMadelineProto = false;

View File

@ -10,7 +10,17 @@ See the GNU Affero General Public License for more details.
You should have received a copy of the GNU General Public License along with MadelineProto.
If not, see <http://www.gnu.org/licenses/>.
*/
require '../vendor/autoload.php';
if (!file_exists(__DIR__.'/../vendor/autoload.php')) {
echo 'You did not run composer update, using madeline.php'.PHP_EOL;
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
} else {
require_once 'vendor/autoload.php';
}
$settings = [];
include_once 'token.php';