Maintaining your own branch of Drupal core
Upcoming SlideShare
Loading in...5
×
 

Maintaining your own branch of Drupal core

on

  • 7,159 views

Neil Drumm, the Drupal 5.x maintainer, talks about his experiences being a Drupal core maintainer. Includes how to do the main task, review patches.

Neil Drumm, the Drupal 5.x maintainer, talks about his experiences being a Drupal core maintainer. Includes how to do the main task, review patches.

Statistics

Views

Total Views
7,159
Views on SlideShare
7,159
Embed Views
0

Actions

Likes
0
Downloads
108
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Maintaining your own branch of Drupal core Maintaining your own branch of Drupal core Presentation Transcript

      • How to maintain your own
      • branch of Drupal core
      • Neil Drumm
      • 5.x branch maintainer
      • I am not actually going to tell you about branching Drupal. Do not do that.
      • This is about Drupal 5.x.
      • “Neil has quite a knack for detecting attempts to get cruft into Drupal.”
      • “Neil has been the co-founder and maintainer of CivicSpace, the first Drupal distribution.”
      • — Dries Buytaert
      • http://buytaert.net/neil-drumm
      • One rule:
      • Do not commit features
      • from coworkers
  •  
  •  
  •  
  •  
  • Patch reviews Collected 16/Sep/2007
  • Commits per week
  • Top reviewers 318 total Collected 16/Sep/2007 Number of issues changed from needs review or ready to commit
  • Top patch writers 830 total Collected 16/Sep/2007 Number of issues posting an attachment follow up
      • How to review a patch
  • Code style if (arg(0) == 'node' && arg(1) == 'add' && $type = arg(2)) { $type = node_get_types('type', str_replace('-', '_', arg(2))); - return '<p>'. filter_xss_admin($type->help) .'</p>'; + + if ( $help = filter_xss_admin($type->help) ) { + return '<p>'. $help .'</p>'; + } } } http://drupal.org/node/112140
  • Functionality
      • + if ($return_path && !ini_get('safe_mode')) {
      • + return mail(
      • + $to,
      • + mime_header_encode($subject),
      • + str_replace(&quot; &quot;, '', $body),
      • + join(&quot; &quot;, $mimeheaders),
      • + '-f'. $return_path
      • + );
      • + }
      • http://drupal.org/node/131737
  • Usability
      • // Output a list of queries executed
      • if (!empty($_SESSION['update_results'])) {
      • $output .= '<div id=&quot;update-results&quot;>';
      • - $output .= '<h2>The following queries were executed</h2>';
      • + $output .= '<h2> The following status messages were returned </h2>';
      • foreach ($_SESSION['update_results'] as $module => $updates) {
      • $output .= '<h3>'. $module .' module</h3>';
      • http://drupal.org/node/167610
  • Scalability $sql = 'SELECT DISTINCT u.uid, u.name, u.status, u.created, u.access FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid '. $filter['join'] .' WHERE u.uid != 0 '. $filter['where']; $sql .= tablesort_sql($header); - $result = pager_query($sql, 50, 0, NULL, $filter['args']); + $count_sql = 'SELECT COUNT(DISTINCT(u.uid)) FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid '. $filter['join'] .' WHERE u.uid != 0 '. $filter['where'] ; + $count_sql .= tablesort_sql($header); + + $result = pager_query($sql, 50, 0, $count_sql, $filter['args']); $form['options'] = array( '#type' => 'fieldset',
      • http://drupal.org/node/137754
  • Security $session_name = $cookie_domain; } else { + // If the site is using session.cookie_secure, use $base_url as + // session name. + if (ini_get('session.cookie_secure')) { + $session_name = $base_url; + } // Otherwise use $base_url as session name, without the protocol // to use the same session identifiers across http and https. - list( , $session_name) = explode('://', $base_url, 2); + else { + list( , $session_name) = explode('://', $base_url, 2); + } // We try to set the cookie domain to the hostname. // We escape the hostname because it can be modified by a visitor. if (!empty($_SERVER['HTTP_HOST'])) {
      • http://drupal.org/node/170310
  • How to review a patch
    • Code style Is it readable?
    • Functionality Does it work?
    • Usability Does it make sense?
    • Scalability Will it scale?
    • Security Is it secure?
    More at http://drupal.org/patch/review
      • Releases
      • 5.0
      • 5.1
      • 5.2
      • What I learned
      • It is impossible to fix everything
      • There will be another release
      • Someone will find the right solution for every issue
  •