add missing test to avoid uninitialised value when a page with metadata is removed
parent
0a4cd38d61
commit
7a40bcab9a
|
@ -66,7 +66,8 @@ sub needsbuild (@) { #{{{
|
|||
loadstate(); # if not already loaded
|
||||
|
||||
foreach my $feed (values %feeds) {
|
||||
if (grep { $_ eq $pagesources{$feed->{sourcepage}} } @$needsbuild) {
|
||||
if (exists $pagesources{$page} &&
|
||||
grep { $_ eq $pagesources{$feed->{sourcepage}} } @$needsbuild) {
|
||||
# Mark all feeds originating on this page as removable;
|
||||
# preprocess will unmark those that still exist.
|
||||
remove_feeds($feed->{sourcepage});
|
||||
|
|
|
@ -390,7 +390,8 @@ sub needsbuild (@) { #{{{
|
|||
# the current day
|
||||
push @$needsbuild, $pagesources{$page};
|
||||
}
|
||||
if (grep { $_ eq $pagesources{$page} } @$needsbuild) {
|
||||
if (exists $pagesources{$page} &&
|
||||
grep { $_ eq $pagesources{$page} } @$needsbuild) {
|
||||
# remove state, will be re-added if
|
||||
# the calendar is still there during the
|
||||
# rebuild
|
||||
|
|
|
@ -21,7 +21,8 @@ sub needsbuild (@) { #{{{
|
|||
|
||||
foreach my $page (keys %pagestate) {
|
||||
if (exists $pagestate{$page}{edittemplate}) {
|
||||
if (grep { $_ eq $pagesources{$page} } @$needsbuild) {
|
||||
if (exists $pagesources{$page} &&
|
||||
grep { $_ eq $pagesources{$page} } @$needsbuild) {
|
||||
# remove state, it will be re-added
|
||||
# if the preprocessor directive is still
|
||||
# there during the rebuild
|
||||
|
|
|
@ -18,7 +18,8 @@ sub needsbuild (@) { #{{{
|
|||
my $needsbuild=shift;
|
||||
foreach my $page (keys %pagestate) {
|
||||
if (exists $pagestate{$page}{meta}) {
|
||||
if (grep { $_ eq $pagesources{$page} } @$needsbuild) {
|
||||
if (exists $pagesources{$page} &&
|
||||
grep { $_ eq $pagesources{$page} } @$needsbuild) {
|
||||
# remove state, it will be re-added
|
||||
# if the preprocessor directive is still
|
||||
# there during the rebuild
|
||||
|
|
|
@ -18,7 +18,8 @@ sub needsbuild (@) { #{{{
|
|||
if ($pagestate{$page}{version}{shown} ne $IkiWiki::version) {
|
||||
push @$needsbuild, $pagesources{$page};
|
||||
}
|
||||
if (grep { $_ eq $pagesources{$page} } @$needsbuild) {
|
||||
if (exists $pagesources{$page} &&
|
||||
grep { $_ eq $pagesources{$page} } @$needsbuild) {
|
||||
# remove state, will be re-added if
|
||||
# the version is still shown during the
|
||||
# rebuild
|
||||
|
|
Loading…
Reference in New Issue