File: patch.txt

package info (click to toggle)
opendb 0.81p18-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,716 kB
  • ctags: 6,787
  • sloc: php: 50,213; sql: 3,098; sh: 272; makefile: 54; xml: 48
file content (42 lines) | stat: -rw-r--r-- 1,358 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Patch facility
--------------

The patch facility has been provided to try and make it easier to
produce patches for OpenDb AND to make it easier for users to 
actually apply patches.

There are a few things that a patch creator must make sure of:

	The patch/????/index.php and called/included scripts must
	ensure that all links are $PHP_SELF links that include a
	from=$from as a url parameter, otherwise the script will
	not work if it takes more than one step to complete.
	Be sure to include a 
		// This is important for security reasons.
		if($CONFIG_VARS['patch.enable']===TRUE && $from)
		{
			... patch logic ...
		}

	around all patch functionality to ensure that the script cannot
	be called outside of the patch facility.

Setting the $CONFIG_VARS['patch.enable'] = FALSE will disable access to the
patch.php and install.php scripts.  This saves deleting them.

The patch.php will setup a frameset structure.  The menu will
be the first frame.  The frames will be evenly split 50/50.

Be sure to include a target=main for all links in the menu block.

Use op=result for all action operations.

Use op=main for all setup in the main block that will then result in a 
result action.

Use op=menu for the menu.

The index.php should expect at least $op=menu and else for the
setup of the data.

Take a look at the existing patches for assistance.