Changeset 1256
- Timestamp:
- 2008-11-15 12:49:35 (2 months ago)
- Files:
-
- trunk/app/controllers/application.rb (modified) (2 diffs)
- trunk/lib/node_query.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app/controllers/application.rb
r1254 r1256 319 319 unless valid_template?(res, opts) 320 320 # problem during rendering, use default zafu 321 res = ZafuParser.new(default_zafu_template( opts[:mode]), :helper => skin_helper).render321 res = ZafuParser.new(default_zafu_template(mode), :helper => skin_helper).render 322 322 end 323 323 … … 916 916 load_models_from_plugins 917 917 load_patches_from_plugins 918 919 # this has to live here in order to be loaded after Application. 920 # FIXME: move this with 'node_query' into a plugins might be cleaner 921 # make sure there exists a link with NULL content and id == -1 (used in queries using query order sorting) 922 if l = Link.find_by_id(-1) 923 # do nothing 924 else 925 Link.connection.execute "INSERT INTO #{Link.table_name} (id,target_id,source_id,status,comment) VALUES (-1,NULL,NULL,NULL,NULL)" 926 end trunk/lib/node_query.rb
r1250 r1256 8 8 9 9 load_custom_queries File.join(File.dirname(__FILE__), 'custom_queries') 10 11 # make sure there exists a link with NULL content and id == -1 (used in queries using query order sorting)12 if l = Link.find_by_id(-1)13 # do nothing14 else15 Link.connection.execute "INSERT INTO #{Link.table_name} (id,target_id,source_id,status,comment) VALUES (-1,NULL,NULL,NULL,NULL)"16 end17 10 18 11 def initialize(query, opts = {})
