Do a proper page/code split of project

dww - March 4, 2009 - 13:59
Project:Project
Version:6.x-1.x-dev
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Issue tags:6.x-1.0 blocker
Description

The *.inc files in project* are weirdly organized, and useless in terms of conditionally loading the code we need. Now that we're ported to D6 (and the dust has mostly settled), we can make use of the D6 menu system to do a proper page split into sane .inc files. I'd like to do this before the 6.x-1.0 release. It'd probably also solve #376377: Issue + organic group incompatibility.

#1

dww - March 17, 2009 - 20:36
Assigned to:Anonymous» dww
Status:active» needs review

Let's do this in phases. Here's phase 0: project_usage. The one slightly wonky thing is that I moved 111 LoC into includes/date_api.inc for the API functions for manipulating dates. These are shared by both the page callbacks from pages.inc and project-usage-process.php. Seems silly to leave those in project_usage.module itself, since 99.999% of page loads on d.o don't need them, but having project-usage-process pull in all of pages.inc seemed silly, too. Any objections?

FYI: I installed on d6.d.o and cleared the cache and all seems to be working fine:
http://d6.drupal.org/project/usage/drupal
http://d6.drupal.org/project/usage/345833
http://d6.drupal.org/admin/project/project-usage-settings

AttachmentSize
390856-1.project_usage_split.patch 69.1 KB

#2

drewish - March 17, 2009 - 20:45

project_usage_cache_time() seems like a good candidate for the date_api file.

is project_usage_project_page_link_alter() really split safe in usage/includes/pages.inc?

#3

dww - March 17, 2009 - 20:58

project_usage_cache_time() seems like a good candidate for the date_api file.

Sure, that works. ;)

is project_usage_project_page_link_alter() really split safe in usage/includes/pages.inc?

No, that was a bug. It was buried among theme functions and I missed it. It belongs in the .module file. Now moved.

I also noticed that this is probably going to break date_rounding.test, but that's already probably broken since it needs to be ported to 6.x-2.x simpletest, etc. So, I'm just going to leave that for #405312: Port date_rounding.test to 6.x-2.* series of SimpleTest

#4

dww - March 17, 2009 - 22:20

Whoops, forgot to upload the current patch with the fixes from #2 and #3.

AttachmentSize
390856-4.project_usage_split.patch 68.58 KB

#5

hunmonk - March 17, 2009 - 23:06
Status:needs review» reviewed & tested by the community

code split looks good. if it's been tested on d6.drupal.org, then it's ready to ship.

#6

dww - March 17, 2009 - 23:23
Title:Do a proper page/code split» Do a proper page/code split of project
Assigned to:dww» Anonymous
Status:reviewed & tested by the community» active

Committed to HEAD. Back to active for:
project
project_release
project_solr

project_issue lives at #405478: Do a proper page/code split of project_issue
cvs.module lives at #405484: Do a proper page/code split of cvs.module

#7

dww - March 22, 2009 - 23:12
Category:task» bug report

#408102: Call to undefined function project_project_nodeapi marked duplicate. Calling the current situation a bug given issues like this.

#8

Subcomandante - March 31, 2009 - 16:50

I have the same problem when I have another module http://drupal.org/project/menu_breadcrumb enabled.

It will be solved soon?

tnx

#9

fuzzy_texan - April 23, 2009 - 02:03

#10

mrfelton - May 5, 2009 - 22:42

@Subcomandante : see #454682: Issues with project and menu_breadcrumb integration. for more information on the menu_breadcrumb issue.

#11

dww - June 22, 2009 - 05:48

Recently while on a plane, I did some work on a proper page split of project_release. Since it was so similar to what I did at #405478: Do a proper page/code split of project_issue I didn't bother posting these for review, I just committed:

http://drupal.org/cvs?commit=228132
http://drupal.org/cvs?commit=228134
http://drupal.org/cvs?commit=228138
http://drupal.org/cvs?commit=228140
http://drupal.org/cvs?commit=228142

Still more to do on this, but it's getting better...

#12

Subcomandante - June 23, 2009 - 08:35

After I reinstalled latest drupal + project + project issue, menu_breadcrumb seems working now.

 
 

Drupal is a registered trademark of Dries Buytaert.