Home arrow Bugs
| Back |
Bugs: View Ticket
Publish status change not updating ExtCal
Submitted: 2006-03-16 06:32:43
Type: Bug
Status: Resolved
Submitted By: The Shadow (shadow42)
Assigned To: Samuel Suter (moensch)
Product: com_mls_events
Category: Backend
Version Reported: 0.1.1
Version Due: 0.1.2
Percent Complete: 100%
Severity: 3
Priority: 3
 
Description

When the published status of an Event is changed, the related ExtCal "approved" value is not updated.

Add the following code to "admin.mls_events.php::changeMLS_events" to resolve. :)

function changeMLS_events( $cid, $value, $type, $option ) {
    global
$database, $my, $cnf_mls_events;
    
$row = new mosMLS_events($database);
    
$query = "UPDATE `#__mls_events` SET `".$type."`='".$value."' WHERE `".$row->_tbl_key."` IN (".implode(",",$cid).")";
    
$database->setQuery($query);
    
$database->query();
    if(
$type == "active" && $value == 1) {
        
$query = "UPDATE `#__mls_events` SET `".$type."`='0' WHERE `".$row->_tbl_key."` NOT IN (".implode(",",$cid).")";
        
$database->setQuery($query);
        
$database->query();
    }
    if(
$type == "published") {
        foreach(
$cid as $id) {
            
$database->setQuery( "UPDATE `#__menu` SET `published`='".$value."' WHERE `menutype`='eventmenu' AND `link` LIKE '%eventid=".$id."%'" );
            
$database->query();
        }
        
//ExtCal 2 integration
        
if($cnf_mls_events["extcal_integration"]) {
            
//Integration is enabled...
            
switch($cnf_mls_events["extcal_approve_mode"]) {
            case
1:
                
// Always Approve Enabled
                
break;
            case
2:
                
$database->setQuery( "SELECT `extcal_id` FROM `#__mls_events` WHERE `id` IN (".implode(",",$cid).")" );
                
$events = $database->loadObjectList();
                foreach(
$events as $event) {
                    
$extids .= (!$extids)?$event->extcal_id:','.$event->extcal_id;
                }
                
$database->setQuery( "UPDATE `#__extcal_events` SET `approved`='".$value."' WHERE `extid` IN ($extids)" );
                
$database->query();
                break;
            }
        }
    }
    
mosRedirect( "index2.php?option=$option" );
}

/Andrew

 
Updated: 2006-03-18 18:35:13
UpdatedBy: Samuel Suter (admin)
Comments
Write Comment:
 
Audit
Time User Text Field Old Value New Value
Sat, 18. Mar 06 18:35:13 Samuel Suter (admin) Value changed description ... ...
Sat, 18. Mar 06 18:35:13 Samuel Suter (admin) Value changed percentComplete 90 100
Sat, 18. Mar 06 18:35:13 Samuel Suter (admin) Value changed statusid Waiting for new version Resolved
Sat, 18. Mar 06 18:35:13 Samuel Suter (admin) Value changed updated 2006-03-18 17:53:15 2006-03-18 18:35:13
Sat, 18. Mar 06 17:53:15 Samuel Suter (admin) Value changed description ... ...
Sat, 18. Mar 06 17:53:15 Samuel Suter (admin) Value changed updated 2006-03-18 17:37:48 2006-03-18 17:53:15
Sat, 18. Mar 06 17:37:48 Samuel Suter (admin) Value changed description ... ...
Sat, 18. Mar 06 17:37:48 Samuel Suter (admin) Value changed updated 2006-03-18 17:36:43 2006-03-18 17:37:48
Sat, 18. Mar 06 17:36:43 Samuel Suter (admin) Value changed description ... ...
Sat, 18. Mar 06 17:36:43 Samuel Suter (admin) Value changed updated 2006-03-18 17:35:33 2006-03-18 17:36:43
Sat, 18. Mar 06 17:35:33 Samuel Suter (admin) Value changed description ... ...
Sat, 18. Mar 06 17:35:33 Samuel Suter (admin) Value changed synopsis Publish status change not updating ExtCal "approved" value Publish status change not updating ExtCal
Sat, 18. Mar 06 17:35:33 Samuel Suter (admin) Value changed percentComplete 0 90
Sat, 18. Mar 06 17:35:33 Samuel Suter (admin) Value changed versionDue 0.1.2
Sat, 18. Mar 06 17:35:33 Samuel Suter (admin) Value changed statusid Submitted Waiting for new version
 
JoomBugs Bug Tracker for Joomla 0.1.0 (com_joombugs)
© 2006 Samuel Suter <samuel.suter@mylansite.org>
This is Free Software released under the GNU/GPL License.
© 2008 myLANsite - Lanparty components for Joomla
Joomla! is Free Software released under the GNU/GPL License.