diff options
-rw-r--r-- | include/photos.php | 7 | ||||
-rw-r--r-- | mod/photos.php | 6 | ||||
-rwxr-xr-x | util/shred/ShredOAuth.sh (renamed from util/shred/FriendicaOAuth.sh) | 0 | ||||
-rwxr-xr-x | util/shred/shred | 16 |
4 files changed, 17 insertions, 12 deletions
diff --git a/include/photos.php b/include/photos.php index de4a9173a..9819c7ef2 100644 --- a/include/photos.php +++ b/include/photos.php @@ -277,6 +277,7 @@ function photos_albums_list($channel,$observer) { if($albums) { $ret['success'] = true; + $ret['albums'] = array(); foreach($albums as $k => $album) { $entry = array( 'text' => $album['album'], @@ -284,7 +285,7 @@ function photos_albums_list($channel,$observer) { 'url' => z_root() . '/photos/' . $channel['channel_address'] . '/album/' . bin2hex($album['album']), 'urlencode' => urlencode($album['album']), 'bin2hex' => bin2hex($album['album'])); - $ret[] = $entry; + $ret['albums'][] = $entry; } } return $ret; @@ -306,11 +307,11 @@ function photos_album_widget($channelx,$observer,$albums = null) { $albums = photos_albums_list($channelx,$observer); } - if($albums) { + if($albums['success']) { $o = replace_macros(get_markup_template('photo_albums.tpl'),array( '$nick' => $channelx['channel_address'], '$title' => t('Photo Albums'), - '$albums' => $albums, + '$albums' => $albums['albums'], '$baseurl' => z_root(), '$upload' => ((perm_is_allowed($channelx['channel_id'],(($observer) ? $observer['xchan_hash'] : ''),'post_photos')) ? t('Upload New Photos') : '') diff --git a/mod/photos.php b/mod/photos.php index a3ca933b1..8c168c21d 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -539,8 +539,8 @@ function photos_content(&$a) { $albumselect = '<select id="photos-upload-album-select" name="album" size="4">'; $albumselect .= '<option value="" ' . ((! $selname) ? ' selected="selected" ' : '') . '> </option>'; - if(count($albums)) { - foreach($albums as $album) { + if(count($albums['albums'])) { + foreach($albums['albums'] as $album) { if(! $album['text']) continue; $selected = (($selname === $album['text']) ? ' selected="selected" ' : ''); @@ -548,8 +548,6 @@ function photos_content(&$a) { } } - $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false); - $albumselect .= '</select>'; $uploader = ''; diff --git a/util/shred/FriendicaOAuth.sh b/util/shred/ShredOAuth.sh index 76858d73c..76858d73c 100755 --- a/util/shred/FriendicaOAuth.sh +++ b/util/shred/ShredOAuth.sh diff --git a/util/shred/shred b/util/shred/shred index 9af554032..2fd913d65 100755 --- a/util/shred/shred +++ b/util/shred/shred @@ -112,10 +112,14 @@ load_config () { # Source Config [[ -f "$FCLI_RC" ]] && . "$FCLI_RC" || show_config_help 1 + THISDIR=$(dirname $0) + if [ $THISDIR != '' ]; then THISDIR=. ; fi + PATH=$THISDIR:$PATH - # Source FriendicaOAuth.sh - OAuth_sh=$(which FriendicaOAuth.sh) - (( $? != 0 )) && echo 'Unable to locate FriendicaOAuth.sh! Make sure it is in searching PATH.' && exit 1 + + # Source ShredOAuth.sh + OAuth_sh=$(which ShredOAuth.sh) + (( $? != 0 )) && echo 'Unable to locate ShredOAuth.sh! Make sure it is in searching PATH.' && exit 1 source "$OAuth_sh" # Source JSON.sh @@ -213,7 +217,9 @@ main () { *) FO_command $fcli_command - JS_Parsed=$(echo "$FO_ret" | tokenize | parse) + echo $FO_ret + +# JS_Parsed=$(echo "$FO_ret" | tokenize | parse) # for a in ${JS_Parsed[@]}; do @@ -222,7 +228,7 @@ main () { # echo "$JS_Parsed" | js ${a} ${b} # done # else - echo "$JS_Parsed" +# echo "$JS_Parsed" # fi # done return $FO_rval |