Changeset 973
- Timestamp:
- 08/20/08 08:45:00 (3 months ago)
- Files:
-
- trunk/CrossPoster/plugins/CrossPoster/config.yaml (modified) (1 diff)
- trunk/CrossPoster/plugins/CrossPoster/lib/CrossPoster/App/CMS.pm (modified) (4 diffs)
- trunk/CrossPoster/plugins/CrossPoster/lib/CrossPoster/Cache.pm (deleted)
- trunk/CrossPoster/plugins/CrossPoster/lib/CrossPoster/Connector/LiveJournal.pm (modified) (1 diff)
- trunk/CrossPoster/plugins/CrossPoster/lib/CrossPoster/Connector/MovableType.pm (modified) (1 diff)
- trunk/CrossPoster/plugins/CrossPoster/lib/CrossPoster/Connector/TypePad.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/CrossPoster/plugins/CrossPoster/config.yaml
r965 r973 12 12 crossposter_account: CrossPoster::Account 13 13 crossposter_cache: CrossPoster::Cache 14 entry: 15 crossposter_cache: vblob meta 14 16 15 17 crossposter_connectors: trunk/CrossPoster/plugins/CrossPoster/lib/CrossPoster/App/CMS.pm
r966 r973 121 121 122 122 my $blog_id = $app->param('blog_id'); 123 my $entry; 124 if(my $id = $app->param('id')) { 125 require MT::Entry; 126 $entry = MT::Entry->load($id); 127 } 123 128 124 129 # First populate all the accounts we have … … 135 140 next if !$connector; 136 141 137 if(my $id = $app->param('id')) { 138 require CrossPoster::Cache; 139 my $cache = CrossPoster::Cache->load({ account_id => $account->id, entry_id => $id, blog_id => $blog_id }); 140 $row->{is_selected} = $cache ? 1 : 0; 142 if($entry) { 143 my $cache = $entry->crossposter_cache || {}; 144 $row->{is_selected} = $cache->{$account->id} ? 1 : 0; 141 145 } 142 146 … … 205 209 $crossposter_field->innerHTML($innerHTML); 206 210 $tmpl->insertAfter($crossposter_field, $basename_field); 207 208 209 210 211 } 211 212 … … 217 218 foreach (@param) { 218 219 if (m/^crosspost_acct_(\d+)$/) { 219 _cross_post($ plugin, $cb, $app, $entry, $1);220 _cross_post($cb, $app, $entry, $1); 220 221 # my $res = MT::Util::start_background_task(sub { 221 222 # _cross_post($plugin, @_, $1); trunk/CrossPoster/plugins/CrossPoster/lib/CrossPoster/Connector/LiveJournal.pm
r938 r973 7 7 sub edit_uri { 8 8 my $self = shift; 9 my ($a pp, $account, $entry) = @_;9 my ($account, $entry) = @_; 10 10 11 require CrossPoster::Cache; 12 my $cache = CrossPoster::Cache->load({ entry_id => $entry->id, blog_id => $entry->blog_id, account_id => $account->id }); 11 my $cache = $entry->crossposter_cache || {}; 13 12 14 return '' if !$cache; 15 16 return $cache->response; 17 } 13 return $cache->{$account->id}; 14 } 18 15 19 16 sub post_uri { trunk/CrossPoster/plugins/CrossPoster/lib/CrossPoster/Connector/MovableType.pm
r966 r973 7 7 sub edit_uri { 8 8 my $self = shift; 9 my ($a pp, $account, $entry) = @_;9 my ($account, $entry) = @_; 10 10 11 require CrossPoster::Cache; 12 my $cache = CrossPoster::Cache->load({ entry_id => $entry->id, blog_id => $entry->blog_id, account_id => $account->id }); 11 my $cache = $entry->crossposter_cache || {}; 13 12 14 return '' if !$cache; 15 16 return $cache->response; 13 return $cache->{$account->id}; 17 14 } 18 15 trunk/CrossPoster/plugins/CrossPoster/lib/CrossPoster/Connector/TypePad.pm
r966 r973 9 9 sub edit_uri { 10 10 my $self = shift; 11 my ($a pp, $account, $entry) = @_;11 my ($account, $entry) = @_; 12 12 13 require CrossPoster::Cache; 14 my $cache = CrossPoster::Cache->load({ entry_id => $entry->id, blog_id => $entry->blog_id, account_id => $account->id }); 13 my $cache = $entry->crossposter_cache || {}; 15 14 16 return '' if !$cache; 17 18 return $cache->response; 19 } 15 return $cache->{$account->id}; 16 } 20 17 21 18 sub post_uri {
