Re: [pgadmin-hackers] dlgProperty patch

2004-08-25 Thread Dave Page
Thanks, patch applied.

Regards, Dave 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Darko Prenosil
 Sent: 24 August 2004 11:20
 To: pgadmin-hackers
 Subject: [pgadmin-hackers] dlgProperty patch
 
 
 When logged in as non-superuser, calling properties on 
 database crashes the application. Closer examination shows 
 that there are several bugs in dlgProperty.cpp, all connected 
 to securityPage object.
 Here is a patch. Please check and apply.
 
 Regards !
 

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


[pgadmin-hackers] dlgProperty patch

2004-08-24 Thread Darko Prenosil

When logged in as non-superuser, calling properties on database crashes the 
application. Closer examination shows that there are several bugs in 
dlgProperty.cpp, all connected to securityPage object.
Here is a patch. Please check and apply.

Regards !
*** dlgProperty.cpp.old	2004-08-24 11:51:37.0 +0200
--- dlgProperty.cpp	2004-08-24 12:11:43.0 +0200
***
*** 1143,1149 
  }
  }
  }
! }
  }
  
  
--- 1143,1150 
  }
  }
  }
! }else
! 	securityPage = NULL;
  }
  
  
***
*** 1155,1161 
  
  int dlgSecurityProperty::Go(bool modal)
  {
! securityPage-SetConnection(connection);
  
  return dlgProperty::Go(modal);
  }
--- 1156,1163 
  
  int dlgSecurityProperty::Go(bool modal)
  {
! if (securityPage)
! securityPage-SetConnection(connection);
  
  return dlgProperty::Go(modal);
  }
***
*** 1163,1169 
  
  void dlgSecurityProperty::AddGroups(ctlComboBox *comboBox)
  {
! if ((!securityPage || !securityPage-cbGroups)  !comboBox)
  return;
  
  pgSet *set=connection-ExecuteSet(wxT(SELECT groname FROM pg_group ORDER BY groname));
--- 1165,1171 
  
  void dlgSecurityProperty::AddGroups(ctlComboBox *comboBox)
  {
! if (!((securityPage  securityPage-cbGroups) || comboBox))
  return;
  
  pgSet *set=connection-ExecuteSet(wxT(SELECT groname FROM pg_group ORDER BY groname));
***
*** 1239,1245 
  
  wxString dlgSecurityProperty::GetGrant(const wxString allPattern, const wxString grantObject)
  {
! return securityPage-GetGrant(allPattern, grantObject, currentAcl);
  }
  
  
--- 1241,1250 
  
  wxString dlgSecurityProperty::GetGrant(const wxString allPattern, const wxString grantObject)
  {
! if (securityPage)
! return securityPage-GetGrant(allPattern, grantObject, currentAcl);
! else
! 	return wxString();
  }
  
  

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly