summaryrefslogtreecommitdiffstats
path: root/admin/subscriptions.php
diff options
context:
space:
mode:
authornashe <contact@nashe.fr>2015-08-11 12:04:53 +0200
committernashe <contact@nashe.fr>2015-08-11 12:04:53 +0200
commitb84b865d45b00600d982fef18991398cb655c7e9 (patch)
tree5f3d0432facd74395d029c480bb79d9e0669eb01 /admin/subscriptions.php
parentf2788a4ed2eae7f0056ab200b8fc787ed20a32da (diff)
downloadplanet-b84b865d45b00600d982fef18991398cb655c7e9.tar
planet-b84b865d45b00600d982fef18991398cb655c7e9.tar.gz
planet-b84b865d45b00600d982fef18991398cb655c7e9.tar.bz2
planet-b84b865d45b00600d982fef18991398cb655c7e9.tar.xz
planet-b84b865d45b00600d982fef18991398cb655c7e9.zip
Clean code
Replace dirname(__FILE__) by __DIR__.
Diffstat (limited to 'admin/subscriptions.php')
-rwxr-xr-xadmin/subscriptions.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/admin/subscriptions.php b/admin/subscriptions.php
index 8367a16..f2d51f5 100755
--- a/admin/subscriptions.php
+++ b/admin/subscriptions.php
@@ -1,7 +1,7 @@
<?php
-require_once dirname(__FILE__) . '/../app/app.php';
-require_once dirname(__FILE__) . '/inc/auth.inc.php';
+require_once __DIR__ . '/../app/app.php';
+require_once __DIR__ . '/inc/auth.inc.php';
function removeSlashes(&$item, $key){
$item = stripslashes($item);
@@ -10,12 +10,12 @@ function removeSlashes(&$item, $key){
if (isset($_POST['opml']) || isset($_POST['add'])) {
// Load config and old OPML
- $conf = Spyc::YAMLLoad(dirname(__FILE__).'/../custom/config.yml');
+ $conf = Spyc::YAMLLoad(__DIR__.'/../custom/config.yml');
$PlanetConfig = new PlanetConfig($conf);
if ($PlanetConfig->getName() === '') {
$PlanetConfig->setName($oldOpml->getTitle());
}
- $oldOpml = OpmlManager::load(dirname(__FILE__).'/../custom/people.opml');
+ $oldOpml = OpmlManager::load(__DIR__.'/../custom/people.opml');
$newOpml = new opml();
$newOpml->title = $PlanetConfig->getName();
@@ -57,10 +57,10 @@ if (isset($_POST['opml']) || isset($_POST['add'])) {
}
// Backup old OPML
- OpmlManager::backup(dirname(__FILE__).'/../custom/people.opml');
+ OpmlManager::backup(__DIR__.'/../custom/people.opml');
// Save new OPML
- OpmlManager::save($newOpml, dirname(__FILE__).'/../custom/people.opml');
+ OpmlManager::save($newOpml, __DIR__.'/../custom/people.opml');
}
header("Location: index.php");
die();