| 2226 | | # if ($at eq 'Individual') { |
|---|
| 2227 | | # require MT::TemplateMap; |
|---|
| 2228 | | # my $map = MT::TemplateMap->load($fi->templatemap_id); |
|---|
| 2229 | | # # Individual archive pages that are the 'permalink' pages should |
|---|
| 2230 | | # # have highest build priority. |
|---|
| 2231 | | # if ($map && $map->is_preferred) { |
|---|
| 2232 | | # $rqf->priority(1); |
|---|
| 2233 | | # } else { |
|---|
| 2234 | | # $rqf->priority(9); |
|---|
| 2235 | | # } |
|---|
| 2236 | | # } elsif ($at eq 'index') { |
|---|
| 2237 | | # # Index pages are second in priority, if they are named 'index' |
|---|
| 2238 | | # # or 'default' |
|---|
| 2239 | | # if ($fi->file_path =~ m!/(index|default|atom|feed)!i) { |
|---|
| 2240 | | # $rqf->priority(3); |
|---|
| 2241 | | # } else { |
|---|
| 2242 | | # $rqf->priority(9); |
|---|
| 2243 | | # } |
|---|
| 2244 | | # } elsif (($at eq 'Monthly') || ($at eq 'Weekly') || ($at eq 'Daily')) { |
|---|
| 2245 | | # $rqf->priority(5); |
|---|
| 2246 | | # } elsif ($at eq 'Category') { |
|---|
| 2247 | | # $rqf->priority(7); |
|---|
| 2248 | | # } |
|---|
| 2249 | | # |
|---|
| 2250 | | # $rqf->save; |
|---|
| | 2226 | if ($at eq 'Individual') { |
|---|
| | 2227 | require MT::TemplateMap; |
|---|
| | 2228 | my $map = MT::TemplateMap->load($fi->templatemap_id); |
|---|
| | 2229 | # Individual archive pages that are the 'permalink' pages should |
|---|
| | 2230 | # have highest build priority. |
|---|
| | 2231 | if ($map && $map->is_preferred) { |
|---|
| | 2232 | $priority = 10; |
|---|
| | 2233 | } else { |
|---|
| | 2234 | $priority = 5; |
|---|
| | 2235 | } |
|---|
| | 2236 | } elsif ($at eq 'index') { |
|---|
| | 2237 | # Index pages are second in priority, if they are named 'index' |
|---|
| | 2238 | # or 'default' |
|---|
| | 2239 | if ($fi->file_path =~ m!/(index|default|atom|feed)!i) { |
|---|
| | 2240 | $priority = 9; |
|---|
| | 2241 | } else { |
|---|
| | 2242 | $priority = 3; |
|---|
| | 2243 | } |
|---|
| | 2244 | } elsif ($at =~ m/Category/) { |
|---|
| | 2245 | $priority = 1; |
|---|
| | 2246 | } elsif ($at =~ m/Monthly|Weekly|Daily/) { |
|---|
| | 2247 | $priority = 2; |
|---|
| | 2248 | } |
|---|
| | 2249 | |
|---|
| | 2250 | $job->priority( $priority ); |
|---|
| | 2251 | $job->coalesce( ( $fi->blog_id || 0 ) . ':' . $$ . ':' . ( time - ( time % 10 ) ) ); |
|---|