Author: Andreas Möller (localheinz) Committer: GitHub (web-flow) Pusher: kamil-tekiela Date: 2022-06-29T19:03:25+01:00
Commit: https://github.com/php/web-php/commit/d6f23ea19b34802c64bfbf97553d2348b9f6eaad Raw diff: https://github.com/php/web-php/commit/d6f23ea19b34802c64bfbf97553d2348b9f6eaad.diff Fix: Move class into src/ (#581) Changed paths: A src/News/Entry.php D include/news_entry.inc M bin/createNewsEntry M bin/createReleaseEntry Diff: diff --git a/bin/createNewsEntry b/bin/createNewsEntry index dd027d7c0d..0f6bdc99b5 100755 --- a/bin/createNewsEntry +++ b/bin/createNewsEntry @@ -2,8 +2,9 @@ <?php PHP_SAPI == 'cli' or die("Please run this script using the cli sapi"); -require(__DIR__ . '/../include/news_entry.inc'); -use phpweb\news\Entry; +require_once __DIR__ . '/../src/News/Entry.php'; + +use phpweb\News\Entry; $imageRestriction = [ 'width' => 400, diff --git a/bin/createReleaseEntry b/bin/createReleaseEntry index a2683d175c..fbd3f9d2c7 100755 --- a/bin/createReleaseEntry +++ b/bin/createReleaseEntry @@ -2,8 +2,9 @@ <?php PHP_SAPI == 'cli' or die("Please run this script using the cli sapi"); -require(__DIR__ . '/../include/news_entry.inc'); -use phpweb\news\Entry; +require_once __DIR__ . '/../src/News/Entry.php'; + +use phpweb\News\Entry; if (!file_exists(Entry::ARCHIVE_FILE_ABS)) { fwrite(STDERR, "Can't find " . Entry::ARCHIVE_FILE_REL . ", are you sure you are in phpweb/?\n"); diff --git a/include/news_entry.inc b/src/News/Entry.php similarity index 99% rename from include/news_entry.inc rename to src/News/Entry.php index db9c7bdc5d..659a8e8800 100755 --- a/include/news_entry.inc +++ b/src/News/Entry.php @@ -1,6 +1,6 @@ <?php -namespace phpweb\news; +namespace phpweb\News; class Entry { const CATEGORIES = [ @@ -11,7 +11,7 @@ class Entry { ]; const WEBROOT = "https://www.php.net"; - const PHPWEB = __DIR__ . '/../'; + const PHPWEB = __DIR__ . '/../../'; const ARCHIVE_FILE_REL = 'archive/archive.xml'; const ARCHIVE_FILE_ABS = self::PHPWEB . self::ARCHIVE_FILE_REL; const ARCHIVE_ENTRIES_REL = 'archive/entries/'; -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php