Changeset 2530
- Timestamp:
- 06/09/08 09:13:14 (20 months ago)
- Location:
- branches/release-39
- Files:
-
- 5 modified
-
lib/MT/Object.pm (modified) (1 diff)
-
lib/MT/Template/ContextHandlers.pm (modified) (1 diff)
-
lib/MT/Util.pm (modified) (1 diff)
-
t/35-tags.dat (modified) (5 diffs)
-
t/lib/MT/Test.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-39/lib/MT/Object.pm
r2500 r2530 1238 1238 my $obj = shift; 1239 1239 my $oc = MT->request('object_cache') or return; 1240 1241 my $pk = $obj->primary_key; 1242 $pk = join ":", @$pk if ref $pk; 1243 my $key = ref($obj). ':' . $pk; 1244 1240 1245 if (@_) { 1241 $oc = $oc->{ "$obj"};1246 $oc = $oc->{$key}; 1242 1247 delete $oc->{shift} if $oc; 1243 1248 } else { 1244 delete $oc->{"$obj"}; 1245 } 1249 delete $oc->{$key}; 1250 } 1251 1; 1246 1252 } 1247 1253 -
branches/release-39/lib/MT/Template/ContextHandlers.pm
r2496 r2530 10037 10037 if ($args->{lastn} || $args->{offset}) { 10038 10038 $args{'direction'} = 'descend'; 10039 $so = 'descend'; 10039 10040 } else { 10040 10041 $args{'direction'} = 'ascend'; -
branches/release-39/lib/MT/Util.pm
r2317 r2530 923 923 sub make_unique_basename { 924 924 my ($entry) = @_; 925 my $blog = $entry->blog;925 my $blog = MT::Blog->load($entry->blog_id); 926 926 my $title = $entry->title; 927 927 $title = '' if !defined $title; -
branches/release-39/t/35-tags.dat
r2518 r2530 163 163 { "r" : "1", "t" : "<MTComments lastn=\"1\"><MTCommentEntryID></MTComments>", "e" : "5"}, #112 164 164 { "r" : "1", "t" : "<MTComments lastn=\"1\"><MTCommentIP></MTComments>", "e" : "127.0.0.1"}, #113 165 { "r" : "1", "t" : "<MTComments lastn=\"3\" glue=\",\"><MTCommentAuthorLink></MTComments>", "e" : "John Doe,Comment 3,<a title=\"http://chuckd.com/\" href=\"http://localhost/cgi-bin/mt-comments.cgi?__mode=red;id=14\">Chucky Dee</a>"}, #114165 { "r" : "1", "t" : "<MTComments lastn=\"3\"><MTCommentAuthorLink>,</MTComments>", "e" : "John Doe,Comment 3,<a title=\"http://chuckd.com/\" href=\"http://chuckd.com/\">Chucky Dee</a>,"}, #114 166 166 { "r" : "1", "t" : "<MTComments lastn=\"1\"><MTCommentEmail></MTComments>", "e" : "johnd@doe.com"}, #115 167 { "r" : "1", "t" : "<MTComments lastn=\"1\"><MTCommentAuthorIdentity></MTComments>", "e" : "<img alt=\"Author Profile Page\" src=\" /cgi-bin/mt-static/images/comment/typekey_logo.png\" width=\"16\" height=\"16\" />"}, #116167 { "r" : "1", "t" : "<MTComments lastn=\"1\"><MTCommentAuthorIdentity></MTComments>", "e" : "<img alt=\"Author Profile Page\" src=\"http://localhost/mt-static/images/comment/typekey_logo.png\" width=\"16\" height=\"16\" />"}, #116 168 168 { "r" : "1", "t" : "<MTComments lastn=\"1\"><MTCommentURL></MTComments>", "e" : "http://john.doe.com/"}, #117 169 169 { "r" : "1", "t" : "<MTComments lastn=\"1\"><MTCommentOrderNumber></MTComments>", "e" : "1"}, #118 … … 253 253 { "r" : "1", "t" : "<MTEntries lastn=\"1\" offset=\"3\"><MTIfCategory name=\"foo\">in category</MTIfCategory></MTEntries>", "e" : "in category"}, #201 254 254 { "r" : "1", "t" : "", "e" : ""}, #202 255 { "r" : "1", "t" : "<MTIndexList><MTIndexName>-<MTIndexLink>-<MTIndexBasename>;</MTIndexList>", "e" : "Archive Index-http://narnia.na/nana/archives.html-index; Atom-http://narnia.na/nana/atom.xml-index;JavaScript-http://narnia.na/nana/mt.js-index;Main Index-http://narnia.na/nana/-index;RSD-http://narnia.na/nana/rsd.xml-index;RSS-http://narnia.na/nana/rss.xml-index;Stylesheet-http://narnia.na/nana/styles.css-index;"}, #203255 { "r" : "1", "t" : "<MTIndexList><MTIndexName>-<MTIndexLink>-<MTIndexBasename>;</MTIndexList>", "e" : "Archive Index-http://narnia.na/nana/archives.html-index;Feed - Recent Entries-http://narnia.na/nana/atom.xml-index;JavaScript-http://narnia.na/nana/mt.js-index;Main Index-http://narnia.na/nana/-index;RSD-http://narnia.na/nana/rsd.xml-index;Stylesheet-http://narnia.na/nana/styles.css-index;"}, #203 256 256 { "r" : "1", "t" : "<MTIfNeedEmail>email needed</MTIfNeedEmail>", "e" : ""}, #204 257 257 { "r" : "1", "t" : "<MTIfAllowCommentHTML>comment html allowed</MTIfAllowCommentHTML>", "e" : "comment html allowed"}, #205 … … 273 273 { "r" : "1", "t" : "<MTArchiveList archive_type='Daily'><MTArchiveDateEnd></MTArchiveList>", "e" : "January 31, 1978 11:59 PMJanuary 31, 1965 11:59 PMJanuary 31, 1964 11:59 PMJanuary 31, 1963 11:59 PMJanuary 31, 1962 11:59 PMJanuary 31, 1961 11:59 PM"}, #221 274 274 { "r" : "1", "t" : "<MTArchiveList archive_type='Weekly'><MTArchiveDateEnd></MTArchiveList>", "e" : "February 4, 1978 11:59 PMFebruary 6, 1965 11:59 PMFebruary 1, 1964 11:59 PMFebruary 2, 1963 11:59 PMFebruary 3, 1962 11:59 PMFebruary 4, 1961 11:59 PM"}, #222 275 { "r" : "1", "t" : "<MTComments lastn='3'><MTFeedbackScore>,</MTComments>", "e" : " 0,0,1.5,"}, #223276 { "r" : "1", "t" : "<MTComments lastn='3'>,<MTIfNonEmpty tag='CommenterName'><MTCommenterName>: <MTCommenterIfTrusted>trusted<MTElse>untrusted</MTElse></MTCommenterIfTrusted><MTElse><MTCommentAuthor></MTIfNonEmpty></MTComments>", "e" : ", Chucky Dee: trusted,Comment 3,John Doe: trusted"}, #224275 { "r" : "1", "t" : "<MTComments lastn='3'><MTFeedbackScore>,</MTComments>", "e" : "1.5,0,0,"}, #223 276 { "r" : "1", "t" : "<MTComments lastn='3'>,<MTIfNonEmpty tag='CommenterName'><MTCommenterName>: <MTCommenterIfTrusted>trusted<MTElse>untrusted</MTElse></MTCommenterIfTrusted><MTElse><MTCommentAuthor></MTIfNonEmpty></MTComments>", "e" : ",John Doe: trusted,Comment 3,Chucky Dee: trusted"}, #224 277 277 { "r" : "1", "t" : "<MTTags glue=','><MTTagName> <MTTagRank></MTTags>", "e" : "anemones 4,grandpa 6,rain 2,strolling 6,verse 1"}, #225 278 278 { "r" : "1", "t" : "<MTEntries tag='grandpa' lastn='1'><MTEntryTags glue=','><MTTagRank></MTEntryTags></MTEntries>", "e" : "6,2,6"}, #226 … … 406 406 { "r" : "1", "t" : "<MTAuthors sort_by='display_name' sort_order='descend'><MTAuthorID>;</MTAuthors>", "e" : "3;2;"}, #354 407 407 { "r" : "1", "t" : "<MTArchives><MTArchiveLabel></MTArchives>", "e" : "EntryMonthlyWeeklyDailyCategoryPage"}, #355 408 { "r" : "1", "t" : "<MTEntries><$MTEntryID$>:<MTComments><MTIfCommenterIsAuthor><MTIfCommenterIsEntryAuthor>2<MTElse>1</MTIfCommenterIsEntryAuthor><MTElse>0</MTIfCommenterIsAuthor>;</MTComments></MTEntries>", "e" : "1:0;0;0;8:0;7:6: 2;1;0;5:0;4:"}, #356408 { "r" : "1", "t" : "<MTEntries><$MTEntryID$>:<MTComments><MTIfCommenterIsAuthor><MTIfCommenterIsEntryAuthor>2<MTElse>1</MTIfCommenterIsEntryAuthor><MTElse>0</MTIfCommenterIsAuthor>;</MTComments></MTEntries>", "e" : "1:0;0;0;8:0;7:6:1;2;0;5:0;4:"}, #356 409 409 { "r" : "1", "t" : "<MTPages id='20'><$MTPageMore$></MTPages>", "e" : "<p>I don't have much to say,</p>"}, #357 410 410 { "r" : "1", "t" : "<MTAssets lastn='1'><$MTAssetlabel$></MTAssets>", "e" : "Image photo"}, #358 … … 412 412 { "r" : "1", "t" : "<MTPages id='20'><MTPageAssets><$MTAssetID$></MTPageAssets></MTPages>", "e" : "2"}, #360 413 413 { "r" : "1", "t" : "<MTAuthors><$MTAuthorAuthType$>:<$MTAuthorAuthIconURL$>;</MTAuthors>", "e" : "MT:http://localhost/mt-static/images/comment/mt_logo.png;MT:http://localhost/mt-static/images/comment/mt_logo.png;"}, #361 414 { "r" : "1", "t" : "<MTComments><$MTCommenterAuthType$>:<$MTCommenterAuthIconURL$>;</MTComments>", "e" : ":;:;:;:; MT:http://localhost/mt-static/images/comment/mt_logo.png;MT:http://localhost/mt-static/images/comment/mt_logo.png;:;TypeKey:http://localhost/mt-static/images/comment/typekey_logo.png;:;"}, #362414 { "r" : "1", "t" : "<MTComments><$MTCommenterAuthType$>:<$MTCommenterAuthIconURL$>;</MTComments>", "e" : ":;:;:;:;:;MT:http://localhost/mt-static/images/comment/mt_logo.png;MT:http://localhost/mt-static/images/comment/mt_logo.png;:;TypeKey:http://localhost/mt-static/images/comment/typekey_logo.png;"}, #362 415 415 { "r" : "1", "t" : "<MTAuthors sort_by='id' need_entry='0' ><MTAuthorName>;</MTAuthors>", "e" : "Melody;Chuck D;Bob D;"}, #363 416 416 { "r" : "1", "t" : "<MTAuthors sort_by='id' need_entry='0' status='disabled'><MTAuthorName>;</MTAuthors>", "e" : "Hiro Nakamura;"}, #364 -
branches/release-39/t/lib/MT/Test.pm
r2451 r2530 200 200 $blog->commenter_authenticators('enabled_TypeKey'); 201 201 $blog->save() or die "Couldn't save blog 1: ". $blog->errstr; 202 MT::ObjectDriver::Driver::Cache::RAM->clear_cache(); 202 203 diag "Saved blog"; 203 204 … … 316 317 diag "Saved entry #1"; 317 318 } 319 $entry->clear_cache(); 318 320 319 321 $entry = MT::Entry->load(2); … … 337 339 diag "Saved entry #2"; 338 340 } 341 $entry->clear_cache(); 339 342 340 343 $entry = MT::Entry->load(3); … … 360 363 diag "Saved entry #3"; 361 364 } 365 $entry->clear_cache(); 362 366 363 367 require MT::Trackback;
