public static function edit($section_id, array $settings)
    {
        $defaults = array();
        $defaults['modification_date'] = DateTimeObj::get('Y-m-d H:i:s');
        $defaults['modification_date_gmt'] = DateTimeObj::getGMT('Y-m-d H:i:s');
        $defaults['author_id'] = 1;
        $defaults['modification_author_id'] = 1;
        $settings = array_replace($defaults, $settings);
        if (!Symphony::Database()->update($settings, 'tbl_sections', sprintf(" `id` = %d", $section_id))) {
            return false;
        }

        return true;
    }
public static function edit($section_id, array $settings)
    {
        $defaults = array();
        $defaults['modification_date'] = DateTimeObj::get('Y-m-d H:i:s');
        $defaults['modification_date_gmt'] = DateTimeObj::getGMT('Y-m-d H:i:s');
        $defaults['author_id'] = 1;
        $defaults['modification_author_id'] = 1;
        $settings = array_replace($defaults, $settings);
        if (!Symphony::Database()->update($settings, 'tbl_sections', sprintf(" `id` = %d", $section_id))) {
            return false;
        }

        return true;
    }
public static function edit ( $ section_id , array $ settings ) { $ defaults = array ( ) ; $ defaults [ 'modification_date' ] = DateTimeObj :: get ( 'Y-m-d H:i:s' ) ; $ defaults [ 'modification_date_gmt' ] = DateTimeObj :: getGMT ( 'Y-m-d H:i:s' ) ; $ defaults [ 'author_id' ] = 1 ; $ defaults [ 'modification_author_id' ] = 1 ; $ settings = array_replace ( $ defaults , $ settings ) ; if ( ! Symphony :: Database ( ) -> update ( $ settings , 'tbl_sections' , sprintf ( " `id` = %d" , $ section_id ) ) ) { return false ; } return true ; }
Updates an existing Section given it's ID and an associative
array of settings. The array does not have to contain all the
settings for the Section as there is no deletion of settings
prior to updating the Section

@param integer $section_id
The ID of the Section to edit
@param array $settings
An associative of settings for a section with the key being
a column name from `tbl_sections`
@throws DatabaseException
@return boolean
Updates an existing Section given it s ID and an associative array of settings . The array does not have to contain all the settings for the Section as there is no deletion of settings prior to updating the Section