|
|
#1 |
![]() Join Date: Oct 2006
Posts: 22
![]() |
While fixing another problem, I found a minor bug that occurs when you create a new article from the front end AND every single user has sendEmail turned off (i.e. set to 0 in database).
In other words, if every single user in the database has sendEmail set to 0, there is an error at around line 1396 of content.php because $user is not checked for blank. To fix this minor bug, see the following code: Code:
if ( $isNew ) {
// messaging for new items
require_once( $mosConfig_absolute_path .'/components/com_messages/messages.class.php' );
$database->setQuery( "SELECT id FROM #__users WHERE sendEmail = '1'" );
$users = $database->loadResultArray();
if ($users) { //add this test HERE!
foreach ($users as $user_id) {
$msg = new mosMessage( $database );
$msg->send( $my->id, $user_id, T_("New Item"), sprintf( T_('A new content item has been submitted by [ %s ] titled [ %s ] from section [ %s ] and category [ %s ]'), $my->username, $row->title, $section, $category ) );
}
} //add this to close the if
}
Again, this only happens if nobody in the database has sendEmail set to 1 (i.e. everyone has it set to zero). Otherwise, you will never see this problem. |
|
|
|
|
#2 |
![]() Join Date: Jan 2006
Location: Windsor Ontario Canada
Posts: 1,324
![]() |
Wow thanks
This will be included in the MamboPro release. Thank you, Keith
__________________
http://www.gamingcombat.com - Gaming Combat Mambo templates, modules and components |
|
|
|
|
#3 |
![]() Join Date: Oct 2006
Posts: 22
![]() |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| custom form and users | Puntiq | General Questions | 6 | February 4th, 2005 17:52 |
| Users not displayed after adding from msas | shoffman11 | Administration Questions | 1 | January 13th, 2005 06:59 |
| Special Users ?? | ggouweloos | Administration Questions | 1 | March 31st, 2004 20:37 |
| Super Admin and Admin | lewisteo | Wishlist & Feature Requests | 22 | March 10th, 2004 23:24 |