Changeset 19711


Ignore:
Timestamp:
01/02/13 12:14:42 (7 years ago)
Author:
mistic100
Message:

now fetch the good data

Location:
extensions/instagram2piwigo
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • extensions/instagram2piwigo/admin/import.php

    r19561 r19711  
    100100      'profile_url' => 'http://instagram.com/'.$username, 
    101101      'logout_url' => INSTAG_ADMIN . '-import&action=logout', 
    102       'list_photos_url' => INSTAG_ADMIN . '-import&action=list_all', 
     102      'list_photos_url' => INSTAG_ADMIN . '-import&action=list_photos', 
    103103      )); 
    104104    break; 
     
    106106   
    107107  // list photos 
    108   case 'list_all': 
     108  case 'list_photos': 
    109109  { 
    110110    $self_url = INSTAG_ADMIN . '-import&action=list_photos'; 
     
    117117    else                         $page['display'] = 20; 
    118118     
    119     $all_photos = $current_user->getFeed(); 
     119    $all_photos = $current_user->getAllMedia(); 
    120120     
    121121    // get existing photos 
  • extensions/instagram2piwigo/admin/template/import.tpl

    r19561 r19711  
    3030 
    3131{* <!-- PHOTOS LIST --> *} 
    32 {elseif $ACTION == 'list_all'} 
    33 {include file=$INSTAG_ABS_PATH|@cat:'admin/template/import.list_all.tpl'} 
     32{elseif $ACTION == 'list_photos'} 
     33{include file=$INSTAG_ABS_PATH|@cat:'admin/template/import.list_photos.tpl'} 
    3434 
    3535{/if} 
  • extensions/instagram2piwigo/include/Instagram/User.php

    r19561 r19711  
    151151        return new Instagram_Collection_MediaCollection( $this->proxy->getUserMedia( $this->getApiId(), $params ), $this->proxy ); 
    152152    } 
     153     
     154    /** 
     155     * Get all user's media 
     156     * 
     157     * @return Instagram_Collection_MediaCollection 
     158     * @access public 
     159     */ 
     160    public function getAllMedia() { 
     161        $main = $this->getMedia(); 
     162        $next = $main->getNext(); 
     163         
     164        while ( $next !== null ) { 
     165            $temp = $this->getMedia( array('max_id' => $next) ); 
     166            $next = $temp->getNext(); 
     167            $main->addData( $temp ); 
     168        } 
     169         
     170        return $main; 
     171    } 
    153172 
    154173    /** 
Note: See TracChangeset for help on using the changeset viewer.