diff options
Diffstat (limited to 'common/admin/index.php')
-rwxr-xr-x | common/admin/index.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/common/admin/index.php b/common/admin/index.php index 28f7198..0118923 100755 --- a/common/admin/index.php +++ b/common/admin/index.php @@ -1,10 +1,10 @@ <?php -require_once dirname(__FILE__) . '/inc/auth.inc.php'; -require_once dirname(__FILE__) . '/../app/app.php'; +require_once __DIR__ . '/../app/app.php'; +require_once __DIR__ . '/inc/auth.inc.php'; //Load configuration -$config_file = dirname(__FILE__) . '/../custom/config.yml'; +$config_file = __DIR__ . '/../custom/config.yml'; if (is_file($config_file)){ $conf = Spyc::YAMLLoad($config_file); @@ -17,7 +17,7 @@ if (is_file($config_file)){ $Planet = new Planet($PlanetConfig); //Load -if (0 < $Planet->loadOpml(dirname(__FILE__) . '/../custom/people.opml')) { +if (0 < $Planet->loadOpml(__DIR__ . '/../custom/people.opml')) { $Planet->loadFeeds(); $items = $Planet->getItems(); } @@ -79,6 +79,7 @@ ob_start(); <input type="submit" class="submit add" name="add" value="<?=_g('Add Feed')?>" /> </fieldset> <p class="help"><?=_g('Accepted formats are RSS and ATOM. If the link is not a feed, moonmoon will try to autodiscover the feed.')?></p> + <input type="hidden" value="<?php echo $csrf->generate('feedmanage'); ?>" name="_csrf"> </form> </div> @@ -87,6 +88,7 @@ ob_start(); <form action="subscriptions.php" method="post" id="feedmanage"> <p class="action"> <span class="count"><?php echo sprintf(_g('Number of feeds: %s'), $count_feeds)?></span> + <input type="hidden" value="<?php echo $csrf->generate('feedmanage'); ?>" name="_csrf"> <input type="submit" class="submit save" name="save" id="save" value="<?=_g('Save changes')?>" /> <input type="submit" class="submit delete" name="delete" id="delete" value="<?=_g('Delete selected Feeds')?>" /> </p> @@ -99,6 +101,7 @@ ob_start(); <th><?=_g('Last entry')?></th> <th><?=_g('Website link')?></th> <th><?=_g('Feed link')?></th> + <th><?=_g('Unavailable')?></th> </tr> </thead> <tbody> @@ -118,10 +121,12 @@ ob_start(); } else { echo _g('Not in cache'); } + $check_is_down = $opml_person->getIsDown() === '1' ? 'checked="checked"' : ''; ?> </td> <td><input type="text" size="30" class="text" name="opml[<?=$i; ?>][website]" value="<?=$opml_person->getWebsite(); ?>" /></td> <td><input type="text" size="30" class="text" name="opml[<?=$i; ?>][feed]" value="<?=$opml_person->getFeed(); ?>" /></td> + <td><input type="checkbox" readonly="readonly" name="opml[<?=$i; ?>][isDown]" <?=$check_is_down?> value="1" /></td> </tr> <?php } ?> </tbody> @@ -133,4 +138,4 @@ $page_content = ob_get_contents(); ob_end_clean(); $admin_access = 1; -require_once dirname(__FILE__) . '/template.php'; +require_once __DIR__ . '/template.php'; |