Support Forums | Demo Gallery [1.x] [2.x] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

Profiles disappearing?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    NukedGallery.net Forum Index » phpBB Integration » phpBB3 / Gallery 2 Integration View previous topicPrinter friendly versionView next topic
Author Message
jettyrat

Moderator
Moderator


Joined: Nov 28, 2005
Posts: 1144

PostPosted: Tue Jan 15, 2008 10:37 am    Post subject: Re: Profiles disappearing? Reply with quote

The above fix works, but throws an 'undefined index error' for users with no albums if you have all error reporting turned on. This is a better fix -

g2helper.inc, mapAllGalleryLinks function, replace this
Code: ›          list ($ret, $descendentCounts) = GalleryCoreApi::fetchDescendentCounts($itemIds, $entityId->getId());
         if ((count($descendentCounts) < 1) || (isset($ret) && $ret->getErrorCode() & ERROR_STORAGE_FAILURE)) {
            /*
            * User has no items to display!
            */
            $this->done();
            return NULL;
         }    
         elseif (isset($ret)) {
            msg_handler(E_G2_ERROR, sprintf($user->lang['G2_FETCHDESCENDCOUNTS_FAILED'], $entityId->getId()) . $user->lang['G2_ERROR'] . $ret->getAsHtml(), __FILE__, __LINE__);
         }

With this
Code: ›          if (sizeof($itemIds) == 0) {
            /*
            * User has no album items to display!
            */
            $this->done();
            return array(null, null);
         }
         else {
            list ($ret, $descendentCounts) = GalleryCoreApi::fetchDescendentCounts($itemIds, $entityId->getId());
            if (($descendentCounts[$itemIds[0]] < 1) || (isset($ret) && $ret->getErrorCode() & ERROR_STORAGE_FAILURE)) {
               /*
               * User has no descendent items to display!
               */
               $this->done();
               return array(null, null);
            }
            elseif (isset($ret)) {
               msg_handler(E_G2_ERROR, sprintf($user->lang['G2_FETCHDESCENDCOUNTS_FAILED'], $entityId->getId()) . $user->lang['G2_ERROR'] . $ret->getAsHtml(), __FILE__, __LINE__);
            }
         }
Back to top
Offline View user's profile Send private message
AdBot
   Post subject: Re: Profiles disappearing?  

Back to top
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » phpBB Integration » phpBB3 / Gallery 2 Integration View previous topicPrinter friendly versionView next topic
Goto page Previous  1, 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Dedicated ServersDomain NamesWeb HostingDomain Name RegistrationDedicated Web HostingWeb Design New YorkCompare VoIPseo packagesSEO CompanyNew York Yellow PagesFind LocationsVOIP Phone ServiceNeckermannOnline internetSEORestaurant Locator • Get great HP coupons from CouponSnapshot • Search for great dell coupons at CouponSnapshot.com.au • Graduation DressesAndroid TabletSEO IndiaBuy Phen375fuel filterWorld Meds Direct

8th year online! 2003-2011
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion WorksSourceForge.net Logo • Theme by TonicMedia