phpbbproject-svn Mailing List for phpBB Project (Page 2)
phpBB download manager, mainly aimed at MOD authors
Status: Planning
Brought to you by:
lord_le_brand
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
(13) |
May
(6) |
Jun
|
Jul
(7) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(19) |
Nov
|
Dec
|
From: <lor...@us...> - 2008-10-22 12:24:30
|
Revision: 293 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=293&view=rev Author: lord_le_brand Date: 2008-10-22 12:24:22 +0000 (Wed, 22 Oct 2008) Log Message: ----------- woops! these were supposed to be commited long time ago! Modified Paths: -------------- trunk/phpbb3/root/includes/project/project_main.php trunk/phpbb3/root/includes/project/project_project.php trunk/phpbb3/root/includes/sources_project/download_project.php Modified: trunk/phpbb3/root/includes/project/project_main.php =================================================================== --- trunk/phpbb3/root/includes/project/project_main.php 2008-08-07 17:53:32 UTC (rev 292) +++ trunk/phpbb3/root/includes/project/project_main.php 2008-10-22 12:24:22 UTC (rev 293) @@ -214,7 +214,7 @@ { $start = request_var('start', 0); - $default_key = 'lu'; + $default_key = 'update'; $sort_key = request_var('sk', $default_key); $sort_dir = request_var('sd', 'd'); @@ -225,13 +225,13 @@ } $sort_by_sql = array( - 'lu' => 'project_last_update', - 'pt' => 'project_title', - 'st' => 'project_start_time', - 'it' => 'project_install_time', - 'dl' => 'project_downloads', - 'ds' => 'project_stage', - 'lv' => 'project_level', + 'update' => 'project_last_update', + 'title' => 'project_title', + 'stime' => 'project_start_time', + 'itime' => 'project_install_time', + 'downloads' => 'project_downloads', + 'stage' => 'project_stage', + 'ilevel' => 'project_level', ); if (!isset($sort_by_sql[$sort_key])) @@ -502,4 +502,5 @@ 'U_ACTION' => $this->u_action, )); } -} \ No newline at end of file +} +?> \ No newline at end of file Modified: trunk/phpbb3/root/includes/project/project_project.php =================================================================== --- trunk/phpbb3/root/includes/project/project_project.php 2008-08-07 17:53:32 UTC (rev 292) +++ trunk/phpbb3/root/includes/project/project_project.php 2008-10-22 12:24:22 UTC (rev 293) @@ -99,7 +99,8 @@ WHERE pa.project_id = $project_id AND a.author_id = pa.author_id AND r.role_id = pa.author_role - AND u.user_id = pa.author_id"; + AND u.user_id = pa.author_id + ORDER BY pa.author_order ASC"; $db->sql_query($sql); $authors = $db->sql_fetchrowset(); Modified: trunk/phpbb3/root/includes/sources_project/download_project.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/download_project.php 2008-08-07 17:53:32 UTC (rev 292) +++ trunk/phpbb3/root/includes/sources_project/download_project.php 2008-10-22 12:24:22 UTC (rev 293) @@ -189,24 +189,15 @@ $author_ids = array(); - $sql = 'SELECT * - FROM ' . PROJECT_PROJECT_AUTHORS_TABLE . " - WHERE project_id = $this->project_id"; + $sql = 'SELECT a.*, pa.* + FROM ' . PROJECT_AUTHORS_TABLE . ' a, ' . PROJECT_PROJECT_AUTHORS_TABLE . " pa + WHERE pa.project_id = $this->project_id + AND a.author_id = pa.author_id + ORDER BY author_order ASC"; $result = $db->sql_query($sql, 604800); while ($row = $db->sql_fetchrow($result)) { - $author_ids[] = $row['author_id']; - } - $db->sql_freeresult($result); - - $sql = 'SELECT * - FROM ' . PROJECT_AUTHORS_TABLE . ' - WHERE ' . $db->sql_in_set('author_id', $author_ids); - - $result = $db->sql_query($sql, 604800); - while ($row = $db->sql_fetchrow($result)) - { $this->mod_authors[] = array( 'username' => $row['author_username'], 'email' => $row['author_email'], @@ -244,11 +235,11 @@ foreach ($mod_history as $entry) { $this->mod_history[] = array( - 'time' => gmdate('Y-m-d', $entry['version_time']), - 'version' => "{$entry['version_major']}.{$entry['version_minor']}.{$entry['version_revision']}{$entry['version_release']}", - 'version_p' => array($entry['version_major'], $entry['version_minor'], $entry['version_revision'], $entry['version_release']), - 'stage' => ($entry['version_stage']) ? $stages_ary[$entry['version_stage']] : false, - 'changelog' => $entry['version_changelog'], + 'time' => gmdate('Y-m-d', $entry['version_time']), + 'version' => "{$entry['version_major']}.{$entry['version_minor']}.{$entry['version_revision']}{$entry['version_release']}", + 'version_ary' => array($entry['version_major'], $entry['version_minor'], $entry['version_revision'], $entry['version_release']), + 'stage' => ($entry['version_stage']) ? $stages_ary[$entry['version_stage']] : false, + 'changelog' => $entry['version_changelog'], ); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-08-07 17:53:23
|
Revision: 292 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=292&view=rev Author: lord_le_brand Date: 2008-08-07 17:53:32 +0000 (Thu, 07 Aug 2008) Log Message: ----------- Update to project_create class. (table layout) Modified Paths: -------------- trunk/phpbb3/root/includes/sources_project/create_project.php Modified: trunk/phpbb3/root/includes/sources_project/create_project.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/create_project.php 2008-08-05 14:28:09 UTC (rev 291) +++ trunk/phpbb3/root/includes/sources_project/create_project.php 2008-08-07 17:53:32 UTC (rev 292) @@ -74,7 +74,6 @@ 'project_version' => '0.0.0', 'project_start_time' => $this->current_time, 'project_last_update' => $this->current_time, - 'project_owner' => $user->data['user_id'], 'project_status' => ($config['project_approve_creation']) ? PROJECT_STATUS_UNAPPROVED : PROJECT_STATUS_APPROVED, 'project_downloads' => 0, )); @@ -96,16 +95,6 @@ $this->data['project_id'] = $project_id = $db->sql_nextid(); - // Add all authors - for ($i = 0, $size = sizeof($this->authors); $i < $size; $i++) - { - $db->sql_query('INSERT INTO ' . PROJECT_PROJECT_AUTHORS_TABLE . $db->sql_build_array('INSERT', array( - 'project_id' => $project_id, - 'author_id' => $this->authors[$i]['author_id'], - 'author_role' => $this->authors[$i]['author_role'] - ))); - } - // Add the version entry $db->sql_query('INSERT INTO ' . PROJECT_VERSIONS_TABLE . $db->sql_build_array('INSERT', array( 'project_id' => $project_id, @@ -119,6 +108,20 @@ 'version_changelog' => '', ))); + $version_id = $db->sql_nextid(); + + // Add all authors + for ($i = 0, $size = sizeof($this->authors); $i < $size; $i++) + { + $db->sql_query('INSERT INTO ' . PROJECT_PROJECT_AUTHORS_TABLE . $db->sql_build_array('INSERT', array( + 'project_id' => $project_id, + 'author_id' => $this->authors[$i]['author_id'], + 'author_order' => $this->authors[$i]['author_order'], + 'is_owner' => $this->authors[$i]['is_owner'], + 'version_from' => $version_id, + ))); + } + // Update project count for category $sql = 'UPDATE ' . PROJECT_CATEGORIES_TABLE . " SET category_projects = category_projects + 1, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-08-05 14:28:05
|
Revision: 291 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=291&view=rev Author: lord_le_brand Date: 2008-08-05 14:28:09 +0000 (Tue, 05 Aug 2008) Log Message: ----------- Forgot to update these... Modified Paths: -------------- trunk/phpbb3/root/includes/project/project_main.php trunk/phpbb3/root/includes/sources_project/import_project.php Modified: trunk/phpbb3/root/includes/project/project_main.php =================================================================== --- trunk/phpbb3/root/includes/project/project_main.php 2008-08-05 13:49:14 UTC (rev 290) +++ trunk/phpbb3/root/includes/project/project_main.php 2008-08-05 14:28:09 UTC (rev 291) @@ -72,12 +72,8 @@ // If top ten should be displayed, do so if ($config['project_display_top_ten']) { - /** - * @todo when auth extended, rewrite $acl_projects = array_keys($auth->acl_getf('p_view_project', true)); $project_ids = $db->sql_in_set('project_id', $acl_projects, false, true); - */ - $project_ids = '1 = 1'; $optional_fields = ($config['project_autopost_enable']) ? ', topic_id' : ''; @@ -137,13 +133,8 @@ if (($mode == 'viewcat' && $category_info['right_id'] != ($category_info['left_id'] + 1)) || $mode != 'viewcat') { // There are categories here, so display them - $acl_categories = array(); - $category_ids = '1 = 1'; - /** - * @todo when auth extended, rewrite $acl_categories = array_keys($auth->acl_getf('p_view_category', true)); $category_ids = $db->sql_in_set('category_id', $acl_categories, false, true); - */ $sql = 'SELECT * FROM ' . PROJECT_CATEGORIES_TABLE . " @@ -250,12 +241,8 @@ $sql_sort_order = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'); - /** - * @todo when auth extended, rewrite $acl_projects = array_keys($auth->acl_getf('p_view_project', true)); $project_ids = $db->sql_in_set('project_id', $acl_projects, false, true); - */ - $project_ids = '1 = 1'; $sql = "SELECT project_id, topic_id, project_title, project_description, project_level, project_install_time, project_target_version, project_version, project_stage, project_start_time, project_owner, project_last_update, project_downloads FROM " . PROJECT_PROJECTS_TABLE . " @@ -449,12 +436,8 @@ )); } - /** - * @todo when auth extended, rewrite $acl_categories = array_keys($auth->acl_getf('p_view_category', true)); $category_ids = $db->sql_in_set('category_id', $acl_categories, false, true); - */ - $category_ids = '1 = 1'; $sql = 'SELECT category_id, category_title, parent_id FROM ' . PROJECT_CATEGORIES_TABLE . " Modified: trunk/phpbb3/root/includes/sources_project/import_project.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/import_project.php 2008-08-05 13:49:14 UTC (rev 290) +++ trunk/phpbb3/root/includes/sources_project/import_project.php 2008-08-05 14:28:09 UTC (rev 291) @@ -298,7 +298,7 @@ * Constructor * * @param string $input - * @todo make it work with /languages and /templates folders + * @todo make it work with <link> */ public function __construct($input) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-08-05 13:49:06
|
Revision: 290 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=290&view=rev Author: lord_le_brand Date: 2008-08-05 13:49:14 +0000 (Tue, 05 Aug 2008) Log Message: ----------- GMT times Modified Paths: -------------- trunk/phpbb3/root/includes/sources_project/create_project.php trunk/phpbb3/root/includes/sources_project/download_project.php trunk/phpbb3/root/includes/sources_project/functions_create.php trunk/phpbb3/root/project_install/install_install.php Modified: trunk/phpbb3/root/includes/sources_project/create_project.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/create_project.php 2008-08-02 18:14:00 UTC (rev 289) +++ trunk/phpbb3/root/includes/sources_project/create_project.php 2008-08-05 13:49:14 UTC (rev 290) @@ -39,8 +39,6 @@ { global $auth, $user; - /** - * @todo Rewrite this when auth class is extended if (!$auth->acl_get('p_add_project')) { $this->error = $user->lang['PROJECT_NOT_AUTH_CREATE']; @@ -51,10 +49,9 @@ $this->error = $user->lang['PROJECT_NOT_AUTH_CAT']; return; } - */ // Time & date of project creation - $this->current_time = time(); + $this->current_time = gmmktime(0, 0, 0); $this->authors = $authors; $this->set_data($data); Modified: trunk/phpbb3/root/includes/sources_project/download_project.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/download_project.php 2008-08-02 18:14:00 UTC (rev 289) +++ trunk/phpbb3/root/includes/sources_project/download_project.php 2008-08-05 13:49:14 UTC (rev 290) @@ -244,7 +244,7 @@ foreach ($mod_history as $entry) { $this->mod_history[] = array( - 'time' => date('Y-m-d', $entry['version_time']), + 'time' => gmdate('Y-m-d', $entry['version_time']), 'version' => "{$entry['version_major']}.{$entry['version_minor']}.{$entry['version_revision']}{$entry['version_release']}", 'version_p' => array($entry['version_major'], $entry['version_minor'], $entry['version_revision'], $entry['version_release']), 'stage' => ($entry['version_stage']) ? $stages_ary[$entry['version_stage']] : false, Modified: trunk/phpbb3/root/includes/sources_project/functions_create.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/functions_create.php 2008-08-02 18:14:00 UTC (rev 289) +++ trunk/phpbb3/root/includes/sources_project/functions_create.php 2008-08-05 13:49:14 UTC (rev 290) @@ -246,7 +246,7 @@ for ($i = 0, $size = sizeof($history); $i < $size; $i++) { $post_tpl->assign_block_vars('history', array( - 'DATE' => date('Y-m-d', $history[$i]['version_time']), + 'DATE' => gmdate('Y-m-d', $history[$i]['version_time']), 'VERSION' => "{$history[$i]['version_major']}.{$history[$i]['version_minor']}.{$history[$i]['version_revision']}{$history[$i]['version_release']}", 'CHANGELOG' => $history[$i]['version_changelog'], @@ -325,7 +325,7 @@ for ($i = 0, $size = sizeof($history); $i < $size; $i++) { $post_tpl->assign_block_vars('history', array( - 'DATE' => date('Y-m-d', $history[$i]['version_time']), + 'DATE' => gmdate('Y-m-d', $history[$i]['version_time']), 'VERSION' => "{$history[$i]['version_major']}.{$history[$i]['version_minor']}.{$history[$i]['version_revision']}{$history[$i]['version_release']}", 'CHANGELOG' => $history[$i]['version_changelog'], Modified: trunk/phpbb3/root/project_install/install_install.php =================================================================== --- trunk/phpbb3/root/project_install/install_install.php 2008-08-02 18:14:00 UTC (rev 289) +++ trunk/phpbb3/root/project_install/install_install.php 2008-08-05 13:49:14 UTC (rev 290) @@ -147,7 +147,7 @@ trigger_error($user->lang['NO_GROUP'], E_USER_WARNING); } - $current_time = time(); + $current_time = gmmktime(); $db->sql_transaction('begin'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-08-02 18:13:52
|
Revision: 289 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=289&view=rev Author: lord_le_brand Date: 2008-08-02 18:14:00 +0000 (Sat, 02 Aug 2008) Log Message: ----------- Actions to install time ratio :) Modified Paths: -------------- trunk/phpbb3/root/includes/sources_project/functions_create.php Modified: trunk/phpbb3/root/includes/sources_project/functions_create.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/functions_create.php 2008-07-31 14:31:40 UTC (rev 288) +++ trunk/phpbb3/root/includes/sources_project/functions_create.php 2008-08-02 18:14:00 UTC (rev 289) @@ -49,7 +49,7 @@ // Check if the title exists already in the database $sql = 'SELECT project_id FROM ' . PROJECT_PROJECTS_TABLE . ' - WHERE project_title_clean = \'' . $db->sql_escape($clean_title) . "'"; + WHERE project_title_clean = \'' . $db->sql_escape($clean_title) . '\''; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); @@ -60,10 +60,6 @@ return 'PROJECT_TITLE_TAKEN'; } - /** - * @todo check invalid chars, and disallowed titles... - */ - // All safe :-) return false; } @@ -132,9 +128,10 @@ { $time = 0; - /** - * @todo Action-to-time ratio - */ + foreach ($actions as $action) + { + $time += (in_array($action['action_type'], array(PROJECT_ACTION_COPY, PROJECT_ACTION_SQL, PROJECT_ACTION_DIY))) ? 60 : 30; + } return $time; } @@ -143,13 +140,14 @@ * Generate install level from action array or install time * * @param string $type - * @param mixed $parameter + * @param integer|array $parameter * @return integer */ -function project_generate_level($type, $parameter) +function project_generate_level($parameter, $type = 'time') { global $user; + $time = (int) ($type == 'actions') ? 0 : $parameter; $level = PROJECT_LEVEL_EASY; // Are we generating from actions, or from install time? @@ -162,24 +160,24 @@ trigger_error('<strong>project_generate_level():</strong> type of $parameter not correct'); } - /** - * @todo Action-to-level ratio - */ + foreach ($actions as $action) + { + $time += (in_array($action['action_type'], array(PROJECT_ACTION_COPY, PROJECT_ACTION_SQL, PROJECT_ACTION_DIY))) ? 60 : 30; + } - break; + // no break; case 'time': - $time = (int) $parameter; if ($time < 600) { $level = PROJECT_LEVEL_EASY; } - if ($time >= 600 && $time < 1800) + else if ($time >= 600 && $time < 1800) { $level = PROJECT_LEVEL_INTERMEDIATE; } - if ($time >= 1800) + else { $level = PROJECT_LEVEL_ADVANCED; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-07-31 14:31:34
|
Revision: 288 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=288&view=rev Author: lord_le_brand Date: 2008-07-31 14:31:40 +0000 (Thu, 31 Jul 2008) Log Message: ----------- Even better... Modified Paths: -------------- trunk/develop/create_schema_files_phpbb3.php trunk/phpbb3/root/project_install/install_install.php trunk/phpbb3/root/project_install/schemas/mysql_41_schema.sql Modified: trunk/develop/create_schema_files_phpbb3.php =================================================================== --- trunk/develop/create_schema_files_phpbb3.php 2008-07-31 12:00:51 UTC (rev 287) +++ trunk/develop/create_schema_files_phpbb3.php 2008-07-31 14:31:40 UTC (rev 288) @@ -979,6 +979,7 @@ 'COLUMNS' => array( 'tracker_id' => array('UINT:11', NULL, 'auto_increment'), 'project_id' => array('UINT', '0'), + 'tracker_title' => array('XSTEXT_UNI', ''), 'tracker_type' => array('TINT:3', '0'), ), 'PRIMARY_KEY' => 'tracker_id', Modified: trunk/phpbb3/root/project_install/install_install.php =================================================================== --- trunk/phpbb3/root/project_install/install_install.php 2008-07-31 12:00:51 UTC (rev 287) +++ trunk/phpbb3/root/project_install/install_install.php 2008-07-31 14:31:40 UTC (rev 288) @@ -152,15 +152,16 @@ $db->sql_transaction('begin'); // Add auth options - foreach ($this->acl_options_local as $location => $options) + foreach ($this->acl_options_local as $location => $location_row) { - $sql = 'SELECT location_id - FROM ' . ACL_LOCATIONS_TABLE . " - WHERE location_table = '$location'"; - $result = $db->sql_query($sql); - $location_id = $db->sql_fetchfield('location_id', 0, $result); - $db->sql_freeresult($result); + $options = $location_row['location_options']; + unset($location_row['location_options']); + $sql = 'INSERT INTO ' . ACL_LOCATIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $location_row); + $db->sql_query($sql); + + $location_id = $db->sql_nextid(); + $options = array('local' => $options); $auth_admin->acl_add_option($options); } @@ -481,27 +482,45 @@ protected $acl_options_local = array( 'PROJECT_PROJECTS_TABLE' => array( - 'p_view_project', - 'p_edit_project', - 'p_delete_project', - 'p_download_project', + 'location_identifier' => 'project', + 'location_primary' => 'project_id', + 'location_title' => 'project_title', + 'is_nestable' => 0, + 'location_options' => array( + 'p_view_project', + 'p_edit_project', + 'p_delete_project', + 'p_download_project', - 'p_view_docs', - 'p_manage_docs', + 'p_view_docs', + 'p_manage_docs', - 'p_add_author', - 'p_remove_author', - 'p_assign_role', - 'p_assign_auth', + 'p_add_author', + 'p_remove_author', + 'p_assign_role', + 'p_assign_auth', + ), ), 'PROJECT_TRACKERS_TABLE' => array( - 'p_post_tickets', - 'p_comment_tickets', - 'p_manage_tickets', + 'location_identifier' => 'tracker', + 'location_primary' => 'tracker_id', + 'location_title' => 'tracker_title', + 'is_nestable' => 0, + 'location_options' => array( + 'p_post_tickets', + 'p_comment_tickets', + 'p_manage_tickets', + ), ), 'PROJECT_CATEGORIES_TABLE' => array( - 'p_view_category', - 'p_category_add_project', + 'location_identifier' => 'category', + 'location_primary' => 'category_id', + 'location_title' => 'category_title', + 'is_nestable' => 0, + 'location_options' => array( + 'p_view_category', + 'p_category_add_project', + ), ), ); Modified: trunk/phpbb3/root/project_install/schemas/mysql_41_schema.sql =================================================================== --- trunk/phpbb3/root/project_install/schemas/mysql_41_schema.sql 2008-07-31 12:00:51 UTC (rev 287) +++ trunk/phpbb3/root/project_install/schemas/mysql_41_schema.sql 2008-07-31 14:31:40 UTC (rev 288) @@ -134,6 +134,7 @@ CREATE TABLE phpbb_project_trackers ( tracker_id int(11) UNSIGNED NOT NULL auto_increment, project_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + tracker_title varchar(100) DEFAULT '' NOT NULL, tracker_type tinyint(3) DEFAULT '0' NOT NULL, PRIMARY KEY (tracker_id), KEY project_id (project_id) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-07-31 12:00:46
|
Revision: 287 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=287&view=rev Author: lord_le_brand Date: 2008-07-31 12:00:51 +0000 (Thu, 31 Jul 2008) Log Message: ----------- Added phpbb_project_project_authors table again... Updated mysql_41_schema.sql Modified Paths: -------------- trunk/develop/create_schema_files_phpbb3.php trunk/develop/todo_list.txt trunk/phpbb3/root/project_install/schemas/mysql_41_schema.sql Modified: trunk/develop/create_schema_files_phpbb3.php =================================================================== --- trunk/develop/create_schema_files_phpbb3.php 2008-07-31 11:15:23 UTC (rev 286) +++ trunk/develop/create_schema_files_phpbb3.php 2008-07-31 12:00:51 UTC (rev 287) @@ -872,7 +872,6 @@ 'project_logo_width' => array('USINT', '0'), 'project_logo_height' => array('USINT', '0'), 'project_start_time' => array('TIMESTAMP', '0'), - 'project_owner' => array('UINT', '0'), 'project_last_update' => array('TIMESTAMP', '0'), 'project_status' => array('BOOL', '0'), 'file_only' => array('BOOL', '0'), @@ -888,6 +887,22 @@ //------------------------------------------ // + // Author-project relationship + // + $schema_data['phpbb_project_project_authors'] = array( + 'COLUMNS' => array( + 'author_id' => array('UINT', '0'), + 'project_id' => array('UINT', '0'), + 'author_order' => array('TINT:2', '0'), + 'is_owner' => array('BOOL', '0'), + 'version_from' => array('UINT:11', '0'), + ), + 'PRIMARY_KEY' => array('author_id', 'project_id'), + ); + + //------------------------------------------ + + // // Actions and versions // $schema_data['phpbb_project_versions'] = array( Modified: trunk/develop/todo_list.txt =================================================================== --- trunk/develop/todo_list.txt 2008-07-31 11:15:23 UTC (rev 286) +++ trunk/develop/todo_list.txt 2008-07-31 12:00:51 UTC (rev 287) @@ -1,6 +1,5 @@ Todo list for phpBB Project -- Add table for authors-project relation (also get rid of project_owner in projects_table?) - Author ordering in MOD(X) file/project overview page - Expand validate_project_title() - Add functions for assigning authors etc. Modified: trunk/phpbb3/root/project_install/schemas/mysql_41_schema.sql =================================================================== --- trunk/phpbb3/root/project_install/schemas/mysql_41_schema.sql 2008-07-31 11:15:23 UTC (rev 286) +++ trunk/phpbb3/root/project_install/schemas/mysql_41_schema.sql 2008-07-31 12:00:51 UTC (rev 287) @@ -54,7 +54,6 @@ project_logo_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, project_logo_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, project_start_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - project_owner mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, project_last_update int(11) UNSIGNED DEFAULT '0' NOT NULL, project_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, file_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, @@ -65,6 +64,17 @@ ) CHARACTER SET `utf8` COLLATE `utf8_bin`; +# Table: 'phpbb_project_project_authors' +CREATE TABLE phpbb_project_project_authors ( + author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + project_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + author_order tinyint(2) DEFAULT '0' NOT NULL, + is_owner tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + version_from int(11) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (author_id, project_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + # Table: 'phpbb_project_versions' CREATE TABLE phpbb_project_versions ( version_id int(11) UNSIGNED NOT NULL auto_increment, @@ -222,3 +232,5 @@ license_url varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (license_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-07-31 11:15:15
|
Revision: 286 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=286&view=rev Author: lord_le_brand Date: 2008-07-31 11:15:23 +0000 (Thu, 31 Jul 2008) Log Message: ----------- Cleaned up install_install.php. Moved all data except dummy MOD to install_install.php (Dummy MOD is todo). Updated ToDo list Modified Paths: -------------- trunk/develop/todo_list.txt trunk/phpbb3/root/project_install/index.php trunk/phpbb3/root/project_install/install_install.php trunk/phpbb3/root/project_install/schemas/schema_data.sql Modified: trunk/develop/todo_list.txt =================================================================== --- trunk/develop/todo_list.txt 2008-07-30 20:36:15 UTC (rev 285) +++ trunk/develop/todo_list.txt 2008-07-31 11:15:23 UTC (rev 286) @@ -1,16 +1,15 @@ Todo list for phpBB Project -- Move database inserts for ACL tables to PHP +- Add table for authors-project relation (also get rid of project_owner in projects_table?) - Author ordering in MOD(X) file/project overview page +- Expand validate_project_title() +- Add functions for assigning authors etc. +- Decide on what information will go on view category module +- Target version information??? - Definitive decision on storing versioned files - Generate filetree more efficiently (download class) -- Expand validate_project_title() -- Decide on what information will go on view category module -- Target version information -- Implement ACL Locations MOD - - Change the way authors are tied to projects using acl tables? - Decide on better module structure -- Modules: +- Create modules: - Import project - Manage project - Diff generator @@ -28,6 +27,7 @@ - License handler - phpbb.com MOD database sender - Add language entries +- Move dummy MOD out of sql file, get rid of schema_data.sql - Add text and options to installer - Add links to header (and index?) - Make modx file... -_-' Modified: trunk/phpbb3/root/project_install/index.php =================================================================== --- trunk/phpbb3/root/project_install/index.php 2008-07-30 20:36:15 UTC (rev 285) +++ trunk/phpbb3/root/project_install/index.php 2008-07-31 11:15:23 UTC (rev 286) @@ -44,6 +44,12 @@ trigger_error($user->lang['PROJECT_PHP_VERSION_TOO_LOW'] . $return_index, E_USER_WARNING); } +if (!function_exists('get_acl_location_array')) +{ + $return_index = '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>'); + trigger_error($user->lang['PROJECT_ACL_LOCATIONS_NOT_INSTALLED'] . $return_index, E_USER_WARNING); +} + $module = request_var('i', 'main'); $mode = request_var('mode', 'intro'); Modified: trunk/phpbb3/root/project_install/install_install.php =================================================================== --- trunk/phpbb3/root/project_install/install_install.php 2008-07-30 20:36:15 UTC (rev 285) +++ trunk/phpbb3/root/project_install/install_install.php 2008-07-31 11:15:23 UTC (rev 286) @@ -120,16 +120,18 @@ $template->assign_vars(array( 'INSTALL_TEXT' => $user->lang['PROJECT_INSTALL_TABLES_TEXT'], - 'U_NEXT' => append_sid("index.$phpEx", 'i=install&mode=config'), + 'U_NEXT' => append_sid("index.$phpEx", 'i=install&mode=insert_data'), )); add_form_key('project_install_tables'); break; - case 'config': + case 'insert_data': check_form_key('project_install_tables', false, '', true); + include_once("{$phpbb_root_path}includes/acp/auth.$phpEx"); + $auth_admin = new auth_admin(); $page_title = $user->lang['PROJECT_INSTALL'] . ' » ' . $user->lang['PROJECT_INSTALL_CONFIG_TITLE']; @@ -147,6 +149,42 @@ $current_time = time(); + $db->sql_transaction('begin'); + + // Add auth options + foreach ($this->acl_options_local as $location => $options) + { + $sql = 'SELECT location_id + FROM ' . ACL_LOCATIONS_TABLE . " + WHERE location_table = '$location'"; + $result = $db->sql_query($sql); + $location_id = $db->sql_fetchfield('location_id', 0, $result); + $db->sql_freeresult($result); + + $options = array('local' => $options); + $auth_admin->acl_add_option($options); + } + $auth_admin->acl_add_option($this->acl_options_global); + + // Add roles + data + foreach ($this->acl_roles as $acl_role) + { + $auth = $acl_role['auth']; + unset($acl_role['auth']); + + $sql = 'INSERT INTO ' . ACL_ROLES_TABLE . ' ' . $db->sql_build_array('INSERT', $acl_role); + $db->sql_query($sql); + + $role_id = $db->sql_nextid(); + + $auth_admin->acl_set_role($role_id, array_fill_keys($auth, ACL_YES)); + if ($acl_role['role_name'] == 'ROLE_PROJECT_TEAM') + { + $team_role_id = $role_id; + } + } + + // Add Project Autoposting Bot $bot_userdata = array( 'username' => $user->lang['PROJECT_BOT_USERNAME'], 'user_password' => '', @@ -157,8 +195,6 @@ 'user_email' => '', ); - $db->sql_transaction('begin'); - $bot_user_id = user_add($bot_userdata); if (!$bot_user_id) @@ -167,37 +203,24 @@ trigger_error($user->lang['PROJECT_BOT_NOT_ADDED'], E_USER_WARNING); } - $gpl_text = file_get_contents('licenses/gpl.txt'); - $gpl_text = $db->sql_escape($gpl_text); - $cc_by_text = file_get_contents('licenses/cc_by.txt'); - $cc_by_text = $db->sql_escape($cc_by_text); + // Add licenses + $gpl_text = file_get_contents('licenses/gpl.txt'); + $gpl_text = $db->sql_escape($gpl_text); + $cc_by_text = file_get_contents('licenses/cc_by.txt'); + $cc_by_text = $db->sql_escape($cc_by_text); + $licenses_insert = array( + array( + 'license_title' => 'GNU General Public License version 2', + 'license_acronym' => 'GPLv2', + 'license_description' => 'This is a short explanation of what the GPL is.... Well it should be anyway.', + 'license_text' => $gpl_text, + 'license_url' => 'http://www.gnu.org/licenses/old-licenses/gpl-2.0.html', + ), + array( + 'license_title' => 'Creative Commons Attribution 3.0', + 'license_acronym' => 'CC-BY 3.0', + 'license_description' => 'You are free: - $team_group_id = 0; - $error_message_ary = group_create($team_group_id, GROUP_SPECIAL, 'PROJECT_TEAM', '', array('group_colour' => 'E67300', 'group_receive_pm' => 1, 'group_legend' => 1)); - - if ($error_message_ary !== false) - { - $db->sql_transaction('rollback'); - trigger_error(implode("<br />\n", $error_message_ary)); - } - - $sql = 'SELECT role_id - FROM ' . ACL_ROLES_TABLE . " - WHERE role_name = 'ROLE_PROJECT_TEAM' - OR role_name = 'ROLE_PROJECT_MANAGER' - ORDER BY role_order DESC"; - - $db->sql_query($sql); - - $team_role_id = $db->sql_fetchfield('role_id', 0); - $manager_role_id = $db->sql_fetchfield('role_id', 1); - - $sql_ary = array( - 'INSERT INTO ' . PROJECT_LICENSES_TABLE . " (license_title, license_acronym, license_description, license_text, license_url) - VALUES ('GNU General Public License version 2', 'GPLv2', 'This is a short explanation of what the GPL is.... Well it should be anyway.', '$gpl_text', 'http://www.gnu.org/licenses/old-licenses/gpl-2.0.html')", - 'INSERT INTO ' . PROJECT_LICENSES_TABLE . " (license_title, license_acronym, license_description, license_text, license_url) - VALUES ('Creative Commons Attribution 3.0', 'CC-BY 3.0', 'You are free: - * to Share - to copy, distribute and transmit the work * to Remix - to adapt the work @@ -207,20 +230,38 @@ * For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. * Any of the above conditions can be waived if you get permission from the copyright holder. -* Nothing in this license impairs or restricts the author''s moral rights.', '$cc_by_text', 'http://creativecommons.org/licenses/by/3.0/legalcode')", - 'INSERT INTO ' . PROJECT_AUTHORS_TABLE . " (author_id, author_username, author_realname, author_email, author_website) - VALUES ({$user->data['user_id']}, '{$user->data['username']}', '', '{$user->data['user_email']}', '{$user->data['user_website']}')", - 'INSERT INTO ' . ACL_GROUPS_TABLE . " (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) - VALUES ($team_group_id, 0, 0, $team_role_id, 0)", +* Nothing in this license impairs or restricts the author\'s moral rights.', + 'license_text' => $cc_by_text, + 'license_url' => 'http://creativecommons.org/licenses/by/3.0/legalcode', + ), ); - foreach ($sql_ary AS $sql_query) + $sql = 'INSERT INTO ' . PROJECT_LICENSES_TABLE . ' ' . $db->sql_build_array('MULTI_INSERT', $licenses_insert); + + // Create Project Team group + $team_group_id = 0; + $error_message_ary = group_create($team_group_id, GROUP_SPECIAL, 'PROJECT_TEAM', '', array('group_colour' => 'E67300', 'group_receive_pm' => 1, 'group_legend' => 1)); + + if ($error_message_ary !== false) { - $db->sql_query($sql_query); + $db->sql_transaction('rollback'); + trigger_error(implode("<br />\n", $error_message_ary)); } $error_message = group_user_add($team_group_id, array($user->data['user_id']), false, false, false, 1); + $auth_admin->acl_set('group', 0, $team_group_id, 0, $team_role_id); + + $sql = 'INSERT INTO ' . PROJECT_AUTHORS_TABLE . ' ' . $db->sql_build_array('INSERT', array( + 'author_id' => $user->data['user_id'], + 'author_username' => $user->data['username'], + 'author_realname' => '', + 'author_email' => $user->data['user_email'], + 'author_website' => $user->data['user_website'] + )); + + $db->sql_query($sql); + $this->default_config = array_merge($this->default_config, array( array('project_install_date', $current_time, 0), array('phpbbproject_version', PROJECT_CURRENT_VERSION, 0), @@ -232,6 +273,8 @@ set_config($config_row[0], $config_row[1], $config_row[2]); } + $this->add_modules(); + if ($error_message) { $db->sql_transaction('rollback'); @@ -240,27 +283,10 @@ $db->sql_transaction('commit'); - $template->assign_vars(array( - 'INSTALL_TEXT' => $user->lang['PROJECT_INSTALL_CONFIG_TEXT'], - 'U_NEXT' => append_sid("index.$phpEx", 'i=install&mode=modules'), - )); - - add_form_key('project_install_config'); - - break; - - case 'modules': - - check_form_key('project_install_config', false, '', true); - - $page_title = $user->lang['PROJECT_INSTALL'] . ' » ' . $user->lang['PROJECT_INSTALL_MODULES_TITLE']; - - $this->add_modules(); - $cache->purge(); $template->assign_vars(array( - 'INSTALL_TEXT' => sprintf($user->lang['PROJECT_INSTALL_MODULES_TEXT'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>'), + 'INSTALL_TEXT' => $user->lang['PROJECT_INSTALL_CONFIG_TEXT'], 'U_NEXT' => append_sid("{$phpbb_root_path}project.$phpEx"), )); @@ -452,4 +478,77 @@ array('newest_project_id', '0', 1), array('newest_project_title', '', 1), ); + + protected $acl_options_local = array( + 'PROJECT_PROJECTS_TABLE' => array( + 'p_view_project', + 'p_edit_project', + 'p_delete_project', + 'p_download_project', + + 'p_view_docs', + 'p_manage_docs', + + 'p_add_author', + 'p_remove_author', + 'p_assign_role', + 'p_assign_auth', + ), + 'PROJECT_TRACKERS_TABLE' => array( + 'p_post_tickets', + 'p_comment_tickets', + 'p_manage_tickets', + ), + 'PROJECT_CATEGORIES_TABLE' => array( + 'p_view_category', + 'p_category_add_project', + ), + ); + + protected $acl_options_global = array( + 'global' => array( + 'p_add_project', + 'p_manage_category', + 'p_manage_roles', + 'p_approve_project', + ), + ); + + protected $acl_roles = array( + array( + 'role_name' => 'ROLE_PROJECT_USER', + 'role_description' => 'ROLE_DESCRIPTION_PROJECT_USER', + 'role_type' => 'project_', + 'role_order' => 1, + 'auth' => array('p_', 'p_view_project', 'p_download_project', 'p_view_docs'), + ), + array( + 'role_name' => 'ROLE_PROJECT_DOCUMENTOR', + 'role_description' => 'ROLE_DESCRIPTION_PROJECT_DOCUMENTOR', + 'role_type' => 'project_', + 'role_order' => 2, + 'auth' => array('p_', 'p_view_project', 'p_download_project', 'p_view_docs', 'p_manage_docs'), + ), + array( + 'role_name' => 'ROLE_PROJECT_AUTHOR', + 'role_description' => 'ROLE_DESCRIPTION_PROJECT_AUTHOR', + 'role_type' => 'project_', + 'role_order' => 3, + 'auth' => array('p_', 'p_view_project', 'p_edit_project', 'p_download_project', 'p_view_docs', 'p_manage_docs'), + ), + array( + 'role_name' => 'ROLE_PROJECT_MANAGER', + 'role_description' => 'ROLE_DESCRIPTION_PROJECT_MANAGER', + 'role_type' => 'project_', + 'role_order' => 4, + 'auth' => array('p_', 'p_view_project', 'p_edit_project', 'p_delete_project', 'p_download_project', 'p_view_docs', 'p_manage_docs', 'p_add_author', 'p_remove_author', 'p_assign_role', 'p_assign_auth', 'p_manage_tracker'), + ), + array( + 'role_name' => 'ROLE_PROJECT_TEAM', + 'role_description' => 'ROLE_DESCRIPTION_PROJECT_TEAM', + 'role_type' => 'project_', + 'role_order' => 5, + 'auth' => array('p_', 'p_manage_category', 'p_manage_roles', 'p_approve_project'), + ), + ); } \ No newline at end of file Modified: trunk/phpbb3/root/project_install/schemas/schema_data.sql =================================================================== --- trunk/phpbb3/root/project_install/schemas/schema_data.sql 2008-07-30 20:36:15 UTC (rev 285) +++ trunk/phpbb3/root/project_install/schemas/schema_data.sql 2008-07-31 11:15:23 UTC (rev 286) @@ -7,87 +7,6 @@ #------------------------------------------ # -# Auth options -# - -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_', 1, 1); - -# project based auths -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_view_project', 1, 0); -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_edit_project', 1, 0); -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_delete_project', 1, 0); -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_download_project', 1, 0); - -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_view_docs', 1, 0); -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_manage_docs', 1, 0); - -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_add_author', 1, 0); -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_remove_author', 1, 0); -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_assign_role', 1, 0); -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_assign_auth', 1, 0); - -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_manage_tracker', 1, 0); - -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_view_category', 1, 0); - -# global auths -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_add_project', 0, 1); -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_manage_category', 0, 1); -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_manage_roles', 0, 1); -INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('p_approve_project', 0, 1); - -#------------------------------------------ - -# -# Auth roles -# - -INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_PROJECT_USER', 'ROLE_DESCRIPTION_PROJECT_USER', 'p_', 1); -INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_PROJECT_DOCUMENTOR', 'ROLE_DESCRIPTION_PROJECT_DOCUMENTOR', 'p_', 2); -INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_PROJECT_AUTHOR', 'ROLE_DESCRIPTION_PROJECT_AUTHOR', 'p_', 3); -INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_PROJECT_MANAGER', 'ROLE_DESCRIPTION_PROJECT_MANAGER', 'p_', 4); -INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_PROJECT_TEAM', 'ROLE_DESCRIPTION_PROJECT_TEAM', 'p_', 5); - -#------------------------------------------ - -# -# Roles data -# - -# Regular user -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT r.role_id, a.auth_option_id, 1 FROM phpbb_acl_roles r, phpbb_acl_options a WHERE r.role_name = 'ROLE_PROJECT_USER' AND a.auth_option IN ('p_', 'p_view_project', 'p_download_project', 'p_view_docs'); - -# Documentor -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT r.role_id, a.auth_option_id, 1 FROM phpbb_acl_roles r, phpbb_acl_options a WHERE r.role_name = 'ROLE_PROJECT_DOCUMENTOR' AND a.auth_option IN ('p_', 'p_view_project', 'p_download_project', 'p_view_docs', 'p_manage_docs'); - -# Author -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT r.role_id, a.auth_option_id, 1 FROM phpbb_acl_roles r, phpbb_acl_options a WHERE r.role_name = 'ROLE_PROJECT_AUTHOR' AND a.auth_option IN ('p_', 'p_view_project', 'p_edit_project', 'p_download_project', 'p_view_docs', 'p_manage_docs'); - -# Manager -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT r.role_id, a.auth_option_id, 1 FROM phpbb_acl_roles r, phpbb_acl_options a WHERE r.role_name = 'ROLE_PROJECT_MANAGER' AND a.auth_option IN ('p_', 'p_view_project', 'p_edit_project', 'p_delete_project', 'p_download_project', 'p_view_docs', 'p_manage_docs', 'p_add_author', 'p_remove_author', 'p_assign_role', 'p_assign_auth', 'p_manage_tracker'); - -# Team -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT r.role_id, a.auth_option_id, 1 FROM phpbb_acl_roles r, phpbb_acl_options a WHERE r.role_name = 'ROLE_PROJECT_TEAM' AND a.auth_option IN ('p_', 'p_manage_category', 'p_manage_roles', 'p_approve_project'); - -#------------------------------------------ - -# -# ACL Groups -# - -# Registered users get access to the test category and project :) -INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) SELECT 2, 0, auth_option_id, 0, 1 FROM phpbb_acl_options WHERE auth_option = 'p_'; -INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) SELECT 3, 0, auth_option_id, 0, 1 FROM phpbb_acl_options WHERE auth_option = 'p_'; - -INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) SELECT 2, 1, 0, role_id, 0 FROM phpbb_acl_roles WHERE role_name = 'ROLE_PROJECT_USER'; -INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) SELECT 3, 1, 0, role_id, 0 FROM phpbb_acl_roles WHERE role_name = 'ROLE_PROJECT_USER'; - -INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) SELECT 2, 1, auth_option_id, 0, 1 FROM phpbb_acl_options WHERE auth_option = 'p_view_category'; -INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) SELECT 3, 1, auth_option_id, 0, 1 FROM phpbb_acl_options WHERE auth_option = 'p_view_category'; - -#------------------------------------------ - -# # Demo project # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-07-30 20:36:09
|
Revision: 285 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=285&view=rev Author: lord_le_brand Date: 2008-07-30 20:36:15 +0000 (Wed, 30 Jul 2008) Log Message: ----------- Moved config to install_install.php Modified Paths: -------------- trunk/phpbb3/root/project_install/install_install.php trunk/phpbb3/root/project_install/schemas/schema_data.sql Modified: trunk/phpbb3/root/project_install/install_install.php =================================================================== --- trunk/phpbb3/root/project_install/install_install.php 2008-07-29 23:25:46 UTC (rev 284) +++ trunk/phpbb3/root/project_install/install_install.php 2008-07-30 20:36:15 UTC (rev 285) @@ -172,10 +172,6 @@ $cc_by_text = file_get_contents('licenses/cc_by.txt'); $cc_by_text = $db->sql_escape($cc_by_text); - set_config('project_install_date', $current_time); - set_config('phpbbproject_version', PROJECT_CURRENT_VERSION); - set_config('project_autopost_user_id', $bot_user_id); - $team_group_id = 0; $error_message_ary = group_create($team_group_id, GROUP_SPECIAL, 'PROJECT_TEAM', '', array('group_colour' => 'E67300', 'group_receive_pm' => 1, 'group_legend' => 1)); @@ -225,6 +221,17 @@ $error_message = group_user_add($team_group_id, array($user->data['user_id']), false, false, false, 1); + $this->default_config = array_merge($this->default_config, array( + array('project_install_date', $current_time, 0), + array('phpbbproject_version', PROJECT_CURRENT_VERSION, 0), + array('project_autopost_user_id', $bot_user_id, 0), + )); + + foreach($this->default_config as $config_row) + { + set_config($config_row[0], $config_row[1], $config_row[2]); + } + if ($error_message) { $db->sql_transaction('rollback'); @@ -395,4 +402,54 @@ 'PROJECT_CAT_MARX' => null, 'PROJECT_CAT_SEARCH' => null, ); + + protected $default_config = array( + array('project_autopost_enable', '0', 0), + array('project_autopost_forum_id', '0', 0), + array('project_autopost_forum_per_category', '0', 0), + array('project_topic_title', '', 0), + array('project_topic_layout', '', 0), + array('project_history_layout', '', 0), + array('project_update_post_title', '', 0), + array('project_update_post_layout', '', 0), + + array('project_docs_enabled', '1', 0), + array('project_docs_allow_bbcode', '1', 0), + array('project_docs_allow_smilies', '1', 0), + array('project_docs_per_page', '25', 0), + + array('project_allow_logo_remote', '0', 0), + array('project_allow_logo_upload', '0', 0), + array('project_logo_filesize', '20480', 0), + array('project_logo_max_height', '90', 0), + array('project_logo_max_width', '200', 0), + array('project_logo_min_height', '20', 0), + array('project_logo_min_width', '20', 0), + array('project_logo_path', 'images/project_logos/upload', 0), + array('project_logo_salt', 'project_logo', 0), + + array('projects_per_page', '25', 0), + + array('project_title_min_chars', '6', 0), + array('project_title_max_chars', '60', 0), + + array('project_allow_bookmarks', '1', 0), + array('project_allow_project_import', '1', 0), + array('project_allow_subscriptions', '1', 0), + array('project_approve_creation', '1', 0), + array('project_default_target_version', '3.0', 0), + array('project_display_subcats', '0', 0), + array('project_enable_diff', '1', 0), + array('project_enable_files_only', '0', 0), + array('project_enable_send_moddb', '0', 0), + array('project_enable_trackers', '1', 0), + + array('project_display_stats', '1', 0), + array('project_display_top_ten', '1', 0), + + array('project_num_projects', '0', 1), + array('project_num_downloads', '0', 1), + array('newest_project_id', '0', 1), + array('newest_project_title', '', 1), + ); } \ No newline at end of file Modified: trunk/phpbb3/root/project_install/schemas/schema_data.sql =================================================================== --- trunk/phpbb3/root/project_install/schemas/schema_data.sql 2008-07-29 23:25:46 UTC (rev 284) +++ trunk/phpbb3/root/project_install/schemas/schema_data.sql 2008-07-30 20:36:15 UTC (rev 285) @@ -7,65 +7,6 @@ #------------------------------------------ # -# Configuration -# - -# Autoposting - See autopost.txt for layout options -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_autopost_enable', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_autopost_forum_id', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_autopost_forum_per_category', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_topic_title', ''); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_topic_layout', ''); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_history_layout', ''); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_update_post_title', ''); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_update_post_layout', ''); - -# Docs -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_docs_enabled', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_docs_allow_bbcode', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_docs_allow_smilies', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_docs_per_page', '25'); - -# Logos -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_allow_logo_remote', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_allow_logo_upload', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_logo_filesize', '20480'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_logo_max_height', '90'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_logo_max_width', '200'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_logo_min_height', '20'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_logo_min_width', '20'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_logo_path', 'images/project_logos/upload'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_logo_salt', 'project_logo'); - -# Random stuff -INSERT INTO phpbb_config (config_name, config_value) VALUES ('projects_per_page', '25'); - -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_title_min_chars', '6'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_title_max_chars', '60'); - -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_allow_bookmarks', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_allow_project_import', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_allow_subscriptions', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_approve_creation', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_default_target_version', '3.0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_display_subcats', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_enable_diff', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_enable_files_only', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_enable_send_moddb', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_enable_trackers', '1'); - -# Statistics -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_display_stats', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('project_display_top_ten', '1'); - -INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('project_num_projects', '0', 1); -INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('project_num_downloads', '0', 1); -INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('newest_project_id', '0', 1); -INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('newest_project_title', '', 1); - -#------------------------------------------ - -# # Auth options # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-07-29 23:25:37
|
Revision: 284 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=284&view=rev Author: lord_le_brand Date: 2008-07-29 23:25:46 +0000 (Tue, 29 Jul 2008) Log Message: ----------- Started implementing ACL Locations Modified Paths: -------------- trunk/develop/create_schema_files_phpbb3.php trunk/develop/permissions.txt trunk/develop/todo_list.txt trunk/phpbb3/root/includes/project/info/project_main.php trunk/phpbb3/root/includes/project/info/project_project.php trunk/phpbb3/root/includes/sources_project/extensions.php trunk/phpbb3/root/project.php Modified: trunk/develop/create_schema_files_phpbb3.php =================================================================== --- trunk/develop/create_schema_files_phpbb3.php 2008-07-22 21:59:06 UTC (rev 283) +++ trunk/develop/create_schema_files_phpbb3.php 2008-07-29 23:25:46 UTC (rev 284) @@ -932,14 +932,6 @@ //------------------------------------------ // - // Permissions - // - - // @todo New table to work with poyntesm's auth patch - - //------------------------------------------ - - // // Trackers // Modified: trunk/develop/permissions.txt =================================================================== --- trunk/develop/permissions.txt 2008-07-22 21:59:06 UTC (rev 283) +++ trunk/develop/permissions.txt 2008-07-29 23:25:46 UTC (rev 284) @@ -1,6 +1,6 @@ Permissions for phpBB Project: -Wait for poyntesm to finish his patch for the auth class +Use ACL Locations MOD Assigned by authors: [?] Modified: trunk/develop/todo_list.txt =================================================================== --- trunk/develop/todo_list.txt 2008-07-22 21:59:06 UTC (rev 283) +++ trunk/develop/todo_list.txt 2008-07-29 23:25:46 UTC (rev 284) @@ -1,12 +1,13 @@ Todo list for phpBB Project +- Move database inserts for ACL tables to PHP - Author ordering in MOD(X) file/project overview page - Definitive decision on storing versioned files - Generate filetree more efficiently (download class) - Expand validate_project_title() - Decide on what information will go on view category module - Target version information -- Wait till poyntesm finishes his auth patch +- Implement ACL Locations MOD - Change the way authors are tied to projects using acl tables? - Decide on better module structure - Modules: Modified: trunk/phpbb3/root/includes/project/info/project_main.php =================================================================== --- trunk/phpbb3/root/includes/project/info/project_main.php 2008-07-22 21:59:06 UTC (rev 283) +++ trunk/phpbb3/root/includes/project/info/project_main.php 2008-07-29 23:25:46 UTC (rev 284) @@ -36,7 +36,7 @@ 'version' => '1.0.0', 'modes' => array( 'overview' => array('title' => 'PROJECT_MAIN_OVERVIEW', 'auth' => 'acl_p_', 'cat' => array('PROJECT_CAT_MAIN')), - 'viewcat' => array('title' => 'PROJECT_VIEW_CATEGORY', 'auth' => 'acl_p_view_category,$c_id', 'cat' => array('PROJECT_CAT_MAIN')), + 'viewcat' => array('title' => 'PROJECT_VIEW_CATEGORY', 'auth' => 'acl_p_view_category,$id_category', 'cat' => array('PROJECT_CAT_MAIN')), 'create_project' => array('title' => 'PROJECT_CREATE_PROJECT', 'auth' => 'acl_p_add_project', 'cat' => array('PROJECT_CAT_MAIN')), 'import' => array('title' => 'PROJECT_IMPORT_PROJECT', 'auth' => 'acl_p_add_project', 'cat' => array('PROJECT_CAT_MAIN')), ), Modified: trunk/phpbb3/root/includes/project/info/project_project.php =================================================================== --- trunk/phpbb3/root/includes/project/info/project_project.php 2008-07-22 21:59:06 UTC (rev 283) +++ trunk/phpbb3/root/includes/project/info/project_project.php 2008-07-29 23:25:46 UTC (rev 284) @@ -35,12 +35,12 @@ 'title' => 'PROJECT_CAT_PROJECT', 'version' => '1.0.0', 'modes' => array( - 'overview' => array('title' => 'PROJECT_PROJECT_OVERVIEW', 'auth' => 'acl_p_view_project,$pr_id', 'cat' => array('PROJECT_CAT_VIEW_PROJECT')), - 'view_info' => array('title' => 'PROJECT_VIEW_INFO', 'auth' => 'acl_p_view_project,$pr_id', 'cat' => array('PROJECT_CAT_VIEW_PROJECT')), - 'view_authors' => array('title' => 'PROJECT_VIEW_AUTHORS', 'auth' => 'acl_p_view_project,$pr_id', 'cat' => array('PROJECT_CAT_VIEW_PROJECT')), - 'view_history' => array('title' => 'PROJECT_VIEW_HISTORY', 'auth' => 'acl_p_view_project,$pr_id', 'cat' => array('PROJECT_CAT_VIEW_PROJECT')), - 'download' => array('title' => 'PROJECT_DOWNLOAD_PROJECT', 'auth' => 'acl_p_download_project,$pr_id', 'cat' => array('PROJECT_CAT_PROJECT')), - 'diff' => array('title' => 'PROJECT_VIEW_DIFF', 'auth' => 'acl_p_download_project,$pr_id', 'cat' => array('PROJECT_CAT_PROJECT')), + 'overview' => array('title' => 'PROJECT_PROJECT_OVERVIEW', 'auth' => 'acl_p_view_project,$id_project', 'cat' => array('PROJECT_CAT_VIEW_PROJECT')), + 'view_info' => array('title' => 'PROJECT_VIEW_INFO', 'auth' => 'acl_p_view_project,$id_project', 'cat' => array('PROJECT_CAT_VIEW_PROJECT')), + 'view_authors' => array('title' => 'PROJECT_VIEW_AUTHORS', 'auth' => 'acl_p_view_project,$id_project', 'cat' => array('PROJECT_CAT_VIEW_PROJECT')), + 'view_history' => array('title' => 'PROJECT_VIEW_HISTORY', 'auth' => 'acl_p_view_project,$id_project', 'cat' => array('PROJECT_CAT_VIEW_PROJECT')), + 'download' => array('title' => 'PROJECT_DOWNLOAD_PROJECT', 'auth' => 'acl_p_download_project,$id_project', 'cat' => array('PROJECT_CAT_PROJECT')), + 'diff' => array('title' => 'PROJECT_VIEW_DIFF', 'auth' => 'acl_p_download_project,$id_project', 'cat' => array('PROJECT_CAT_PROJECT')), ), ); } Modified: trunk/phpbb3/root/includes/sources_project/extensions.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/extensions.php 2008-07-22 21:59:06 UTC (rev 283) +++ trunk/phpbb3/root/includes/sources_project/extensions.php 2008-07-29 23:25:46 UTC (rev 284) @@ -16,79 +16,4 @@ exit; } -/** - * @todo poyntesm's patch is gonna be here, once it's released - */ - -/** - * phpBB Project Module extension - * - * @package phpbbproject - */ -class project_p_master extends p_master -{ - public $acl_cat_id = false; - public $acl_project_id = false; - - /** - * Check module authorisation, with project_id and category_id :) - */ - function module_auth($module_auth, $forum_id = false, $category_id = false, $project_id = false) - { - global $auth; - - $module_auth = trim($module_auth); - - // Generally allowed to access module if module_auth is empty - if (!$module_auth) - { - return true; - } - - // With the code below we make sure only those elements get eval'd we really want to be checked - preg_match_all('/(?: - "[^"\\\\]*(?:\\\\.[^"\\\\]*)*" | - \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' | - [(),] | - [^\s(),]+)/x', $module_auth, $match); - - $tokens = $match[0]; - for ($i = 0, $size = sizeof($tokens); $i < $size; $i++) - { - $token = &$tokens[$i]; - - switch ($token) - { - case ')': - case '(': - case '&&': - case '||': - case ',': - break; - - default: - if (!preg_match('#(?:acl_([a-z_]+)(,\$(?:c_|pr_|)id)?)|(?:\$(?:c_|pr_|)id)|(?:aclf_([a-z_]+))|(?:cfg_([a-z_]+))|(?:request_([a-z_]+))#', $token)) - { - $token = ''; - } - break; - } - } - - $module_auth = implode(' ', $tokens); - - // Make sure $id seperation is working fine - $module_auth = str_replace(' , ', ',', $module_auth); - - $forum_id = ($forum_id === false) ? $this->acl_forum_id : $forum_id; - $category_id = ($category_id === false) ? $this->acl_cat_id : $category_id; - $project_id = ($project_id === false) ? $this->acl_project_id : $project_id; - - $is_auth = false; - // @todo Rewrite this for auth extension - eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$(?:c_|pr_|)id)?#', '#\$id#', '#\$c_id#', '#\$pr_id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#', '#request_([a-z_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $category_id', '(int) $project_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']', '!empty($_REQUEST[\'\\1\'])'), $module_auth) . ');'); - - return $is_auth; - } -} ?> \ No newline at end of file Modified: trunk/phpbb3/root/project.php =================================================================== --- trunk/phpbb3/root/project.php 2008-07-22 21:59:06 UTC (rev 283) +++ trunk/phpbb3/root/project.php 2008-07-29 23:25:46 UTC (rev 284) @@ -18,15 +18,11 @@ require("{$phpbb_root_path}common.$phpEx"); require("{$phpbb_root_path}includes/functions_module.$phpEx"); require("{$phpbb_root_path}includes/sources_project/constants.$phpEx"); -require("{$phpbb_root_path}includes/sources_project/extensions.$phpEx"); +//require("{$phpbb_root_path}includes/sources_project/extensions.$phpEx"); // Obsolete now require("{$phpbb_root_path}includes/sources_project/functions_project.$phpEx"); define('PROJECT_BASE_URL', "{$phpbb_root_path}project.$phpEx"); -/** - * @todo Initiate poyntesm's auth patch - */ - // Basic parameter data $id = request_var('i', ''); $mode = request_var('mode', ''); @@ -39,20 +35,19 @@ // Setting a variable to let the style designer know where he is ??? $template->assign_var('S_IN_PROJECT', true); -$module = new project_p_master(); +$module = new p_master(); -$project_id = request_var('pr', 0); -$category_id = request_var('c', 0); -$action = request_var('action', ''); +$category_id = request_var('c', 0); +$project_id = request_var('pr', 0); +$tracker_id = request_var('tid', 0); +$action = request_var('action', ''); -/** - * @todo Rewrite this for auth extension // If the user doesn't have any project permissions (globally or locally) he can't access any modules... if (!$auth->acl_getf_global('p_')) { trigger_error($user->lang['NOT_AUTHORISED']); } - +/* This just seems weird // if the user cannot view the project he tries to access then we won't allow other access either if ($project_id && !$auth->acl_get('p_view_project', $project_id)) { @@ -64,12 +59,10 @@ { trigger_error($user->lang['PROJECT_NOT_AUTH_CAT']); } - */ +//*/ if ($project_id) { - $module->acl_project_id = $project_id; - // Or do we want to overwrite it? if (!$category_id) { @@ -82,10 +75,11 @@ } } -if ($category_id) -{ - $module->acl_cat_id = $category_id; -} +$module->additional_ids = array( + 'category' => $category_id, + 'project' => $project_id, + 'tracker' => $tracker_id, +); // Instantiate module system and generate list of available modules $module->list_modules('project'); @@ -106,36 +100,38 @@ function _module__url($mode, $module_row) { - global $category_id, $project_id; + global $category_id, $project_id, $tracker_id; $return = ($category_id) ? "&c=$category_id" : ''; $return .= ($project_id) ? "&pr=$project_id" : ''; + $return .= ($tracker_id) ? "&tid=$tracker_id" : ''; return $return; } function _module_main_url($mode, $module_row) { - global $category_id, $project_id; + global $category_id, $project_id, $tracker_id; $return = ($category_id) ? "&c=$category_id" : ''; $return .= ($project_id) ? "&pr=$project_id" : ''; + $return .= ($tracker_id) ? "&tid=$tracker_id" : ''; return $return; } function _module_project_url($mode, $module_row) { - global $category_id, $project_id; + global $category_id, $project_id, $tracker_id; $return = ($category_id) ? "&c=$category_id" : ''; $return .= ($project_id) ? "&pr=$project_id" : ''; + $return .= ($tracker_id) ? "&tid=$tracker_id" : ''; return $return; } function _module_trackers_url($mode, $module_row) { - global $category_id, $project_id; + global $category_id, $project_id, $tracker_id; - $tracker_id = request_var('tid', 0); $tracker_category = request_var('tcat', 0); $ticket_id = request_var('ticket', 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-07-22 21:58:59
|
Revision: 283 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=283&view=rev Author: lord_le_brand Date: 2008-07-22 21:59:06 +0000 (Tue, 22 Jul 2008) Log Message: ----------- Fixed one of many errors with _module_*_url... Added language entries Fixed a missing column in SELECT query Changed the catlist a bit Modified Paths: -------------- trunk/phpbb3/root/includes/project/project_main.php trunk/phpbb3/root/includes/project/project_trackers.php trunk/phpbb3/root/language/en/mods/phpbbproject.php trunk/phpbb3/root/project_install/install_install.php trunk/phpbb3/root/styles/prosilver/template/project_catlist.html Modified: trunk/phpbb3/root/includes/project/project_main.php =================================================================== --- trunk/phpbb3/root/includes/project/project_main.php 2008-07-21 20:16:03 UTC (rev 282) +++ trunk/phpbb3/root/includes/project/project_main.php 2008-07-22 21:59:06 UTC (rev 283) @@ -456,7 +456,7 @@ */ $category_ids = '1 = 1'; - $sql = 'SELECT category_id, category_title + $sql = 'SELECT category_id, category_title, parent_id FROM ' . PROJECT_CATEGORIES_TABLE . " WHERE $category_ids ORDER BY left_id ASC"; Modified: trunk/phpbb3/root/includes/project/project_trackers.php =================================================================== --- trunk/phpbb3/root/includes/project/project_trackers.php 2008-07-21 20:16:03 UTC (rev 282) +++ trunk/phpbb3/root/includes/project/project_trackers.php 2008-07-22 21:59:06 UTC (rev 283) @@ -89,7 +89,7 @@ if (!$tracker_id) { $url_extra = _module_trackers_url('tracker', array()); - redirect(_module_trackers_url(append_sid(PROJECT_BASE_URL, 'i=trackers&mode=main'))); + redirect(append_sid(PROJECT_BASE_URL, 'i=trackers&mode=main') . $url_extra); } $sql = 'SELECT COUNT(t.*) AS num_tickets Modified: trunk/phpbb3/root/language/en/mods/phpbbproject.php =================================================================== --- trunk/phpbb3/root/language/en/mods/phpbbproject.php 2008-07-21 20:16:03 UTC (rev 282) +++ trunk/phpbb3/root/language/en/mods/phpbbproject.php 2008-07-22 21:59:06 UTC (rev 283) @@ -22,7 +22,7 @@ } // Some characters you may want to copy&paste: -// ’ » “ \xE2\x80? … +// ’ » “ �? … $lang = array_merge($lang, array( 'PHPBB_PROJECT' => 'phpBB Project', 'PHPBBPROJECT_COPYRIGHT' => '© 2007 phpBB Project Team', @@ -44,6 +44,7 @@ 'PROJECT_VIEW_CATEGORY' => 'View category', 'PROJECT_CREATE_PROJECT' => 'Create new project', 'PROJECT_IMPORT_PROJECT' => 'Import project', + 'PROJECT_PROJECT_OVERVIEW' => 'Project overview', 'PROJECT_VIEW_INFO' => 'View project information', 'PROJECT_VIEW_AUTHORS' => 'View project authors', 'PROJECT_VIEW_HISTORY' => 'View project history', @@ -71,10 +72,25 @@ 'PROJECT_NO_PROJECTS' => 'No projects', // Creating/importing projects + 'PROJECT_CATEGORY' => 'Category', + 'PROJECT_LICENSE' => 'License', + 'PROJECT_DISPLAY_LICENSE_DESC' => 'Display description', + 'PROJECT_FILE_ONLY' => 'File only', + 'PROJECT_FILE_ONLY_EXPLAIN' => 'When checked, there will be no MODX file in the download package', + 'PROJECT_TITLE_TOO_SHORT' => 'The title you specified is too short', 'PROJECT_TITLE_TOO_LONG' => 'The title you specified is too long', 'PROJECT_TITLE_TAKEN' => 'The title you specified is taken', + 'PROJECT_NO_FILE_SENT' => 'There is no file uploaded', + 'PROJECT_IMPORT_FAILURE' => 'Failed to import project', + 'PROJECT_CREATE_FAILURE' => 'Failed to create project', + 'PROJECT_CREATE_SUCCESS' => 'New project created successfully!', + 'PROJECT_VIEW_PROJECT' => 'Click %sHere%s to view your project', + 'PROJECT_VIEW_TOPIC' => 'Click %sHere%s to view the associated topic', + 'PROJECT_BACK_OVERVIEW' => 'Click %sHere%s to return to the main overview', + + // View Project 'PROJECT_BACK_TO_CATEGORY' => 'Go back to category <strong>%s</strong>', @@ -84,14 +100,14 @@ 'PROJECT_NOTES' => 'Author notes', 'PROJECT_VERSION' => 'Version', + 'PROJECT_AUTHOR_ROLE' => 'Author role', + 'REALNAME' => 'Real name', + // Download 'PROJECT_DOWNLOAD' => 'Download', 'PROJECT_DOWNLOAD_EXPLAIN' => 'You want to download <strong>%s</strong>. Please specify the following and click the <strong>Download</strong> button to proceed.', 'PROJECT_ARCHIVETYPE' => 'Archive filetype', - 'REALNAME' => 'Real name', - - // Install levels 'PROJECT_LEVEL_ADVANCED' => 'Advanced', 'PROJECT_LEVEL_EASY' => 'Easy', @@ -120,6 +136,9 @@ 'ROLE_PROJECT_TEAM' => 'Can manage categories and roles and can approve projects', 'ROLE_PROJECT_USER' => 'Can browse and dwnload the project and read documentation', + // Trackers + 'PROJECT_ALL_CATEGORIES' => 'All categories', + // Installation stuff... 'PROJECT_INSTALL' => 'Install phpBB Project', @@ -138,6 +157,7 @@ 'PROJECT_INSTALL_MODULES_TITLE' => 'Create modules', 'PROJECT_INSTALL_MODULES_TEXT' => 'Modules created successfully!<br /><br />phpBB project is now installed. Click on the button below to view the overview directly, or %sgo back to the board index%s.', + 'PROJECT_PHP_VERSION_TOO_LOW' => 'The PHP version on your server is too low. PHP 5.0.0 or higher is required for phpBB Project', 'NOT_ALLOWED_INSTALL_PROJECT' => 'You are not allowed to install phpBB Project; only founders can install phpBB Project.', 'PROJECT_ALREADY_INSTALLED' => 'phpBB Project is already installed.', Modified: trunk/phpbb3/root/project_install/install_install.php =================================================================== --- trunk/phpbb3/root/project_install/install_install.php 2008-07-21 20:16:03 UTC (rev 282) +++ trunk/phpbb3/root/project_install/install_install.php 2008-07-22 21:59:06 UTC (rev 283) @@ -200,7 +200,7 @@ 'INSERT INTO ' . PROJECT_LICENSES_TABLE . " (license_title, license_acronym, license_description, license_text, license_url) VALUES ('GNU General Public License version 2', 'GPLv2', 'This is a short explanation of what the GPL is.... Well it should be anyway.', '$gpl_text', 'http://www.gnu.org/licenses/old-licenses/gpl-2.0.html')", 'INSERT INTO ' . PROJECT_LICENSES_TABLE . " (license_title, license_acronym, license_description, license_text, license_url) - VALUES ('Creative Commons ttribution 3.0', 'CC-BY 3.0', 'You are free: + VALUES ('Creative Commons Attribution 3.0', 'CC-BY 3.0', 'You are free: * to Share - to copy, distribute and transmit the work * to Remix - to adapt the work Modified: trunk/phpbb3/root/styles/prosilver/template/project_catlist.html =================================================================== --- trunk/phpbb3/root/styles/prosilver/template/project_catlist.html 2008-07-21 20:16:03 UTC (rev 282) +++ trunk/phpbb3/root/styles/prosilver/template/project_catlist.html 2008-07-22 21:59:06 UTC (rev 283) @@ -11,13 +11,13 @@ <ul class="topiclist forums"> <!-- BEGIN category_row --> <li class="row"> - <dl class="icon" style="background-image: url({category_row.FOLDER_IMG_SRC}); background-repeat: no-repeat;"> - <dt><a href="{category_row.U_CAT_URL}" class="forumtitle">{category_row.TITLE}</a><br /> - {category_row.DESCRIPTION} - <!-- IF .category_row.sub_category --> - <br /> - - <!-- ENDIF --> + <dl class="icon" style="background-image: url({category_row.CATEGORY_FOLDER_IMG_SRC}); background-repeat: no-repeat;"> + <dt title="category_row.CATEGORY_FOLDER_IMG_ALT"> + <!-- IF category_row.CATEGORY_IMAGE --><span class="forum-image">{category_row.CATEGORY_IMAGE}</span><!-- ENDIF --> + <a href="{category_row.U_CAT_URL}" class="forumtitle">{category_row.TITLE}</a><br /> + {category_row.DESCRIPTION} + <!-- IF category_row.SUBCATEGORIES and category_row.S_LIST_SUBCATEGORIES --><br /><strong>{category_row.L_SUBCATEGORY_STR}</strong> {category_row.SUBCATEGORIES}<!-- ENDIF --> + </dt> <dd class="topics">{category_row.PROJECTS}</dd> <dd class="lastpost"><span> <!-- IF category_row.S_LAST_UPDATE --><a href="{category_row.U_LAST_UPDATE}">{category_row.LAST_UPDATE_TITLE}</a> <br />{L_POSTED_ON_DATE} {category_row.LAST_UPDATE_TIME}<!-- ELSE --><span style="font-size: 1.2em; line-height: 2.2em">{L_PROJECT_NO_PROJECTS}</span><!-- ENDIF --></span> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-07-21 20:15:54
|
Revision: 282 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=282&view=rev Author: lord_le_brand Date: 2008-07-21 20:16:03 +0000 (Mon, 21 Jul 2008) Log Message: ----------- Update to MODX 1.2.0 (Might be unfinished?) Modified Paths: -------------- trunk/develop/todo_list.txt trunk/phpbb3/root/includes/sources_project/import_project.php Modified: trunk/develop/todo_list.txt =================================================================== --- trunk/develop/todo_list.txt 2008-05-06 01:36:46 UTC (rev 281) +++ trunk/develop/todo_list.txt 2008-07-21 20:16:03 UTC (rev 282) @@ -1,6 +1,5 @@ Todo list for phpBB Project -- Add /languages and /templates support to download (and import) class - Author ordering in MOD(X) file/project overview page - Definitive decision on storing versioned files - Generate filetree more efficiently (download class) Modified: trunk/phpbb3/root/includes/sources_project/import_project.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/import_project.php 2008-05-06 01:36:46 UTC (rev 281) +++ trunk/phpbb3/root/includes/sources_project/import_project.php 2008-07-21 20:16:03 UTC (rev 282) @@ -57,7 +57,7 @@ 'project_title' => $this->parser->mod_title, 'project_description' => $this->parser->mod_description, 'project_notes' => $this->parser->author_notes, - 'project_target_version' => serialize($this->parser->target_version_p), + 'project_target_version' => $this->parser->target_version, 'project_version' => $this->parser->mod_version, 'file_only' => 0, )); @@ -249,25 +249,19 @@ */ protected function process_history() { - $stages = array( - 'alpha' => PROJECT_STAGE_ALPHA, - 'beta' => PROJECT_STAGE_BETA, - 'release-candidate' => PROJECT_STAGE_RC, - 'gamma' => PROJECT_STAGE_RC, - 'delta' => PROJECT_STAGE_RC, - 'stable' => PROJECT_STAGE_STABLE, - '' => PROJECT_STAGE_DEV, - ); - for ($i = 0, $size = sizeof($this->parser->mod_history); $i < $size; $i++) { + $version = $this->parser->mod_history[$i]['version']; + preg_match('#(\d+)\.(\d+)\.(\d+)([a-z]?)#', $version, $matches); + + $this->history[] = array( 'version_time' => $this->parser->mod_history[$i]['time'], - 'version_major' => $this->parser->mod_history[$i]['version_p'][0], - 'version_minor' => $this->parser->mod_history[$i]['version_p'][1], - 'version_revision' => $this->parser->mod_history[$i]['version_p'][2], - 'version_release' => $this->parser->mod_history[$i]['version_p'][3], - 'version_stage' => $stages[$this->parser->mod_history[$i]['stage']], + 'version_major' => $matches[1], + 'version_minor' => $matches[2], + 'version_revision' => $matches[3], + 'version_release' => $matches[4], + 'version_version' => $version, 'version_changelog' => implode("\n", $this->parser->mod_history[$i]['changelog']), ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-05-06 01:36:42
|
Revision: 281 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=281&view=rev Author: lord_le_brand Date: 2008-05-05 18:36:46 -0700 (Mon, 05 May 2008) Log Message: ----------- This should now work... And should add some more transaction stuff... Modified Paths: -------------- trunk/phpbb3/root/includes/project/project_main.php trunk/phpbb3/root/project_install/install_install.php trunk/phpbb3/root/styles/prosilver/template/project_create.html Modified: trunk/phpbb3/root/includes/project/project_main.php =================================================================== --- trunk/phpbb3/root/includes/project/project_main.php 2008-05-06 00:23:24 UTC (rev 280) +++ trunk/phpbb3/root/includes/project/project_main.php 2008-05-06 01:36:46 UTC (rev 281) @@ -491,7 +491,7 @@ $template->assign_block_vars('project_description_row', array( 'ID' => $row['license_id'], - 'DESCRIPTION' => "<p>{$row['license_description']}</p>\n<p><a href=\"{$row['license_url']}\">{$row['license_url']}</a></p>", + 'DESCRIPTION' => '<p>' . str_replace(array('\'', "\n"), array('\\\'', '<br />'), $row['license_description']) . "</p><p><a href=\"{$row['license_url']}\">{$row['license_url']}</a></p>", )); } $db->sql_freeresult($result); Modified: trunk/phpbb3/root/project_install/install_install.php =================================================================== --- trunk/phpbb3/root/project_install/install_install.php 2008-05-06 00:23:24 UTC (rev 280) +++ trunk/phpbb3/root/project_install/install_install.php 2008-05-06 01:36:46 UTC (rev 281) @@ -157,10 +157,13 @@ 'user_email' => '', ); + $db->sql_transaction('begin'); + $bot_user_id = user_add($bot_userdata); if (!$bot_user_id) { + $db->sql_transaction('rollback'); trigger_error($user->lang['PROJECT_BOT_NOT_ADDED'], E_USER_WARNING); } @@ -178,6 +181,7 @@ if ($error_message_ary !== false) { + $db->sql_transaction('rollback'); trigger_error(implode("<br />\n", $error_message_ary)); } @@ -198,16 +202,16 @@ 'INSERT INTO ' . PROJECT_LICENSES_TABLE . " (license_title, license_acronym, license_description, license_text, license_url) VALUES ('Creative Commons ttribution 3.0', 'CC-BY 3.0', 'You are free: - * to Share \x97 to copy, distribute and transmit the work - * to Remix \x97 to adapt the work +* to Share - to copy, distribute and transmit the work +* to Remix - to adapt the work Under the following conditions: - * Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). +* Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). * For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. * Any of the above conditions can be waived if you get permission from the copyright holder. -* Nothing in this license impairs or restricts the author's moral rights.', '$cc_by_text', 'http://creativecommons.org/licenses/by/3.0/legalcode')", +* Nothing in this license impairs or restricts the author''s moral rights.', '$cc_by_text', 'http://creativecommons.org/licenses/by/3.0/legalcode')", 'INSERT INTO ' . PROJECT_AUTHORS_TABLE . " (author_id, author_username, author_realname, author_email, author_website) VALUES ({$user->data['user_id']}, '{$user->data['username']}', '', '{$user->data['user_email']}', '{$user->data['user_website']}')", 'INSERT INTO ' . ACL_GROUPS_TABLE . " (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) @@ -223,9 +227,12 @@ if ($error_message) { + $db->sql_transaction('rollback'); trigger_error($error_message); } + $db->sql_transaction('commit'); + $template->assign_vars(array( 'INSTALL_TEXT' => $user->lang['PROJECT_INSTALL_CONFIG_TEXT'], 'U_NEXT' => append_sid("index.$phpEx", 'i=install&mode=modules'), Modified: trunk/phpbb3/root/styles/prosilver/template/project_create.html =================================================================== --- trunk/phpbb3/root/styles/prosilver/template/project_create.html 2008-05-06 00:23:24 UTC (rev 280) +++ trunk/phpbb3/root/styles/prosilver/template/project_create.html 2008-05-06 01:36:46 UTC (rev 281) @@ -3,11 +3,12 @@ <script type="text/javascript"> function project_set_description(element_id, description_id) { - var descriptions = array(); - <!-- BEGIN project_descriptions_row --> - descriptions[{project_descriptions_row.ID}] = '{project_descriptions_row.DESCRIPTION}';<!-- END project_descriptions_row --> + var descriptions = Array; + <!-- BEGIN project_description_row --> + descriptions[{project_description_row.ID}] = '{project_description_row.DESCRIPTION}'; + <!-- END project_description_row --> - var element = getElementById(element_id); + var element = document.getElementById(element_id); element.innerHTML = descriptions[description_id]; } </script> @@ -41,12 +42,13 @@ </dl> <dl> <dt><label for="project_license">{L_PROJECT_LICENSE}:</label></dt> - <dd><select tabindex="5" name="project_license" id="project_license" title="{L_PROJECT_LICENSE}" onchange="set_description('license_description', this.value)"> - {LICENSE_SELECT} - </select> - <!--noscript><input type="submit" name="license_description" value="{L_PROJECT_DISPLAY_LICENSE_DESC}" class="button2" /></noscript--> - <div id="license_description"><p>{LICENSE_DESCRIPTION}</p> - <p><a href="{LICENSE_URL}">{LICENSE_URL}</a></p></div></dd> + <dd><select tabindex="5" name="project_license" id="project_license" title="{L_PROJECT_LICENSE}" onchange="project_set_description('license_description', this.value)"> + {LICENSE_SELECT} + </select> + <!--noscript><input type="submit" name="license_description" value="{L_PROJECT_DISPLAY_LICENSE_DESC}" class="button2" /></noscript--> + <div id="license_description"><p>{LICENSE_DESCRIPTION}</p> + <p><a href="{LICENSE_URL}">{LICENSE_URL}</a></p></div> + </dd> </dl> <dl> <dt><label for="file_only">{L_PROJECT_FILE_ONLY}:</label><br /><span>{L_PROJECT_FILE_ONLY_EXPLAIN}</span></dt> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-05-06 00:23:17
|
Revision: 280 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=280&view=rev Author: lord_le_brand Date: 2008-05-05 17:23:24 -0700 (Mon, 05 May 2008) Log Message: ----------- whoops , forgot to update sql file =/ Modified Paths: -------------- trunk/phpbb3/root/project_install/schemas/mysql_41_schema.sql Modified: trunk/phpbb3/root/project_install/schemas/mysql_41_schema.sql =================================================================== --- trunk/phpbb3/root/project_install/schemas/mysql_41_schema.sql 2008-05-06 00:21:55 UTC (rev 279) +++ trunk/phpbb3/root/project_install/schemas/mysql_41_schema.sql 2008-05-06 00:23:24 UTC (rev 280) @@ -15,15 +15,6 @@ ) CHARACTER SET `utf8` COLLATE `utf8_bin`; -# Table: 'phpbb_project_project_authors' -CREATE TABLE phpbb_project_project_authors ( - project_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - author_role mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (project_id, author_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - # Table: 'phpbb_project_categories' CREATE TABLE phpbb_project_categories ( category_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -150,22 +141,36 @@ ) CHARACTER SET `utf8` COLLATE `utf8_bin`; -# Table: 'phpbb_project_tracker_entries' -CREATE TABLE phpbb_project_tracker_entries ( - entry_id int(11) UNSIGNED NOT NULL auto_increment, +# Table: 'phpbb_project_tracker_tickets' +CREATE TABLE phpbb_project_tracker_tickets ( + ticket_id int(11) UNSIGNED NOT NULL auto_increment, tracker_id int(11) UNSIGNED DEFAULT '0' NOT NULL, tracker_category int(11) UNSIGNED DEFAULT '0' NOT NULL, - entry_title varchar(100) DEFAULT '' NOT NULL, - entry_description mediumtext NOT NULL, - entry_status smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - entry_author mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - entry_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (entry_id), + ticket_title varchar(100) DEFAULT '' NOT NULL, + ticket_description mediumtext NOT NULL, + ticket_status smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + ticket_author mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + ticket_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (ticket_id), KEY tracker_id (tracker_id), KEY tracker_category (tracker_category) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; +# Table: 'phpbb_project_tracker_comments' +CREATE TABLE phpbb_project_tracker_comments ( + comment_id int(11) UNSIGNED NOT NULL auto_increment, + ticket_id int(11) UNSIGNED DEFAULT '0' NOT NULL, + comment_title varchar(100) DEFAULT '' NOT NULL, + comment_text text NOT NULL, + comment_author mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + comment_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (comment_id), + KEY ticket_id (ticket_id), + KEY comment_time (comment_time) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + # Table: 'phpbb_project_search_wordmatch' CREATE TABLE phpbb_project_search_wordmatch ( project_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, @@ -212,9 +217,8 @@ license_id tinyint(3) NOT NULL auto_increment, license_title varchar(100) DEFAULT '' NOT NULL, license_acronym varchar(15) DEFAULT '' NOT NULL, + license_description text NOT NULL, license_text mediumtext NOT NULL, license_url varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (license_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-05-06 00:21:50
|
Revision: 279 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=279&view=rev Author: lord_le_brand Date: 2008-05-05 17:21:55 -0700 (Mon, 05 May 2008) Log Message: ----------- added license + descriptions to installer added javascript (needs testing) Modified Paths: -------------- trunk/phpbb3/root/includes/project/project_main.php trunk/phpbb3/root/project_install/install_install.php trunk/phpbb3/root/styles/prosilver/template/project_create.html Added Paths: ----------- trunk/phpbb3/root/project_install/licenses/ trunk/phpbb3/root/project_install/licenses/cc_by.txt trunk/phpbb3/root/project_install/licenses/gpl.txt Modified: trunk/phpbb3/root/includes/project/project_main.php =================================================================== --- trunk/phpbb3/root/includes/project/project_main.php 2008-05-05 20:53:25 UTC (rev 278) +++ trunk/phpbb3/root/includes/project/project_main.php 2008-05-06 00:21:55 UTC (rev 279) @@ -479,7 +479,7 @@ $category_select[$categories[$i]['category_id']] = str_repeat($padding_delimiter, $padding) . $categories[$i]['category_title']; } - $sql = 'SELECT license_id, license_title + $sql = 'SELECT license_id, license_title, license_description, license_url FROM ' . PROJECT_LICENSES_TABLE; $result = $db->sql_query($sql, 604800); @@ -487,19 +487,24 @@ while ($row = $db->sql_fetchrow($result)) { $license_select[$row['license_id']] = $row['license_title']; + $license_info[$row['license_id']] = $row; + + $template->assign_block_vars('project_description_row', array( + 'ID' => $row['license_id'], + 'DESCRIPTION' => "<p>{$row['license_description']}</p>\n<p><a href=\"{$row['license_url']}\">{$row['license_url']}</a></p>", + )); } $db->sql_freeresult($result); - /** - * @todo Add description javascript + query - */ + $category_id = (isset($data['category_id'])) ? $data['category_id'] : 0; + $license_id = (isset($data['project_license'])) ? $data['project_license'] : 0; + $selected_license = ($license_id) ? $license_id : array_shift(array_keys($license_select)); - $category_id = (isset($data['category_id'])) ? $data['category_id'] : 0; - $license_id = (isset($data['project_license'])) ? $data['project_license'] : 0; - $template->assign_vars(array( - 'CATEGORY_SELECT' => project_build_select($category_select, $category_id), - 'LICENSE_SELECT' => project_build_select($license_select, $license_id), + 'CATEGORY_SELECT' => project_build_select($category_select, $category_id), + 'LICENSE_SELECT' => project_build_select($license_select, $license_id), + 'LICENSE_DESCRIPTION' => $license_info[$selected_license]['license_description'], + 'LICENSE_URL' => $license_info[$selected_license]['license_url'], )); add_form_key('project_create'); Modified: trunk/phpbb3/root/project_install/install_install.php =================================================================== --- trunk/phpbb3/root/project_install/install_install.php 2008-05-05 20:53:25 UTC (rev 278) +++ trunk/phpbb3/root/project_install/install_install.php 2008-05-06 00:21:55 UTC (rev 279) @@ -164,8 +164,10 @@ trigger_error($user->lang['PROJECT_BOT_NOT_ADDED'], E_USER_WARNING); } - $gpl_text = file_get_contents('../docs/COPYING'); + $gpl_text = file_get_contents('licenses/gpl.txt'); $gpl_text = $db->sql_escape($gpl_text); + $cc_by_text = file_get_contents('licenses/cc_by.txt'); + $cc_by_text = $db->sql_escape($cc_by_text); set_config('project_install_date', $current_time); set_config('phpbbproject_version', PROJECT_CURRENT_VERSION); @@ -191,12 +193,23 @@ $manager_role_id = $db->sql_fetchfield('role_id', 1); $sql_ary = array( - 'INSERT INTO ' . PROJECT_LICENSES_TABLE . " (license_title, license_acronym, license_text, license_url) - VALUES ('GNU General Public License version 2', 'GPLv2', '$gpl_text', 'http://www.gnu.org/licenses/old-licenses/gpl-2.0.html')", + 'INSERT INTO ' . PROJECT_LICENSES_TABLE . " (license_title, license_acronym, license_description, license_text, license_url) + VALUES ('GNU General Public License version 2', 'GPLv2', 'This is a short explanation of what the GPL is.... Well it should be anyway.', '$gpl_text', 'http://www.gnu.org/licenses/old-licenses/gpl-2.0.html')", + 'INSERT INTO ' . PROJECT_LICENSES_TABLE . " (license_title, license_acronym, license_description, license_text, license_url) + VALUES ('Creative Commons ttribution 3.0', 'CC-BY 3.0', 'You are free: + + * to Share \x97 to copy, distribute and transmit the work + * to Remix \x97 to adapt the work + +Under the following conditions: + + * Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). + +* For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. +* Any of the above conditions can be waived if you get permission from the copyright holder. +* Nothing in this license impairs or restricts the author's moral rights.', '$cc_by_text', 'http://creativecommons.org/licenses/by/3.0/legalcode')", 'INSERT INTO ' . PROJECT_AUTHORS_TABLE . " (author_id, author_username, author_realname, author_email, author_website) VALUES ({$user->data['user_id']}, '{$user->data['username']}', '', '{$user->data['user_email']}', '{$user->data['user_website']}')", - 'INSERT INTO ' . PROJECT_PROJECT_AUTHORS_TABLE . " (project_id, author_id, author_role) - VALUES (1, {$user->data['user_id']}, $manager_role_id)", 'INSERT INTO ' . ACL_GROUPS_TABLE . " (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES ($team_group_id, 0, 0, $team_role_id, 0)", ); Added: trunk/phpbb3/root/project_install/licenses/cc_by.txt =================================================================== --- trunk/phpbb3/root/project_install/licenses/cc_by.txt (rev 0) +++ trunk/phpbb3/root/project_install/licenses/cc_by.txt 2008-05-06 00:21:55 UTC (rev 279) @@ -0,0 +1,70 @@ + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + 1. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. + 2. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. + 3. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. + 4. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. + 5. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. + 6. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. + 7. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + 8. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. + 9. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + + 1. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; + 2. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; + 3. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, + 4. to Distribute and Publicly Perform Adaptations. + 5. + + For the avoidance of doubt: + 1. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; + 2. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, + 3. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + 1. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested. + 2. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. + 3. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + 1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + 2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous + + 1. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + 2. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + 3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + 4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + 5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. + 6. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. + + Creative Commons Notice + + Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + + Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License. + + Creative Commons may be contacted at http://creativecommons.org/. \ No newline at end of file Added: trunk/phpbb3/root/project_install/licenses/gpl.txt =================================================================== --- trunk/phpbb3/root/project_install/licenses/gpl.txt (rev 0) +++ trunk/phpbb3/root/project_install/licenses/gpl.txt 2008-05-06 00:21:55 UTC (rev 279) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Modified: trunk/phpbb3/root/styles/prosilver/template/project_create.html =================================================================== --- trunk/phpbb3/root/styles/prosilver/template/project_create.html 2008-05-05 20:53:25 UTC (rev 278) +++ trunk/phpbb3/root/styles/prosilver/template/project_create.html 2008-05-06 00:21:55 UTC (rev 279) @@ -1,5 +1,17 @@ <!-- INCLUDE project_header.html --> +<script type="text/javascript"> +function project_set_description(element_id, description_id) +{ + var descriptions = array(); + <!-- BEGIN project_descriptions_row --> + descriptions[{project_descriptions_row.ID}] = '{project_descriptions_row.DESCRIPTION}';<!-- END project_descriptions_row --> + + var element = getElementById(element_id); + element.innerHTML = descriptions[description_id]; +} +</script> + <h2>{L_PROJECT_CREATE_PROJECT}</h2> <form id="project_create" action="{U_ACTION}" method="post"{S_FORM_ENCTYPE}> @@ -29,11 +41,12 @@ </dl> <dl> <dt><label for="project_license">{L_PROJECT_LICENSE}:</label></dt> - <dd><select tabindex="5" name="project_license" id="project_license" title="{L_PROJECT_LICENSE}" onchange="set_description(this.value)"> + <dd><select tabindex="5" name="project_license" id="project_license" title="{L_PROJECT_LICENSE}" onchange="set_description('license_description', this.value)"> {LICENSE_SELECT} </select> - <!--noscript><input type="submit" name="license_description" value="{L_PROJECT_DISPLAY_LICENSE_DESC}" class="button2" /></noscript> - <span id="license_description">{LICENSE_DESCRIPTION}</span--></dd> + <!--noscript><input type="submit" name="license_description" value="{L_PROJECT_DISPLAY_LICENSE_DESC}" class="button2" /></noscript--> + <div id="license_description"><p>{LICENSE_DESCRIPTION}</p> + <p><a href="{LICENSE_URL}">{LICENSE_URL}</a></p></div></dd> </dl> <dl> <dt><label for="file_only">{L_PROJECT_FILE_ONLY}:</label><br /><span>{L_PROJECT_FILE_ONLY_EXPLAIN}</span></dt> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-05-05 20:53:23
|
Revision: 278 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=278&view=rev Author: lord_le_brand Date: 2008-05-05 13:53:25 -0700 (Mon, 05 May 2008) Log Message: ----------- more structure on trackers Modified Paths: -------------- trunk/phpbb3/root/includes/project/project_trackers.php Modified: trunk/phpbb3/root/includes/project/project_trackers.php =================================================================== --- trunk/phpbb3/root/includes/project/project_trackers.php 2008-05-05 19:20:09 UTC (rev 277) +++ trunk/phpbb3/root/includes/project/project_trackers.php 2008-05-05 20:53:25 UTC (rev 278) @@ -102,8 +102,8 @@ $num_tickets = $db->sql_fetchfield('num_tickets', false, $result); $db->sql_freeresult($result); - $sql = 'SELECT t.*, c.*, s.* - FROM ' . PROJECT_TRACKER_TICKETS_TABLE . ' t, ' . PROJECT_TRACKER_CATEGORIES_TABLE . ' c, ' . PROJECT_TRACKER_STATUS_TABLE . " s + $sql = 'SELECT t.*, c.*, s.*, COUNT(tc.*) as num_comments + FROM ' . PROJECT_TRACKER_TICKETS_TABLE . ' t, ' . PROJECT_TRACKER_CATEGORIES_TABLE . ' c, ' . PROJECT_TRACKER_STATUS_TABLE . ' s, ' . PROJECT_TRACKER_COMMENTS_TABLE . " tc WHERE t.tracker_id = $tracker_id " . (($tracker_category) ? "AND t.tracker_category = $tracker_category" : '') . ' AND c.category_id = t.tracker_category @@ -137,6 +137,7 @@ 'TICKET_STATUS' => $tickets[$i]['tracker_status_title'], 'TICKET_AUTHOR' => get_username_string('full', $tickets[$i]['ticket_author'], project_get_author_name($tickets[$i]['ticket_author'])), 'TICKET_TIME' => $user->format_date($tickets[$i]['ticket_time']), + 'NUM_COMMENTS' => $tickets[$i]['num_comments'], 'U_VIEW_TICKET' => _module_trackers_url(append_sid(PROJECT_BASE_URL, "i=trackers&mode=ticket&ticket={$trackers[$i]['ticket_id']}")), )); @@ -271,7 +272,25 @@ case 'comment': + switch ($action) + { + case 'quote': + // Fetch quoted post(s) + + case 'new': + + break; + + case 'edit': + + break; + + case 'delete': + + break; + } + break; // Manage trackers This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-05-05 19:20:09
|
Revision: 277 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=277&view=rev Author: lord_le_brand Date: 2008-05-05 12:20:09 -0700 (Mon, 05 May 2008) Log Message: ----------- Rearrage trackers module Added license_description Use project_build_select() for categories and licenses Modified Paths: -------------- trunk/develop/create_schema_files_phpbb3.php trunk/develop/todo_list.txt trunk/phpbb3/root/includes/project/project_main.php trunk/phpbb3/root/includes/project/project_trackers.php trunk/phpbb3/root/styles/prosilver/template/project_create.html Modified: trunk/develop/create_schema_files_phpbb3.php =================================================================== --- trunk/develop/create_schema_files_phpbb3.php 2008-05-04 00:34:46 UTC (rev 276) +++ trunk/develop/create_schema_files_phpbb3.php 2008-05-05 19:20:09 UTC (rev 277) @@ -1100,11 +1100,12 @@ $schema_data['phpbb_project_licenses'] = array( 'COLUMNS' => array( - 'license_id' => array('TINT:3', NULL, 'auto_increment'), - 'license_title' => array('XSTEXT_UNI', ''), - 'license_acronym' => array('VCHAR:15', ''), - 'license_text' => array('MTEXT_UNI', ''), - 'license_url' => array('STEXT_UNI', ''), + 'license_id' => array('TINT:3', NULL, 'auto_increment'), + 'license_title' => array('XSTEXT_UNI', ''), + 'license_acronym' => array('VCHAR:15', ''), + 'license_description' => array('TEXT_UNI', ''), + 'license_text' => array('MTEXT_UNI', ''), + 'license_url' => array('STEXT_UNI', ''), ), 'PRIMARY_KEY' => 'license_id', ); Modified: trunk/develop/todo_list.txt =================================================================== --- trunk/develop/todo_list.txt 2008-05-04 00:34:46 UTC (rev 276) +++ trunk/develop/todo_list.txt 2008-05-05 19:20:09 UTC (rev 277) @@ -1,7 +1,5 @@ Todo list for phpBB Project -- Make a TODO tracker!!! -- When at it make a bug tracker and feature tracker :) - Add /languages and /templates support to download (and import) class - Author ordering in MOD(X) file/project overview page - Definitive decision on storing versioned files @@ -17,7 +15,12 @@ - Manage project - Diff generator - Docs (perhaps wiki-style?) - - Trackers script++ (also needed for this todo list, so step on it! xD) + - Trackers script + - Ticket actions + - Comments + - Manage actions + - Info file + - Template files - Projects Team CP (maybe a new *CP?) - Marx - Search Modified: trunk/phpbb3/root/includes/project/project_main.php =================================================================== --- trunk/phpbb3/root/includes/project/project_main.php 2008-05-04 00:34:46 UTC (rev 276) +++ trunk/phpbb3/root/includes/project/project_main.php 2008-05-05 19:20:09 UTC (rev 277) @@ -456,7 +456,7 @@ */ $category_ids = '1 = 1'; - $sql = 'SELECT * + $sql = 'SELECT category_id, category_title FROM ' . PROJECT_CATEGORIES_TABLE . " WHERE $category_ids ORDER BY left_id ASC"; @@ -467,7 +467,7 @@ $parent_id = 0; $padding = 0; - $padding_delimiter = '--'; + $padding_delimiter = ' '; for ($i = 0, $size = sizeof($categories); $i < $size; $i++) { @@ -476,30 +476,32 @@ $padding += ($categories[$i]['parent_id'] == $categories[$i-1]['category_id']) ? 1 : -1; } - $template->assign_block_vars('category', array( - 'CATEGORY_ID' => $categories[$i]['category_id'], - 'CATEGORY_TITLE' => str_repeat($padding_delimiter, $padding) . $categories[$i]['category_title'], - )); + $category_select[$categories[$i]['category_id']] = str_repeat($padding_delimiter, $padding) . $categories[$i]['category_title']; } $sql = 'SELECT license_id, license_title FROM ' . PROJECT_LICENSES_TABLE; $result = $db->sql_query($sql, 604800); - $licenses = $db->sql_fetchrowset($result); - $db->sql_freeresult($result); - for ($i = 0, $size = sizeof($licenses); $i < $size; $i++) + $license_select = array(); + while ($row = $db->sql_fetchrow($result)) { - $template->assign_block_vars('license', array( - 'LICENSE_ID' => $licenses[$i]['license_id'], - 'LICENSE_TITLE' => $licenses[$i]['license_title'], - )); + $license_select[$row['license_id']] = $row['license_title']; } + $db->sql_freeresult($result); /** * @todo Add description javascript + query */ + $category_id = (isset($data['category_id'])) ? $data['category_id'] : 0; + $license_id = (isset($data['project_license'])) ? $data['project_license'] : 0; + + $template->assign_vars(array( + 'CATEGORY_SELECT' => project_build_select($category_select, $category_id), + 'LICENSE_SELECT' => project_build_select($license_select, $license_id), + )); + add_form_key('project_create'); $this->tpl_name = 'project_create'; Modified: trunk/phpbb3/root/includes/project/project_trackers.php =================================================================== --- trunk/phpbb3/root/includes/project/project_trackers.php 2008-05-04 00:34:46 UTC (rev 276) +++ trunk/phpbb3/root/includes/project/project_trackers.php 2008-05-05 19:20:09 UTC (rev 277) @@ -43,6 +43,7 @@ $tracker_category = request_var('tcat', 0); $ticket_id = request_var('ticket', 0); $start = request_var('start', 0); + $action = request_var('action', ''); $sql = 'SELECT project_title FROM ' . PROJECT_PROJECTS_TABLE . " @@ -56,17 +57,15 @@ switch ($mode) { default: - case 'overview': + case 'main': // Get trackers for this project - $sql = 'SELECT t.*, types.*, COUNT(tc.*) AS tracker_categories, COUNT(tickets.*) AS tracker_tickets - FROM ' . PROJECT_TRACKERS_TABLE . ' t, ' . PROJECT_TRACKER_TYPES_TABLE . ' types, ' . PROJECT_TRACKER_CATEGORIES_TABLE . ' tc, ' . PROJECT_TRACKER_ENTRIES_TABLE . " tickets + $sql = 'SELECT t.*, ty.* + FROM ' . PROJECT_TRACKERS_TABLE . ' t, ' . PROJECT_TRACKER_TYPES_TABLE . " ty WHERE t.project_id = $project_id - AND types.tracker_type_id = t.tracker_type - AND tickets.tracker_id = t.tracker_id - AND tc.tracker_id = t.tracker_id + AND ty.tracker_type_id = t.tracker_type GROUP BY t.tracker_id - ORDER BY types.tracker_type_title ASC"; + ORDER BY ty.tracker_type_title ASC"; $result = $db->sql_query($sql, 604800); $trackers = $db->sql_fetchrowset($result); @@ -77,43 +76,22 @@ $template->assign_block_vars('tracker_row', array( 'TRACKER_TITLE' => $trackers[$i]['tracker_type_title'], 'TRACKER_DESCRIPTION' => $trackers[$i]['tracker_type_description'], - 'TRACKER_TICKETS' => $trackers[$i]['tracker_tickets'], - 'TRACKER_CATEGORIES' => $trackers[$i]['tracker_categories'], - 'U_TRACKER' => append_sid(PROJECT_BASE_URL, "i=trackers&mode=tickets&tid={$trackers[$i]['tracker_id']}"), + 'U_TRACKER' => _module_trackers_url(append_sid(PROJECT_BASE_URL, "i=trackers&mode=tracker&tid={$trackers[$i]['tracker_id']}")), )); } break; - case 'tickets': + case 'tracker': // Just redirect if $tracker_id is 0 if (!$tracker_id) { - $url_extra = _module_trackers_url('tickets', array()); - redirect(append_sid(PROJECT_BASE_URL, "i=trackers&mode=overview")); + $url_extra = _module_trackers_url('tracker', array()); + redirect(_module_trackers_url(append_sid(PROJECT_BASE_URL, 'i=trackers&mode=main'))); } - if ($tracker_category) - { - $sql = 'SELECT * - FROM ' . PROJECT_TRACKER_CATEGORIES_TABLE . " - WHERE category_id = $tracker_category"; - $result = $db->sql_query($sql, 604800); - $category_info = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - if ($category_info['is_private'] && !$is_author) - { - // @todo some error... - } - - $template->assign_vars(array( - // @todo stuff... - )); - } - $sql = 'SELECT COUNT(t.*) AS num_tickets FROM ' . PROJECT_TRACKER_TICKETS_TABLE . ' t, ' . PROJECT_TRACKER_CATEGORIES_TABLE . " c WHERE t.tracker_id = $tracker_id @@ -136,6 +114,21 @@ $tickets = $db->sql_fetchrowset($result); $db->sql_freeresult($result); + // Get category dropdown + $sql = 'SELECT * + FROM ' . PROJECT_TRACKER_CATEGORIES_TABLE . " + WHERE tracker_id = $tracker_id" . ((!$is_author) ? ' AND is_private = 0' : ''); + $result = $db->sql_query($sql, 604800); + + $category_select = array($user->lang['PROJECT_ALL_CATEGORIES']); + while ($row = $db->sql_fetchrow($result)) + { + $category_select[$row['category_id']] = $row['category_title']; + } + $db->sql_freeresult($result); + + $category_select = project_build_select($category_select, $category_id); + for ($i = 0, $size = sizeof($tickets); $i < $size; $i++) { $template->assign_block_vars('ticket_row', array( @@ -145,132 +138,169 @@ 'TICKET_AUTHOR' => get_username_string('full', $tickets[$i]['ticket_author'], project_get_author_name($tickets[$i]['ticket_author'])), 'TICKET_TIME' => $user->format_date($tickets[$i]['ticket_time']), - 'U_VIEW_TICKET' => append_sid(PROJECT_BASE_URL, "i=trackers&mode=view_ticket&tid=$tracker_id&ticket={$trackers[$i]['ticket_id']}"), + 'U_VIEW_TICKET' => _module_trackers_url(append_sid(PROJECT_BASE_URL, "i=trackers&mode=ticket&ticket={$trackers[$i]['ticket_id']}")), )); } - $pagination = generate_pagination(append_sid(PROJECT_BASE_URL, "i=trackers&mode=tickets" . _module_trackers_url('tickets', array())), $num_tickets, $config['project_tracker_tickets_per_page'], $start); + $pagination = generate_pagination(_module_trackers_url(append_sid(PROJECT_BASE_URL, "i=trackers&mode=tracker" . 'tracker', array())), $num_tickets, $config['project_tracker_tickets_per_page'], $start); break; - case 'view_ticket': + case 'ticket': if (!$ticket_id) { if ($tracker_id) { - redirect(append_sid(PROJECT_BASE_URL, 'i=trackers&mode=tickets' . _module_trackers_url('tickets', array()))); + redirect(_module_trackers_url(append_sid(PROJECT_BASE_URL, 'i=trackers&mode=tracker' . 'tracker', array()))); } else { - redirect(append_sid(PROJECT_BASE_URL, 'i=trackers&mode=overview')); + redirect(_module_trackers_url(append_sid(PROJECT_BASE_URL, 'i=trackers&mode=main'))); } } - // Display: Full ticket, category title, tracker (type) title, ticket status, author - // OMFG! See the size of this baby O_O; - $sql = 'SELECT t.*, c.category_title, c.is_private, type.tracker_type_title, tracker.tracker_id, s.*, u.username, u.user_colour - FROM ' . PROJECT_TRACKER_TICKETS_TABLE . ' t, ' . PROJECT_TRACKER_CATEGORIES_TABLE . ' c, ' . PROJECT_TRACKERS_TABLE . ' tracker, ' . PROJECT_TRACKER_TYPES_TABLE . ' tt, ' . PROJECT_TRACKER_STATUS_TABLE . ' s, ' . USERS_TABLE . " u - WHERE t.ticket_id = $ticket_id - AND c.category_id = t.tracker_category - AND type.tracker_type_id = tracker.tracker_type - AND tracker_tracker_id = t.tracker_id - AND s.status_id = t.ticket_status - AND u.user_id = t.ticket_author"; - $result = $db->sql_query($sql, 604800); - $ticket_info = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - if ($ticket_info['is_private'] && !$is_author) + switch ($action) { - // @todo Die, you hacker! - } + default: - $sql = 'SELECT COUNT(*) AS num_comments - FROM ' . PROJECT_TRACKER_COMMENTS_TABLE . " - WHERE ticket_id = $ticket_id"; - $result = $db->sql_query($sql, 604800); - $num_comments = $db->sql_fetchfield('num_comments', false, $result); - $db->sql_freeresult($result); + // Display: Full ticket, category title, tracker (type) title, ticket status, author + // OMFG! See the size of this baby O_O; + $sql = 'SELECT t.*, c.category_title, c.is_private, type.tracker_type_title, tracker.tracker_id, s.*, u.username, u.user_colour, COUNT(tc.*) as num_comments + FROM ' . PROJECT_TRACKER_TICKETS_TABLE . ' t, ' . PROJECT_TRACKER_CATEGORIES_TABLE . ' c, ' . PROJECT_TRACKERS_TABLE . ' tracker, ' . PROJECT_TRACKER_TYPES_TABLE . ' tt, ' . PROJECT_TRACKER_STATUS_TABLE . ' s, ' . USERS_TABLE . ' u, ' . PROJECT_TRACKER_COMMENTS_TABLE . " tc + WHERE t.ticket_id = $ticket_id + AND c.category_id = t.tracker_category + AND type.tracker_type_id = tracker.tracker_type + AND tracker_tracker_id = t.tracker_id + AND s.status_id = t.ticket_status + AND u.user_id = t.ticket_author + AND tc.ticket_id = t.ticket_id + GROUP BY t.ticket_id"; + $result = $db->sql_query($sql, 604800); + $ticket_info = $db->sql_fetchrow($result); + $db->sql_freeresult($result); - $sql = 'SELECT c.*, u.username, u.user_colour - FROM ' . PROJECT_TRACKER_COMMENTS_TABLE . ' c, ' . USERS_TABLE . " u - WHERE c.ticket_id = $ticket_id - ORDER BY c.comment_time ASC"; - $result = $db->sql_query_limit($sql, $config['project_tracker_comments_per_page'], $start, 86400); - $comments = $db->sql_fetchrowset($result); - $db->sql_freeresult($result); + if ($ticket_info['is_private'] && !$is_author) + { + // @todo Die, you hacker! + } - for ($i = 0, $size = sizeof($comments); $i < $size; $i++) - { - $template->assign_block_vars('comment_row', array( - 'COMMENT_TITLE' => $comments[$i]['comment_title'], - 'COMMENT_TEXT' => $comments[$i]['comment_text'], - 'COMMENT_DATE' => $user->format_date($comments[$i]['comment_time']), - 'COMMENT_AUTHOR' => get_username_string('full', $comments[$i]['comment_author'], $comments[$i]['username'], $comments[$i]['user_colour']), - )); - } + $sql = 'SELECT c.*, u.username, u.user_colour + FROM ' . PROJECT_TRACKER_COMMENTS_TABLE . ' c, ' . USERS_TABLE . " u + WHERE c.ticket_id = $ticket_id + ORDER BY c.comment_time ASC"; + $result = $db->sql_query_limit($sql, $config['project_tracker_comments_per_page'], $start, 86400); + $comments = $db->sql_fetchrowset($result); + $db->sql_freeresult($result); - $template->assign_vars(array( - 'TRACKER_TITLE' => $ticket_info['tracker_title'], - 'CATEGORY_TITLE' => $ticket_info['category_title'], + for ($i = 0, $size = sizeof($comments); $i < $size; $i++) + { + $template->assign_block_vars('comment_row', array( + 'COMMENT_TITLE' => $comments[$i]['comment_title'], + 'COMMENT_TEXT' => $comments[$i]['comment_text'], + 'COMMENT_DATE' => $user->format_date($comments[$i]['comment_time']), + 'COMMENT_AUTHOR' => get_username_string('full', $comments[$i]['comment_author'], $comments[$i]['username'], $comments[$i]['user_colour']), + )); + } - 'TICKET_TITLE' => $ticket_info['ticket_title'], - 'TICKET_DESCRIPTION' => $ticket_info['ticket_description'], - 'TICKET_DATE' => $user->format_date($ticket_info['ticket_time']), - 'TICKET_AUTHOR' => get_username_string('full', $ticket_info['ticket_author'], $ticket_info['username'], $ticket_info['user_colour']), - 'TICKET_STATUS' => $ticket_info['status_title'], + $template->assign_vars(array( + 'TRACKER_TITLE' => $ticket_info['tracker_title'], + 'CATEGORY_TITLE' => $ticket_info['category_title'], - 'PAGINATION' => $pagination, - )); + 'TICKET_TITLE' => $ticket_info['ticket_title'], + 'TICKET_DESCRIPTION' => $ticket_info['ticket_description'], + 'TICKET_DATE' => $user->format_date($ticket_info['ticket_time']), + 'TICKET_AUTHOR' => get_username_string('full', $ticket_info['ticket_author'], $ticket_info['username'], $ticket_info['user_colour']), + 'TICKET_STATUS' => $ticket_info['status_title'], - // @todo Commenting stuff + 'PAGINATION' => $pagination, + )); - break; + break; - case 'add_ticket': + case 'new': - if (isset($_POST['submit'])) - { - // Check data and insert + if (isset($_POST['submit'])) + { + // Check data and insert + } + + // General tracker data + $sql = 'SELECT ty.tracker_type_title + FROM ' . PROJECT_TRACKER_TYPES_TABLE . ' ty, ' . PROJECT_TRACKERS_TABLE . " tr + WHERE ty.tracker_type_id = tr.tracker_type + AND tr.tracker_id = $tracker_id"; + $result = $db->sql_query($sql, 604800); + $tracker_title = $db->sql_fetchfield('tracker_type_title', false, $result); + $db->sql_freeresult($result); + + // Get category dropdown + $sql = 'SELECT * + FROM ' . PROJECT_TRACKER_CATEGORIES_TABLE . " + WHERE tracker_id = $tracker_id" . ((!$is_author) ? ' AND is_private = 0' : ''); + $result = $db->sql_query($sql, 604800); + + while ($row = $db->sql_fetchrow($result)) + { + $category_select[$row['category_id']] = $row['category_title']; + } + $db->sql_freeresult($result); + + $template->assign_vars(array( + 'PROJECT_TITLE' => $project_title, + 'TRACKER_TITLE' => $tracker_title, + + 'CATEGORIES_SELECT' => project_build_select($category_select, $category_id), + 'U_ACTION' => $this->u_action . '&action=new', + )); + + break; + + case 'edit': + + + break; + + case 'delete': + + + break; } - // General tracker data - $sql = 'SELECT ty.tracker_type_title - FROM ' . PROJECT_TRACKER_TYPES_TABLE . ' ty, ' . PROJECT_TRACKERS_TABLE . " tr - WHERE ty.tracker_type_id = tr.tracker_type - AND tr.tracker_id = $tracker_id"; - $result = $db->sql_query($sql, 604800); - $tracker_title = $db->sql_fetchfield('tracker_type_title', false, $result); - $db->sql_freeresult($result); + break; - // Get category dropdown - $sql = 'SELECT * - FROM ' . PROJECT_TRACKER_CATEGORIES_TABLE . " - WHERE tracker_id = $tracker_id" . ((!$is_author) ? ' AND is_private = 0' : ''); - $result = $db->sql_query($sql, 604800); + case 'comment': - while ($row = $db->sql_fetchrow($result)) + + break; + + // Manage trackers + case 'manage': + + switch ($action) { - $category_select[$row['category_id']] = $row['category_title']; - } - $db->sql_freeresult($result); + default: - $template->assign_vars(array( - 'PROJECT_TITLE' => $project_title, - 'TRACKER_TITLE' => $tracker_title, - 'S_CATEGORIES_SELECT' => project_build_select($category_select, $category_id), - )); + break; + case 'add': + + + break; + + case 'edit': + + + break; + + case 'delete': + + + break; + } + break; - - /** - * @todo Add modes: - * - add ticket - * - manage tickets - * - more... - */ } } } Modified: trunk/phpbb3/root/styles/prosilver/template/project_create.html =================================================================== --- trunk/phpbb3/root/styles/prosilver/template/project_create.html 2008-05-04 00:34:46 UTC (rev 276) +++ trunk/phpbb3/root/styles/prosilver/template/project_create.html 2008-05-05 19:20:09 UTC (rev 277) @@ -11,8 +11,8 @@ <!-- IF ERROR --><dl><dd class="error">{ERROR}</dd></dl><!-- ENDIF --> <dl> <dt><label for="project_category">{L_PROJECT_CATEGORY}</label></dt> - <dd><select tabindex="1" name="project_category" id="project_category" title="{L_PROJECT_CATEGORY}"><!-- BEGIN category --> - <option value="{category.CATEGORY_ID}"<!-- IF category.CATEGORY_ID == CATEGORY_ID --> selected="selected"<!-- ENDIF -->>{category.CATEGORY_TITLE}</option><!-- END --> + <dd><select tabindex="1" name="project_category" id="project_category" title="{L_PROJECT_CATEGORY}"> + {CATEGORY_SELECT} </select></dd> </dl> <dl> @@ -29,8 +29,8 @@ </dl> <dl> <dt><label for="project_license">{L_PROJECT_LICENSE}:</label></dt> - <dd><select tabindex="5" name="project_license" id="project_license" title="{L_PROJECT_LICENSE}" onchange="set_description(this.value)"><!-- BEGIN license --> - <option value="{license.LICENSE_ID}"<!-- IF (license.S_STANDARD && not PROJECT_LICENSE) || license.LICENSE_ID == PROJECT_LICENSE --> selected="selected"<!-- ENDIF -->>{license.LICENSE_TITLE}</option><!-- END --> + <dd><select tabindex="5" name="project_license" id="project_license" title="{L_PROJECT_LICENSE}" onchange="set_description(this.value)"> + {LICENSE_SELECT} </select> <!--noscript><input type="submit" name="license_description" value="{L_PROJECT_DISPLAY_LICENSE_DESC}" class="button2" /></noscript> <span id="license_description">{LICENSE_DESCRIPTION}</span--></dd> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-05-04 00:34:39
|
Revision: 276 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=276&view=rev Author: lord_le_brand Date: 2008-05-03 17:34:46 -0700 (Sat, 03 May 2008) Log Message: ----------- Removed/Commented out all auth stuff for now: wait for poyntesm's patch Updated constants.php and create_schema_files_phpbb3.php Added project_build_select() for buidling dropdown boxes Tracker should be done soonish :) Modified Paths: -------------- trunk/develop/create_schema_files_phpbb3.php trunk/develop/permissions.txt trunk/develop/todo_list.txt trunk/phpbb3/root/includes/project/project_main.php trunk/phpbb3/root/includes/project/project_trackers.php trunk/phpbb3/root/includes/sources_project/constants.php trunk/phpbb3/root/includes/sources_project/create_project.php trunk/phpbb3/root/includes/sources_project/extensions.php trunk/phpbb3/root/includes/sources_project/functions_project.php trunk/phpbb3/root/project.php Modified: trunk/develop/create_schema_files_phpbb3.php =================================================================== --- trunk/develop/create_schema_files_phpbb3.php 2008-04-30 00:35:28 UTC (rev 275) +++ trunk/develop/create_schema_files_phpbb3.php 2008-05-04 00:34:46 UTC (rev 276) @@ -821,15 +821,6 @@ ) ); - $schema_data['phpbb_project_project_authors'] = array( - 'COLUMNS' => array( - 'project_id' => array('UINT', '0'), - 'author_id' => array('UINT', '0'), - 'author_role' => array('UINT', '0'), - ), - 'PRIMARY_KEY' => array('project_id, author_id'), - ); - //------------------------------------------ // @@ -941,6 +932,14 @@ //------------------------------------------ // + // Permissions + // + + // @todo New table to work with poyntesm's auth patch + + //------------------------------------------ + + // // Trackers // Modified: trunk/develop/permissions.txt =================================================================== --- trunk/develop/permissions.txt 2008-04-30 00:35:28 UTC (rev 275) +++ trunk/develop/permissions.txt 2008-05-04 00:34:46 UTC (rev 276) @@ -1,17 +1,7 @@ Permissions for phpBB Project: -We're gonna have to make one or more new tables for permission masks. -This is because, apparently, the forum_id really isn't supposed to be used for something else. >_> +Wait for poyntesm to finish his patch for the auth class -New auth methods: - -- acl_getp($opt, $clean = false) - Like acl_getf($opt, $clean = false) but for projects -- acl_getc($opt, $clean = false) - Like acl_getf($opt, $clean = false) but for categories - -Extend or modify most others (when I understand them all some more...) - Assigned by authors: [?] - View the project (per project) Modified: trunk/develop/todo_list.txt =================================================================== --- trunk/develop/todo_list.txt 2008-04-30 00:35:28 UTC (rev 275) +++ trunk/develop/todo_list.txt 2008-05-04 00:34:46 UTC (rev 276) @@ -2,8 +2,6 @@ - Make a TODO tracker!!! - When at it make a bug tracker and feature tracker :) -- Extend auth class and create new permission tables -- Change the way authors are tied to projects (acl_roles or new equivalent) - Add /languages and /templates support to download (and import) class - Author ordering in MOD(X) file/project overview page - Definitive decision on storing versioned files @@ -11,6 +9,8 @@ - Expand validate_project_title() - Decide on what information will go on view category module - Target version information +- Wait till poyntesm finishes his auth patch + - Change the way authors are tied to projects using acl tables? - Decide on better module structure - Modules: - Import project Modified: trunk/phpbb3/root/includes/project/project_main.php =================================================================== --- trunk/phpbb3/root/includes/project/project_main.php 2008-04-30 00:35:28 UTC (rev 275) +++ trunk/phpbb3/root/includes/project/project_main.php 2008-05-04 00:34:46 UTC (rev 276) @@ -72,8 +72,13 @@ // If top ten should be displayed, do so if ($config['project_display_top_ten']) { + /** + * @todo when auth extended, rewrite $acl_projects = array_keys($auth->acl_getf('p_view_project', true)); $project_ids = $db->sql_in_set('project_id', $acl_projects, false, true); + */ + $project_ids = '1 = 1'; + $optional_fields = ($config['project_autopost_enable']) ? ', topic_id' : ''; $sql = "SELECT project_id, project_title, project_description, project_downloads $optional_fields @@ -134,9 +139,11 @@ // There are categories here, so display them $acl_categories = array(); $category_ids = '1 = 1'; - // Rewrite next line when auth class is extended - // $acl_categories = array_keys($auth->acl_getf('p_view_category', true)); - //$category_ids = $db->sql_in_set('category_id', $acl_categories, false, true); + /** + * @todo when auth extended, rewrite + $acl_categories = array_keys($auth->acl_getf('p_view_category', true)); + $category_ids = $db->sql_in_set('category_id', $acl_categories, false, true); + */ $sql = 'SELECT * FROM ' . PROJECT_CATEGORIES_TABLE . " @@ -243,8 +250,12 @@ $sql_sort_order = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'); + /** + * @todo when auth extended, rewrite $acl_projects = array_keys($auth->acl_getf('p_view_project', true)); $project_ids = $db->sql_in_set('project_id', $acl_projects, false, true); + */ + $project_ids = '1 = 1'; $sql = "SELECT project_id, topic_id, project_title, project_description, project_level, project_install_time, project_target_version, project_version, project_stage, project_start_time, project_owner, project_last_update, project_downloads FROM " . PROJECT_PROJECTS_TABLE . " @@ -438,8 +449,12 @@ )); } + /** + * @todo when auth extended, rewrite $acl_categories = array_keys($auth->acl_getf('p_view_category', true)); $category_ids = $db->sql_in_set('category_id', $acl_categories, false, true); + */ + $category_ids = '1 = 1'; $sql = 'SELECT * FROM ' . PROJECT_CATEGORIES_TABLE . " Modified: trunk/phpbb3/root/includes/project/project_trackers.php =================================================================== --- trunk/phpbb3/root/includes/project/project_trackers.php 2008-04-30 00:35:28 UTC (rev 275) +++ trunk/phpbb3/root/includes/project/project_trackers.php 2008-05-04 00:34:46 UTC (rev 276) @@ -230,8 +230,39 @@ case 'add_ticket': + if (isset($_POST['submit'])) + { + // Check data and insert + } + // General tracker data + $sql = 'SELECT ty.tracker_type_title + FROM ' . PROJECT_TRACKER_TYPES_TABLE . ' ty, ' . PROJECT_TRACKERS_TABLE . " tr + WHERE ty.tracker_type_id = tr.tracker_type + AND tr.tracker_id = $tracker_id"; + $result = $db->sql_query($sql, 604800); + $tracker_title = $db->sql_fetchfield('tracker_type_title', false, $result); + $db->sql_freeresult($result); + // Get category dropdown + $sql = 'SELECT * + FROM ' . PROJECT_TRACKER_CATEGORIES_TABLE . " + WHERE tracker_id = $tracker_id" . ((!$is_author) ? ' AND is_private = 0' : ''); + $result = $db->sql_query($sql, 604800); + + while ($row = $db->sql_fetchrow($result)) + { + $category_select[$row['category_id']] = $row['category_title']; + } + $db->sql_freeresult($result); + + $template->assign_vars(array( + 'PROJECT_TITLE' => $project_title, + 'TRACKER_TITLE' => $tracker_title, + + 'S_CATEGORIES_SELECT' => project_build_select($category_select, $category_id), + )); + break; /** Modified: trunk/phpbb3/root/includes/sources_project/constants.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/constants.php 2008-04-30 00:35:28 UTC (rev 275) +++ trunk/phpbb3/root/includes/sources_project/constants.php 2008-05-04 00:34:46 UTC (rev 276) @@ -81,14 +81,14 @@ define('PROJECT_DOCUMENTATION_TABLE', $table_prefix . 'project_documentation'); define('PROJECT_LICENSES_TABLE', $table_prefix . 'project_licenses'); define('PROJECT_MARX_TABLE', $table_prefix . 'project_marx'); -define('PROJECT_PROJECT_AUTHORS_TABLE', $table_prefix . 'project_project_authors'); define('PROJECT_PROJECTS_TABLE', $table_prefix . 'project_projects'); define('PROJECT_SEARCH_WORDMATCH_TABLE', $table_prefix . 'project_search_wordmatch'); define('PROJECT_TRACKERS_TABLE', $table_prefix . 'project_trackers'); define('PROJECT_TRACKER_CATEGORIES_TABLE', $table_prefix . 'project_tracker_categories'); -define('PROJECT_TRACKER_ENTRIES_TABLE', $table_prefix . 'project_tracker_entries'); +define('PROJECT_TRACKER_COMMENTS_TABLE', $table_prefix . 'project_tracker_comments'); define('PROJECT_TRACKER_STATUS_TABLE', $table_prefix . 'project_tracker_status'); define('PROJECT_TRACKER_TYPES_TABLE', $table_prefix . 'project_tracker_types'); +define('PROJECT_TRACKER_TICKETS_TABLE', $table_prefix . 'project_tracker_tickets'); define('PROJECT_VERSIONS_TABLE', $table_prefix . 'project_versions'); ?> \ No newline at end of file Modified: trunk/phpbb3/root/includes/sources_project/create_project.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/create_project.php 2008-04-30 00:35:28 UTC (rev 275) +++ trunk/phpbb3/root/includes/sources_project/create_project.php 2008-05-04 00:34:46 UTC (rev 276) @@ -39,7 +39,8 @@ { global $auth, $user; - // Check permissions + /** + * @todo Rewrite this when auth class is extended if (!$auth->acl_get('p_add_project')) { $this->error = $user->lang['PROJECT_NOT_AUTH_CREATE']; @@ -50,6 +51,7 @@ $this->error = $user->lang['PROJECT_NOT_AUTH_CAT']; return; } + */ // Time & date of project creation $this->current_time = time(); Modified: trunk/phpbb3/root/includes/sources_project/extensions.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/extensions.php 2008-04-30 00:35:28 UTC (rev 275) +++ trunk/phpbb3/root/includes/sources_project/extensions.php 2008-05-04 00:34:46 UTC (rev 276) @@ -17,14 +17,8 @@ } /** - * phpBB Project Auth extension - * - * @package phpbbproject + * @todo poyntesm's patch is gonna be here, once it's released */ -class project_auth extends auth -{ - // Do stuff with extra tables... -} /** * phpBB Project Module extension @@ -91,6 +85,7 @@ $project_id = ($project_id === false) ? $this->acl_project_id : $project_id; $is_auth = false; + // @todo Rewrite this for auth extension eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$(?:c_|pr_|)id)?#', '#\$id#', '#\$c_id#', '#\$pr_id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#', '#request_([a-z_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $category_id', '(int) $project_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']', '!empty($_REQUEST[\'\\1\'])'), $module_auth) . ');'); return $is_auth; Modified: trunk/phpbb3/root/includes/sources_project/functions_project.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/functions_project.php 2008-04-30 00:35:28 UTC (rev 275) +++ trunk/phpbb3/root/includes/sources_project/functions_project.php 2008-05-04 00:34:46 UTC (rev 276) @@ -37,6 +37,39 @@ } /** + * Build proper select box + * + * @param array $select_ary associative array containing the value/title pairs + * @param boolean|string $default Default selected value, false for none + * @param boolean|string $lang_key Key for nested language entries + * @return unknown + */ +function project_build_select($select_ary, $default = false, $lang_key = false) +{ + global $user; + + if ($lang_key) + { + $lang =& $user->lang[$lang_key]; + } + else + { + $lang =& $user->lang; + } + + $html = ''; + + foreach ($select_ary as $value => $title) + { + $title = (isset($lang[$title])) ? $lang[$title] : $title; + $selected = ($default !== false && $default == $value) ? ' selected="selected"' : ''; + $html .= "<option value=\"$value\"$selected>$title</option>\n"; + } + + return $html; +} + +/** * Merge file and diff * * @param string $original Modified: trunk/phpbb3/root/project.php =================================================================== --- trunk/phpbb3/root/project.php 2008-04-30 00:35:28 UTC (rev 275) +++ trunk/phpbb3/root/project.php 2008-05-04 00:34:46 UTC (rev 276) @@ -23,9 +23,9 @@ define('PROJECT_BASE_URL', "{$phpbb_root_path}project.$phpEx"); -// phpBB Project Auth extension -//unset($auth); -//$auth = new project_auth(); +/** + * @todo Initiate poyntesm's auth patch + */ // Basic parameter data $id = request_var('i', ''); @@ -45,6 +45,8 @@ $category_id = request_var('c', 0); $action = request_var('action', ''); +/** + * @todo Rewrite this for auth extension // If the user doesn't have any project permissions (globally or locally) he can't access any modules... if (!$auth->acl_getf_global('p_')) { @@ -62,6 +64,7 @@ { trigger_error($user->lang['PROJECT_NOT_AUTH_CAT']); } + */ if ($project_id) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-04-30 00:35:20
|
Revision: 275 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=275&view=rev Author: lord_le_brand Date: 2008-04-29 17:35:28 -0700 (Tue, 29 Apr 2008) Log Message: ----------- Removed category link from and added project title to information modules Changed display to 1 for project overview Modified Paths: -------------- trunk/phpbb3/root/includes/project/info/project_project.php trunk/phpbb3/root/includes/project/project_project.php trunk/phpbb3/root/includes/project/project_trackers.php trunk/phpbb3/root/styles/prosilver/template/project_project_overview.html trunk/phpbb3/root/styles/prosilver/template/project_view_authors.html trunk/phpbb3/root/styles/prosilver/template/project_view_history.html trunk/phpbb3/root/styles/prosilver/template/project_view_info.html Modified: trunk/phpbb3/root/includes/project/info/project_project.php =================================================================== --- trunk/phpbb3/root/includes/project/info/project_project.php 2008-04-28 12:25:11 UTC (rev 274) +++ trunk/phpbb3/root/includes/project/info/project_project.php 2008-04-30 00:35:28 UTC (rev 275) @@ -35,7 +35,7 @@ 'title' => 'PROJECT_CAT_PROJECT', 'version' => '1.0.0', 'modes' => array( - 'overview' => array('title' => 'PROJECT_PROJECT_OVERVIEW', 'display' => 0, 'auth' => 'acl_p_view_project,$pr_id', 'cat' => array('PROJECT_CAT_VIEW_PROJECT')), + 'overview' => array('title' => 'PROJECT_PROJECT_OVERVIEW', 'auth' => 'acl_p_view_project,$pr_id', 'cat' => array('PROJECT_CAT_VIEW_PROJECT')), 'view_info' => array('title' => 'PROJECT_VIEW_INFO', 'auth' => 'acl_p_view_project,$pr_id', 'cat' => array('PROJECT_CAT_VIEW_PROJECT')), 'view_authors' => array('title' => 'PROJECT_VIEW_AUTHORS', 'auth' => 'acl_p_view_project,$pr_id', 'cat' => array('PROJECT_CAT_VIEW_PROJECT')), 'view_history' => array('title' => 'PROJECT_VIEW_HISTORY', 'auth' => 'acl_p_view_project,$pr_id', 'cat' => array('PROJECT_CAT_VIEW_PROJECT')), Modified: trunk/phpbb3/root/includes/project/project_project.php =================================================================== --- trunk/phpbb3/root/includes/project/project_project.php 2008-04-28 12:25:11 UTC (rev 274) +++ trunk/phpbb3/root/includes/project/project_project.php 2008-04-30 00:35:28 UTC (rev 275) @@ -39,6 +39,15 @@ global $phpbb_root_path, $phpEx; global $project_id, $category_id; + $sql = 'SELECT project_title + FROM ' . PROJECT_PROJECTS_TABLE . " + WHERE project_id = $project_id"; + $result = $db->sql_query($sql, 604800); + $project_title = $db->sql_fetchfield('project_title', false, $result); + $db->sql_freeresult($result); + + $template->assign_var('PROJECT_TITLE', $project_title); + switch ($mode) { default: @@ -62,13 +71,6 @@ $project_info = $db->sql_fetchrow(); $db->sql_freeresult(); - $template->assign_vars(array( - 'L_BACK_TO_CATEGORY' => sprintf($user->lang['PROJECT_BACK_TO_CATEGORY'], $project_info['category_title']), - 'PROJECT_TITLE' => $project_info['project_title'], - - 'U_CATEGORY' => append_sid(PROJECT_BASE_URL, "i=main&mode=viewcat&c={$project_info['category_id']}&pr=$project_id"), - )); - $this->tpl_name = 'project_view_info'; $this->page_title = 'PROJECT_VIEW_INFO'; Modified: trunk/phpbb3/root/includes/project/project_trackers.php =================================================================== --- trunk/phpbb3/root/includes/project/project_trackers.php 2008-04-28 12:25:11 UTC (rev 274) +++ trunk/phpbb3/root/includes/project/project_trackers.php 2008-04-30 00:35:28 UTC (rev 275) @@ -44,6 +44,15 @@ $ticket_id = request_var('ticket', 0); $start = request_var('start', 0); + $sql = 'SELECT project_title + FROM ' . PROJECT_PROJECTS_TABLE . " + WHERE project_id = $project_id"; + $result = $db->sql_query($sql, 604800); + $project_title = $db->sql_fetchfield('project_title', false, $result); + $db->sql_freeresult($result); + + $template->assign_var('PROJECT_TITLE', $project_title); + switch ($mode) { default: @@ -219,6 +228,12 @@ break; + case 'add_ticket': + + + + break; + /** * @todo Add modes: * - add ticket Modified: trunk/phpbb3/root/styles/prosilver/template/project_project_overview.html =================================================================== --- trunk/phpbb3/root/styles/prosilver/template/project_project_overview.html 2008-04-28 12:25:11 UTC (rev 274) +++ trunk/phpbb3/root/styles/prosilver/template/project_project_overview.html 2008-04-30 00:35:28 UTC (rev 275) @@ -1,14 +1,12 @@ <!-- INCLUDE project_header.html --> <h2>{L_PROJECT_PROJECT_OVERVIEW}</h2> +<h3>{PROJECT_TITLE}</h3> <div class="panel"> <div class="inner"> <span class="corners-top"><span></span></span> - <p>« <a href="{U_CATEGORY}">{L_BACK_TO_CATEGORY}</a></p> - - <span class="corners-bottom"><span></span></span> </div> </div> Modified: trunk/phpbb3/root/styles/prosilver/template/project_view_authors.html =================================================================== --- trunk/phpbb3/root/styles/prosilver/template/project_view_authors.html 2008-04-28 12:25:11 UTC (rev 274) +++ trunk/phpbb3/root/styles/prosilver/template/project_view_authors.html 2008-04-30 00:35:28 UTC (rev 275) @@ -1,13 +1,12 @@ <!-- INCLUDE project_header.html --> <h2>{L_PROJECT_VIEW_AUTHORS}</h2> +<h3>{PROJECT_TITLE}</h3> <div class="panel"> <div class="inner"> <span class="corners-top"><span></span></span> - <p>« <a href="{U_CATEGORY}">{L_BACK_TO_CATEGORY}</a></p> - <table class="table1"> <thead> <tr> Modified: trunk/phpbb3/root/styles/prosilver/template/project_view_history.html =================================================================== --- trunk/phpbb3/root/styles/prosilver/template/project_view_history.html 2008-04-28 12:25:11 UTC (rev 274) +++ trunk/phpbb3/root/styles/prosilver/template/project_view_history.html 2008-04-30 00:35:28 UTC (rev 275) @@ -1,13 +1,12 @@ <!-- INCLUDE project_header.html --> <h2>{L_PROJECT_VIEW_HISTORY}</h2> +<h3>{PROJECT_TITLE}</h3> <div class="panel"> <div class="inner"> <span class="corners-top"><span></span></span> - <p>« <a href="{U_CATEGORY}">{L_BACK_TO_CATEGORY}</a></p> - <table class="table1"> <thead> <tr> Modified: trunk/phpbb3/root/styles/prosilver/template/project_view_info.html =================================================================== --- trunk/phpbb3/root/styles/prosilver/template/project_view_info.html 2008-04-28 12:25:11 UTC (rev 274) +++ trunk/phpbb3/root/styles/prosilver/template/project_view_info.html 2008-04-30 00:35:28 UTC (rev 275) @@ -1,13 +1,12 @@ <!-- INCLUDE project_header.html --> <h2>{L_PROJECT_VIEW_INFO}</h2> +<h3>{PROJECT_TITLE}</h3> <div class="panel"> <div class="inner"> <span class="corners-top"><span></span></span> - <p>« <a href="{U_CATEGORY}">{L_BACK_TO_CATEGORY}</a></p> - <dl class="details"> <dt>{L_PROJECT_TITLE}:</dt> <dd>{PROJECT_TITLE}</dd> <dt>{L_PROJECT_DESCRIPTION}:</dt> <dd>{PROJECT_DESCRIPTION}</dd> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-04-28 12:25:06
|
Revision: 274 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=274&view=rev Author: lord_le_brand Date: 2008-04-28 05:25:11 -0700 (Mon, 28 Apr 2008) Log Message: ----------- Added tracker view_ticket mode Added table for commenting on tickets Extra permissions to be added... Modified Paths: -------------- trunk/develop/create_schema_files_phpbb3.php trunk/develop/permissions.txt trunk/phpbb3/root/includes/project/project_trackers.php Modified: trunk/develop/create_schema_files_phpbb3.php =================================================================== --- trunk/develop/create_schema_files_phpbb3.php 2008-04-27 21:53:02 UTC (rev 273) +++ trunk/develop/create_schema_files_phpbb3.php 2008-04-28 12:25:11 UTC (rev 274) @@ -1014,6 +1014,23 @@ ) ); + // Ticket comments + $schema_data['phpbb_project_tracker_comments'] = array( + 'COLUMNS' => array( + 'comment_id' => array('UINT:11', NULL, 'auto_increment'), + 'ticket_id' => array('UINT:11', '0'), + 'comment_title' => array('XSTEXT_UNI', ''), + 'comment_text' => array('TEXT_UNI', ''), + 'comment_author' => array('UINT', '0'), + 'comment_time' => array('TIMESTAMP', '0') + ), + 'PRIMARY_KEY' => 'comment_id', + 'KEYS' => array( + 'ticket_id' => array('INDEX', 'ticket_id'), + 'comment_time' => array('INDEX', 'comment_time'), + ) + ); + //------------------------------------------ // Modified: trunk/develop/permissions.txt =================================================================== --- trunk/develop/permissions.txt 2008-04-27 21:53:02 UTC (rev 273) +++ trunk/develop/permissions.txt 2008-04-28 12:25:11 UTC (rev 274) @@ -12,22 +12,25 @@ Extend or modify most others (when I understand them all some more...) -Assigned by authors (All per project): +Assigned by authors: [?] -- View the mod -- Edit mod -- Delete the mod -- Download the mod -- Add authors -- Remove authors -- Manage project roles and permissions -- View docs -- Manage docs +- View the project (per project) +- Edit project (per project) +- Delete the project (per project) +- Download the project (per project) +- Add authors to project (per project) +- Remove authors from project (per project) +- Manage project roles and permissions (per project) +- View docs (per project [per doc?]) +- Manage docs (per project) +- Add tickets in tracker (per tracker) +- Comment in tickets (per tracker) +- Manage tickets (per tracker) [maybe split up in edit, delete, set status, etc] -Assigned by admin: +Assigned by admin: [?] - Create a mod (global) -- View category (per category) // How (<< What's this about??) +- View category (per category) // How [<- What's this about???] - Add MODs to category (per category) - Manage categories (global) - Manage roles/permissions (global) Modified: trunk/phpbb3/root/includes/project/project_trackers.php =================================================================== --- trunk/phpbb3/root/includes/project/project_trackers.php 2008-04-27 21:53:02 UTC (rev 273) +++ trunk/phpbb3/root/includes/project/project_trackers.php 2008-04-28 12:25:11 UTC (rev 274) @@ -21,7 +21,7 @@ * * @package phpbbproject */ -class project_tracker +class project_trackers { public $u_action; public $tpl_name; @@ -42,6 +42,7 @@ $tracker_id = request_var('tid', 0); $tracker_category = request_var('tcat', 0); $ticket_id = request_var('ticket', 0); + $start = request_var('start', 0); switch ($mode) { @@ -104,6 +105,16 @@ )); } + $sql = 'SELECT COUNT(t.*) AS num_tickets + FROM ' . PROJECT_TRACKER_TICKETS_TABLE . ' t, ' . PROJECT_TRACKER_CATEGORIES_TABLE . " c + WHERE t.tracker_id = $tracker_id + " . (($tracker_category) ? "AND t.tracker_category = $tracker_category" : '') . ' + AND c.category_id = t.tracker_category + ' . ((!$is_author) ? 'AND c.is_private = 0' : ''); + $result = $db->sql_query($sql, 604800); + $num_tickets = $db->sql_fetchfield('num_tickets', false, $result); + $db->sql_freeresult($result); + $sql = 'SELECT t.*, c.*, s.* FROM ' . PROJECT_TRACKER_TICKETS_TABLE . ' t, ' . PROJECT_TRACKER_CATEGORIES_TABLE . ' c, ' . PROJECT_TRACKER_STATUS_TABLE . " s WHERE t.tracker_id = $tracker_id @@ -112,7 +123,7 @@ AND s.tracker_status_id = t.ticket_status ' . ((!$is_author) ? 'AND c.is_private = 0' : '') . ' ORDER BY ticket.ticket_time DESC'; - $result = $db->sql_query($sql, 604800); + $result = $db->sql_query_limit($sql, $config['project_tracker_tickets_per_page'], $start, 604800); $tickets = $db->sql_fetchrowset($result); $db->sql_freeresult($result); @@ -129,7 +140,91 @@ )); } + $pagination = generate_pagination(append_sid(PROJECT_BASE_URL, "i=trackers&mode=tickets" . _module_trackers_url('tickets', array())), $num_tickets, $config['project_tracker_tickets_per_page'], $start); + break; + + case 'view_ticket': + + if (!$ticket_id) + { + if ($tracker_id) + { + redirect(append_sid(PROJECT_BASE_URL, 'i=trackers&mode=tickets' . _module_trackers_url('tickets', array()))); + } + else + { + redirect(append_sid(PROJECT_BASE_URL, 'i=trackers&mode=overview')); + } + } + + // Display: Full ticket, category title, tracker (type) title, ticket status, author + // OMFG! See the size of this baby O_O; + $sql = 'SELECT t.*, c.category_title, c.is_private, type.tracker_type_title, tracker.tracker_id, s.*, u.username, u.user_colour + FROM ' . PROJECT_TRACKER_TICKETS_TABLE . ' t, ' . PROJECT_TRACKER_CATEGORIES_TABLE . ' c, ' . PROJECT_TRACKERS_TABLE . ' tracker, ' . PROJECT_TRACKER_TYPES_TABLE . ' tt, ' . PROJECT_TRACKER_STATUS_TABLE . ' s, ' . USERS_TABLE . " u + WHERE t.ticket_id = $ticket_id + AND c.category_id = t.tracker_category + AND type.tracker_type_id = tracker.tracker_type + AND tracker_tracker_id = t.tracker_id + AND s.status_id = t.ticket_status + AND u.user_id = t.ticket_author"; + $result = $db->sql_query($sql, 604800); + $ticket_info = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($ticket_info['is_private'] && !$is_author) + { + // @todo Die, you hacker! + } + + $sql = 'SELECT COUNT(*) AS num_comments + FROM ' . PROJECT_TRACKER_COMMENTS_TABLE . " + WHERE ticket_id = $ticket_id"; + $result = $db->sql_query($sql, 604800); + $num_comments = $db->sql_fetchfield('num_comments', false, $result); + $db->sql_freeresult($result); + + $sql = 'SELECT c.*, u.username, u.user_colour + FROM ' . PROJECT_TRACKER_COMMENTS_TABLE . ' c, ' . USERS_TABLE . " u + WHERE c.ticket_id = $ticket_id + ORDER BY c.comment_time ASC"; + $result = $db->sql_query_limit($sql, $config['project_tracker_comments_per_page'], $start, 86400); + $comments = $db->sql_fetchrowset($result); + $db->sql_freeresult($result); + + for ($i = 0, $size = sizeof($comments); $i < $size; $i++) + { + $template->assign_block_vars('comment_row', array( + 'COMMENT_TITLE' => $comments[$i]['comment_title'], + 'COMMENT_TEXT' => $comments[$i]['comment_text'], + 'COMMENT_DATE' => $user->format_date($comments[$i]['comment_time']), + 'COMMENT_AUTHOR' => get_username_string('full', $comments[$i]['comment_author'], $comments[$i]['username'], $comments[$i]['user_colour']), + )); + } + + $template->assign_vars(array( + 'TRACKER_TITLE' => $ticket_info['tracker_title'], + 'CATEGORY_TITLE' => $ticket_info['category_title'], + + 'TICKET_TITLE' => $ticket_info['ticket_title'], + 'TICKET_DESCRIPTION' => $ticket_info['ticket_description'], + 'TICKET_DATE' => $user->format_date($ticket_info['ticket_time']), + 'TICKET_AUTHOR' => get_username_string('full', $ticket_info['ticket_author'], $ticket_info['username'], $ticket_info['user_colour']), + 'TICKET_STATUS' => $ticket_info['status_title'], + + 'PAGINATION' => $pagination, + )); + + // @todo Commenting stuff + + break; + + /** + * @todo Add modes: + * - add ticket + * - manage tickets + * - more... + */ } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-04-27 21:52:59
|
Revision: 273 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=273&view=rev Author: lord_le_brand Date: 2008-04-27 14:53:02 -0700 (Sun, 27 Apr 2008) Log Message: ----------- Added IN_PHPBB and IN_PROJECT check to every file -_-' Modified Paths: -------------- trunk/phpbb3/root/includes/project/info/project_main.php trunk/phpbb3/root/includes/project/info/project_project.php trunk/phpbb3/root/includes/project/project_main.php trunk/phpbb3/root/includes/project/project_project.php trunk/phpbb3/root/includes/project/project_trackers.php trunk/phpbb3/root/includes/sources_project/constants.php trunk/phpbb3/root/includes/sources_project/create_project.php trunk/phpbb3/root/includes/sources_project/download_project.php trunk/phpbb3/root/includes/sources_project/extensions.php trunk/phpbb3/root/includes/sources_project/functions_create.php trunk/phpbb3/root/includes/sources_project/functions_project.php trunk/phpbb3/root/includes/sources_project/functions_remote_posting.php trunk/phpbb3/root/includes/sources_project/import_project.php trunk/phpbb3/root/includes/sources_project/project_parse.php trunk/phpbb3/root/language/en/mods/phpbbproject.php Modified: trunk/phpbb3/root/includes/project/info/project_main.php =================================================================== --- trunk/phpbb3/root/includes/project/info/project_main.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/includes/project/info/project_main.php 2008-04-27 21:53:02 UTC (rev 273) @@ -9,6 +9,14 @@ */ /** + * @ignore + */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) +{ + exit; +} + +/** * Main module * * @package phpbbproject Modified: trunk/phpbb3/root/includes/project/info/project_project.php =================================================================== --- trunk/phpbb3/root/includes/project/info/project_project.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/includes/project/info/project_project.php 2008-04-27 21:53:02 UTC (rev 273) @@ -9,6 +9,14 @@ */ /** + * @ignore + */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) +{ + exit; +} + +/** * Project module * * @package phpbbproject Modified: trunk/phpbb3/root/includes/project/project_main.php =================================================================== --- trunk/phpbb3/root/includes/project/project_main.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/includes/project/project_main.php 2008-04-27 21:53:02 UTC (rev 273) @@ -9,6 +9,14 @@ */ /** + * @ignore + */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) +{ + exit; +} + +/** * Main module * * @package phpbbproject Modified: trunk/phpbb3/root/includes/project/project_project.php =================================================================== --- trunk/phpbb3/root/includes/project/project_project.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/includes/project/project_project.php 2008-04-27 21:53:02 UTC (rev 273) @@ -9,6 +9,14 @@ */ /** + * @ignore + */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) +{ + exit; +} + +/** * Project module * * @package phpbbproject Modified: trunk/phpbb3/root/includes/project/project_trackers.php =================================================================== --- trunk/phpbb3/root/includes/project/project_trackers.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/includes/project/project_trackers.php 2008-04-27 21:53:02 UTC (rev 273) @@ -9,6 +9,14 @@ */ /** + * @ignore + */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) +{ + exit; +} + +/** * Trackers module * * @package phpbbproject Modified: trunk/phpbb3/root/includes/sources_project/constants.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/constants.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/includes/sources_project/constants.php 2008-04-27 21:53:02 UTC (rev 273) @@ -9,7 +9,13 @@ */ /** + * @ignore */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) +{ + exit; +} + // Install levels define('PROJECT_LEVEL_EASY', 1); define('PROJECT_LEVEL_INTERMEDIATE', 2); Modified: trunk/phpbb3/root/includes/sources_project/create_project.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/create_project.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/includes/sources_project/create_project.php 2008-04-27 21:53:02 UTC (rev 273) @@ -9,6 +9,14 @@ */ /** + * @ignore + */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) +{ + exit; +} + +/** * Create Project base class * * @package create_project Modified: trunk/phpbb3/root/includes/sources_project/download_project.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/download_project.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/includes/sources_project/download_project.php 2008-04-27 21:53:02 UTC (rev 273) @@ -9,6 +9,14 @@ */ /** + * @ignore + */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) +{ + exit; +} + +/** * Download class * * Handles packaging Modified: trunk/phpbb3/root/includes/sources_project/extensions.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/extensions.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/includes/sources_project/extensions.php 2008-04-27 21:53:02 UTC (rev 273) @@ -9,6 +9,14 @@ */ /** + * @ignore + */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) +{ + exit; +} + +/** * phpBB Project Auth extension * * @package phpbbproject Modified: trunk/phpbb3/root/includes/sources_project/functions_create.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/functions_create.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/includes/sources_project/functions_create.php 2008-04-27 21:53:02 UTC (rev 273) @@ -9,6 +9,14 @@ */ /** + * @ignore + */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) +{ + exit; +} + +/** * Validate project title * * @param string $project_title Modified: trunk/phpbb3/root/includes/sources_project/functions_project.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/functions_project.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/includes/sources_project/functions_project.php 2008-04-27 21:53:02 UTC (rev 273) @@ -9,6 +9,14 @@ */ /** + * @ignore + */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) +{ + exit; +} + +/** * Get the author_username * * @param integer $user_id Modified: trunk/phpbb3/root/includes/sources_project/functions_remote_posting.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/functions_remote_posting.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/includes/sources_project/functions_remote_posting.php 2008-04-27 21:53:02 UTC (rev 273) @@ -1,16 +1,17 @@ <?php /** -* -* @package phpbbproject -* @version $Id$ -* @copyright (c) 2007 phpbbmodders, 2008 phpBB Project Team -* @license http://opensource.org/licenses/gpl-license.php GNU Public License -* -*/ + * Functions remote posting + * + * @package phpbbproject + * @version $Id$ + * @copyright (c) 2007 phpbbmodders, 2008 phpBB Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + */ /** -*/ -if (!defined('IN_PHPBB')) + * @ignore + */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) { exit; } Modified: trunk/phpbb3/root/includes/sources_project/import_project.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/import_project.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/includes/sources_project/import_project.php 2008-04-27 21:53:02 UTC (rev 273) @@ -9,6 +9,14 @@ */ /** + * @ignore + */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) +{ + exit; +} + +/** * Base import class * * @package create_project Modified: trunk/phpbb3/root/includes/sources_project/project_parse.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/project_parse.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/includes/sources_project/project_parse.php 2008-04-27 21:53:02 UTC (rev 273) @@ -9,6 +9,14 @@ */ /** + * @ignore + */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) +{ + exit; +} + +/** * File parser * * @package phpbbproject Modified: trunk/phpbb3/root/language/en/mods/phpbbproject.php =================================================================== --- trunk/phpbb3/root/language/en/mods/phpbbproject.php 2008-04-27 14:01:00 UTC (rev 272) +++ trunk/phpbb3/root/language/en/mods/phpbbproject.php 2008-04-27 21:53:02 UTC (rev 273) @@ -9,7 +9,13 @@ */ /** + * @ignore */ +if (!defined('IN_PHPBB') || !defined('IN_PROJECT')) +{ + exit; +} + if (empty($lang) || !is_array($lang)) { $lang = array(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-04-27 14:00:56
|
Revision: 272 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=272&view=rev Author: lord_le_brand Date: 2008-04-27 07:01:00 -0700 (Sun, 27 Apr 2008) Log Message: ----------- Added constant PROJECT_BASE_URL to easily integrate into website Modified Paths: -------------- trunk/phpbb3/root/includes/project/project_main.php trunk/phpbb3/root/includes/project/project_project.php trunk/phpbb3/root/includes/project/project_trackers.php trunk/phpbb3/root/project.php Modified: trunk/phpbb3/root/includes/project/project_main.php =================================================================== --- trunk/phpbb3/root/includes/project/project_main.php 2008-04-26 10:41:49 UTC (rev 271) +++ trunk/phpbb3/root/includes/project/project_main.php 2008-04-27 14:01:00 UTC (rev 272) @@ -49,7 +49,7 @@ { $newest_project_id = $config['newest_project_id']; $newest_project_title = $config['newest_project_title']; - $newest_project_link = '<a href="' . append_sid("{$phpbb_root_path}project.$phpEx", "i=project&mode=view_info&pr=$newest_project_id") . '">' . htmlspecialchars($newest_project_title) . '</a>'; + $newest_project_link = '<a href="' . append_sid(PROJECT_BASE_URL, "i=project&mode=view_info&pr=$newest_project_id") . '">' . htmlspecialchars($newest_project_title) . '</a>'; $template->assign_vars(array( 'TOTAL_PROJECTS' => sprintf($user->lang['PROJECT_TOTAL_PROJECTS'], $config['project_num_projects']), @@ -86,7 +86,7 @@ 'DOWNLOADS' => $top_ten[$i]['project_downloads'], 'U_VIEW_TOPIC' => ($config['project_autopost_enable'] && $top_ten[$i]['topic_id']) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$top_ten[$i]['topic_id']}") : '', - 'U_VIEW_PROJECT' => append_sid("{$phpbb_root_path}project.$phpEx", "i=project&mode=view_info&pr={$top_ten[$i]['project_id']}"), + 'U_VIEW_PROJECT' => append_sid(PROJECT_BASE_URL, "i=project&mode=view_info&pr={$top_ten[$i]['project_id']}"), )); } @@ -172,8 +172,8 @@ 'S_LAST_UPDATE' => ($last_update_id) ? true : false, - 'U_LAST_UPDATE' => append_sid("{$phpbb_root_path}project.$phpEx", "i=project&mode=view_info&pr=$last_update_id"), - 'U_CAT_URL' => append_sid("{$phpbb_root_path}project.$phpEx", "i=main&mode=viewcat&c={$categories[$i]['category_id']}"), + 'U_LAST_UPDATE' => append_sid(PROJECT_BASE_URL, "i=project&mode=view_info&pr=$last_update_id"), + 'U_CAT_URL' => append_sid(PROJECT_BASE_URL, "i=main&mode=viewcat&c={$categories[$i]['category_id']}"), )); // If sub-categories should be displayed, and they are available, display them @@ -196,7 +196,7 @@ 'TITLE' => htmlspecialchars($sub_categories[$j]['category_title']), 'DESCRIPTION' => htmlspecialchars($sub_categories[$j]['category_description']), - 'U_CAT_URL' => append_sid("{$phpbb_root_path}project.$phpEx", "i=main&mode=viewcat&c={$sub_categories[$j]['category_id']}"), + 'U_CAT_URL' => append_sid(PROJECT_BASE_URL, "i=main&mode=viewcat&c={$sub_categories[$j]['category_id']}"), )); } } @@ -290,7 +290,7 @@ 'S_ROW_COUNT' => $i, - 'U_VIEW_PROJECT' => append_sid("{$phpbb_root_path}project.$phpEx", "i=project&mode=view_info&pr={$projects[$i]['project_id']}"), + 'U_VIEW_PROJECT' => append_sid(PROJECT_BASE_URL, "i=project&mode=view_info&pr={$projects[$i]['project_id']}"), 'U_VIEW_TOPIC' => ($config['project_autopost_enable']) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$projects[$i]['topic_id']}") : '', )); } @@ -409,12 +409,12 @@ trigger_error($user->lang['PROJECT_CREATE_FAILURE']); } - $project_link = '<a href="' . append_sid("{$phpbb_root_path}project.$phpEx", "i=project&c={$data['project_category']}&pr={$return_ary['project_id']}") . '">'; + $project_link = '<a href="' . append_sid(PROJECT_BASE_URL, "i=project&c={$data['project_category']}&pr={$return_ary['project_id']}") . '">'; $topic_link = (isset($return_ary['topic_id'])) ? '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$return_ary['topic_id']}") . '">' : ''; $message = $user->lang['PROJECT_CREATE_SUCCESS']; $message .= '<br /><br />' . sprintf($user->lang['PROJECT_VIEW_PROJECT'], $project_link, '</a>'); $message .= (isset($return_ary['topic_id'])) ? '<br />' . sprintf($user->lang['PROJECT_VIEW_TOPIC'], $topic_link, '</a>') : ''; - $message .= '<br /><br />' . sprintf($user->lang['PROJECT_BACK_OVERVIEW'], '<a href="' . append_sid("{$phpbb_root_path}project.$phpEx", 'i=main') . '">', '</a>'); + $message .= '<br /><br />' . sprintf($user->lang['PROJECT_BACK_OVERVIEW'], '<a href="' . append_sid(PROJECT_BASE_URL, 'i=main') . '">', '</a>'); trigger_error($message); } Modified: trunk/phpbb3/root/includes/project/project_project.php =================================================================== --- trunk/phpbb3/root/includes/project/project_project.php 2008-04-26 10:41:49 UTC (rev 271) +++ trunk/phpbb3/root/includes/project/project_project.php 2008-04-27 14:01:00 UTC (rev 272) @@ -58,7 +58,7 @@ 'L_BACK_TO_CATEGORY' => sprintf($user->lang['PROJECT_BACK_TO_CATEGORY'], $project_info['category_title']), 'PROJECT_TITLE' => $project_info['project_title'], - 'U_CATEGORY' => append_sid("{$phpbb_root_path}project.$phpEx", "i=main&mode=viewcat&c={$project_info['category_id']}&pr=$project_id"), + 'U_CATEGORY' => append_sid(PROJECT_BASE_URL, "i=main&mode=viewcat&c={$project_info['category_id']}&pr=$project_id"), )); $this->tpl_name = 'project_view_info'; Modified: trunk/phpbb3/root/includes/project/project_trackers.php =================================================================== --- trunk/phpbb3/root/includes/project/project_trackers.php 2008-04-26 10:41:49 UTC (rev 271) +++ trunk/phpbb3/root/includes/project/project_trackers.php 2008-04-27 14:01:00 UTC (rev 272) @@ -3,7 +3,7 @@ * phpBB Project * * @package phpbbproject - * @version $Id:$ + * @version $Id$ * @copyright (c) 2008 phpBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License */ @@ -31,6 +31,10 @@ global $phpbb_root_path, $phpEx; global $project_id, $category_id; + $tracker_id = request_var('tid', 0); + $tracker_category = request_var('tcat', 0); + $ticket_id = request_var('ticket', 0); + switch ($mode) { default: @@ -58,7 +62,7 @@ 'TRACKER_TICKETS' => $trackers[$i]['tracker_tickets'], 'TRACKER_CATEGORIES' => $trackers[$i]['tracker_categories'], - 'U_TRACKER' => append_sid("{$phpbb_root_path}project.$phpEx", "i=trackers&mode=tickets&tid={$trackers[$i]['tracker_id']}"), + 'U_TRACKER' => append_sid(PROJECT_BASE_URL, "i=trackers&mode=tickets&tid={$trackers[$i]['tracker_id']}"), )); } @@ -66,13 +70,11 @@ case 'tickets': - $tracker_id = request_var('tid', 0); - $tracker_category = request_var('tcat', 0); - // Just redirect if $tracker_id is 0 if (!$tracker_id) { - redirect(append_sid("{$phpbb_root_path}project.$phpEx", "i=trackers&mode=overview")); + $url_extra = _module_trackers_url('tickets', array()); + redirect(append_sid(PROJECT_BASE_URL, "i=trackers&mode=overview")); } if ($tracker_category) @@ -115,7 +117,7 @@ 'TICKET_AUTHOR' => get_username_string('full', $tickets[$i]['ticket_author'], project_get_author_name($tickets[$i]['ticket_author'])), 'TICKET_TIME' => $user->format_date($tickets[$i]['ticket_time']), - 'U_VIEW_TICKET' => append_sid("{$phpbb_root_path}project.$phpEx", "i=trackers&view_ticket&tid=$tracker_id&ticket={$trackers[$i]['ticket_id']}"), + 'U_VIEW_TICKET' => append_sid(PROJECT_BASE_URL, "i=trackers&mode=view_ticket&tid=$tracker_id&ticket={$trackers[$i]['ticket_id']}"), )); } Modified: trunk/phpbb3/root/project.php =================================================================== --- trunk/phpbb3/root/project.php 2008-04-26 10:41:49 UTC (rev 271) +++ trunk/phpbb3/root/project.php 2008-04-27 14:01:00 UTC (rev 272) @@ -21,6 +21,8 @@ require("{$phpbb_root_path}includes/sources_project/extensions.$phpEx"); require("{$phpbb_root_path}includes/sources_project/functions_project.$phpEx"); +define('PROJECT_BASE_URL', "{$phpbb_root_path}project.$phpEx"); + // phpBB Project Auth extension //unset($auth); //$auth = new project_auth(); @@ -92,7 +94,7 @@ $module->load_active(); // Assign data to the template engine for the list of modules -$module->assign_tpl_vars(append_sid("{$phpbb_root_path}project.$phpEx")); +$module->assign_tpl_vars(append_sid(PROJECT_BASE_URL)); $template->assign_var('META', '<link href="' . $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/theme/phpbbproject.css" rel="stylesheet" media="screen, projection" />'); @@ -126,4 +128,20 @@ return $return; } +function _module_trackers_url($mode, $module_row) +{ + global $category_id, $project_id; + + $tracker_id = request_var('tid', 0); + $tracker_category = request_var('tcat', 0); + $ticket_id = request_var('ticket', 0); + + $return = ($category_id) ? "&c=$category_id" : ''; + $return .= ($project_id) ? "&pr=$project_id" : ''; + $return .= ($tracker_id) ? "&tid=$tracker_id" : ''; + $return .= ($tracker_category) ? "&tcat=$tracker_category" : ''; + $return .= ($ticket_id) ? "&ticket=$ticket_id" : ''; + +} + ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-04-26 10:41:47
|
Revision: 271 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=271&view=rev Author: lord_le_brand Date: 2008-04-26 03:41:49 -0700 (Sat, 26 Apr 2008) Log Message: ----------- Modified Paths: -------------- trunk/develop/create_schema_files_phpbb3.php trunk/develop/modules.txt trunk/develop/permissions.txt trunk/develop/roles.txt trunk/phpbb3/root/includes/project/project_main.php trunk/phpbb3/root/includes/project/project_project.php trunk/phpbb3/root/includes/sources_project/extensions.php trunk/phpbb3/root/project.php Added Paths: ----------- trunk/develop/todo_list.txt trunk/phpbb3/root/includes/project/project_trackers.php Modified: trunk/develop/create_schema_files_phpbb3.php =================================================================== --- trunk/develop/create_schema_files_phpbb3.php 2008-04-24 15:16:16 UTC (rev 270) +++ trunk/develop/create_schema_files_phpbb3.php 2008-04-26 10:41:49 UTC (rev 271) @@ -845,7 +845,7 @@ 'category_description' => array('STEXT_UNI', ''), 'category_projects' => array('UINT:11', '0'), 'last_update_id' => array('UINT', '0'), - 'last_update_time' => array('UINT:11', '0'), + 'last_update_time' => array('TIMESTAMP', '0'), 'forum_id' => array('UINT', '0'), ), 'PRIMARY_KEY' => 'category_id', @@ -880,9 +880,9 @@ 'project_logo_type' => array('TINT:2', '0'), 'project_logo_width' => array('USINT', '0'), 'project_logo_height' => array('USINT', '0'), - 'project_start_time' => array('UINT:11', '0'), + 'project_start_time' => array('TIMESTAMP', '0'), 'project_owner' => array('UINT', '0'), - 'project_last_update' => array('UINT:11', '0'), + 'project_last_update' => array('TIMESTAMP', '0'), 'project_status' => array('BOOL', '0'), 'file_only' => array('BOOL', '0'), 'project_downloads' => array('UINT:11', '0'), @@ -904,7 +904,7 @@ 'version_id' => array('UINT:11', NULL, 'auto_increment'), 'project_id' => array('UINT', '0'), 'previous_id' => array('UINT:11', '0'), - 'version_time' => array('UINT:11', '0'), + 'version_time' => array('TIMESTAMP', '0'), 'version_major' => array('TINT:3', '0'), 'version_minor' => array('TINT:3', '0'), 'version_revision' => array('TINT:3', '0'), @@ -923,7 +923,7 @@ 'action_id' => array('UINT:11', '0'), 'project_id' => array('UINT', '0'), 'version_id' => array('UINT:11', '0'), - 'version_time' => array('UINT:11', '0'), + 'version_time' => array('TIMESTAMP', '0'), 'action_order' => array('USINT', '0'), 'action_file' => array('VCHAR', ''), 'action_type' => array('TINT:2', '0'), @@ -995,19 +995,19 @@ ) ); - // Entries per category/tracker, end-users - $schema_data['phpbb_project_tracker_entries'] = array( + // Tickets per category/tracker, end-users + $schema_data['phpbb_project_tracker_tickets'] = array( 'COLUMNS' => array( - 'entry_id' => array('UINT:11', NULL, 'auto_increment'), - 'tracker_id' => array('UINT:11', '0'), - 'tracker_category' => array('UINT:11', '0'), - 'entry_title' => array('XSTEXT_UNI', ''), - 'entry_description' => array('MTEXT_UNI', ''), - 'entry_status' => array('USINT', '0'), - 'entry_author' => array('UINT', '0'), - 'entry_time' => array('UINT:11', '0'), + 'ticket_id' => array('UINT:11', NULL, 'auto_increment'), + 'tracker_id' => array('UINT:11', '0'), + 'tracker_category' => array('UINT:11', '0'), + 'ticket_title' => array('XSTEXT_UNI', ''), + 'ticket_description' => array('MTEXT_UNI', ''), + 'ticket_status' => array('USINT', '0'), + 'ticket_author' => array('UINT', '0'), + 'ticket_time' => array('TIMESTAMP', '0'), ), - 'PRIMARY_KEY' => 'entry_id', + 'PRIMARY_KEY' => 'ticket_id', 'KEYS' => array( 'tracker_id' => array('INDEX', 'tracker_id'), 'tracker_category' => array('INDEX', 'tracker_category'), @@ -1059,9 +1059,9 @@ 'project_id' => array('UINT', '0'), 'document_title' => array('XSTEXT_UNI', ''), 'document_content' => array('MTEXT_UNI', ''), - 'document_added' => array('UINT:11', '0'), + 'document_added' => array('TIMESTAMP', '0'), 'document_added_by' => array('UINT', '0'), - 'document_edit_time' => array('UINT:11', '0'), + 'document_edit_time' => array('TIMESTAMP', '0'), 'document_edit_user' => array('UINT', '0'), 'document_edit_count' => array('USINT', '0'), 'enable_bbcode' => array('BOOL', '1'), Modified: trunk/develop/modules.txt =================================================================== --- trunk/develop/modules.txt 2008-04-24 15:16:16 UTC (rev 270) +++ trunk/develop/modules.txt 2008-04-26 10:41:49 UTC (rev 271) @@ -17,7 +17,6 @@ Overview View cat {category_id} - [Statistics]* Create project {category_id:0} Import project Modified: trunk/develop/permissions.txt =================================================================== --- trunk/develop/permissions.txt 2008-04-24 15:16:16 UTC (rev 270) +++ trunk/develop/permissions.txt 2008-04-26 10:41:49 UTC (rev 271) @@ -1,24 +1,36 @@ Permissions for phpBB Project: -Assigned by authors: (All local) +We're gonna have to make one or more new tables for permission masks. +This is because, apparently, the forum_id really isn't supposed to be used for something else. >_> +New auth methods: + +- acl_getp($opt, $clean = false) + Like acl_getf($opt, $clean = false) but for projects +- acl_getc($opt, $clean = false) + Like acl_getf($opt, $clean = false) but for categories + +Extend or modify most others (when I understand them all some more...) + +Assigned by authors (All per project): + - View the mod - Edit mod - Delete the mod - Download the mod - Add authors - Remove authors -- Assign roles to authors -- Assign permissions to authors +- Manage project roles and permissions - View docs - Manage docs Assigned by admin: - Create a mod (global) -- View category (local) // How -- Manage category (global) -- Manage roles (global) +- View category (per category) // How (<< What's this about??) +- Add MODs to category (per category) +- Manage categories (global) +- Manage roles/permissions (global) - Approve mod creation (global) Modified: trunk/develop/roles.txt =================================================================== --- trunk/develop/roles.txt 2008-04-24 15:16:16 UTC (rev 270) +++ trunk/develop/roles.txt 2008-04-26 10:41:49 UTC (rev 271) @@ -36,6 +36,8 @@ - Team: + - View anything + - Edit parts of a project (Will have edit-history and mandatory reason field to avoid abuse) - Manage category - Manage roles - Approve mod creation Added: trunk/develop/todo_list.txt =================================================================== --- trunk/develop/todo_list.txt (rev 0) +++ trunk/develop/todo_list.txt 2008-04-26 10:41:49 UTC (rev 271) @@ -0,0 +1,31 @@ +Todo list for phpBB Project + +- Make a TODO tracker!!! +- When at it make a bug tracker and feature tracker :) +- Extend auth class and create new permission tables +- Change the way authors are tied to projects (acl_roles or new equivalent) +- Add /languages and /templates support to download (and import) class +- Author ordering in MOD(X) file/project overview page +- Definitive decision on storing versioned files +- Generate filetree more efficiently (download class) +- Expand validate_project_title() +- Decide on what information will go on view category module +- Target version information +- Decide on better module structure +- Modules: + - Import project + - Manage project + - Diff generator + - Docs (perhaps wiki-style?) + - Trackers script++ (also needed for this todo list, so step on it! xD) + - Projects Team CP (maybe a new *CP?) + - Marx + - Search +- Logo support +- License handler +- phpbb.com MOD database sender +- Add language entries +- Add text and options to installer +- Add links to header (and index?) +- Make modx file... -_-' +- Package & Release! ^_^ Modified: trunk/phpbb3/root/includes/project/project_main.php =================================================================== --- trunk/phpbb3/root/includes/project/project_main.php 2008-04-24 15:16:16 UTC (rev 270) +++ trunk/phpbb3/root/includes/project/project_main.php 2008-04-26 10:41:49 UTC (rev 271) @@ -16,6 +16,8 @@ class project_main { public $u_action; + public $tpl_name; + public $page_title; /** * Main method @@ -31,6 +33,7 @@ if ($mode == 'import' || $mode == 'create_project') { + include("{$phpbb_root_path}includes/sources_project/functions_create.$phpEx"); include("{$phpbb_root_path}includes/sources_project/create_project.$phpEx"); } @@ -121,8 +124,11 @@ if (($mode == 'viewcat' && $category_info['right_id'] != ($category_info['left_id'] + 1)) || $mode != 'viewcat') { // There are categories here, so display them - $acl_categories = array_keys($auth->acl_getf('p_view_category', true)); - $category_ids = $db->sql_in_set('category_id', $acl_categories, false, true); + $acl_categories = array(); + $category_ids = '1 = 1'; + // Rewrite next line when auth class is extended + // $acl_categories = array_keys($auth->acl_getf('p_view_category', true)); + //$category_ids = $db->sql_in_set('category_id', $acl_categories, false, true); $sql = 'SELECT * FROM ' . PROJECT_CATEGORIES_TABLE . " Modified: trunk/phpbb3/root/includes/project/project_project.php =================================================================== --- trunk/phpbb3/root/includes/project/project_project.php 2008-04-24 15:16:16 UTC (rev 270) +++ trunk/phpbb3/root/includes/project/project_project.php 2008-04-26 10:41:49 UTC (rev 271) @@ -17,6 +17,7 @@ { public $u_action; public $tpl_name; + public $page_title; /** * Main method Added: trunk/phpbb3/root/includes/project/project_trackers.php =================================================================== --- trunk/phpbb3/root/includes/project/project_trackers.php (rev 0) +++ trunk/phpbb3/root/includes/project/project_trackers.php 2008-04-26 10:41:49 UTC (rev 271) @@ -0,0 +1,127 @@ +<?php +/** + * phpBB Project + * + * @package phpbbproject + * @version $Id:$ + * @copyright (c) 2008 phpBB Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + */ + +/** + * Trackers module + * + * @package phpbbproject + */ +class project_tracker +{ + public $u_action; + public $tpl_name; + public $page_title; + + /** + * Main method + * + * @param string|integer $id + * @param string $mode + */ + function main($id, $mode) + { + global $db, $user, $template; + global $phpbb_root_path, $phpEx; + global $project_id, $category_id; + + switch ($mode) + { + default: + case 'overview': + + // Get trackers for this project + $sql = 'SELECT t.*, types.*, COUNT(tc.*) AS tracker_categories, COUNT(tickets.*) AS tracker_tickets + FROM ' . PROJECT_TRACKERS_TABLE . ' t, ' . PROJECT_TRACKER_TYPES_TABLE . ' types, ' . PROJECT_TRACKER_CATEGORIES_TABLE . ' tc, ' . PROJECT_TRACKER_ENTRIES_TABLE . " tickets + WHERE t.project_id = $project_id + AND types.tracker_type_id = t.tracker_type + AND tickets.tracker_id = t.tracker_id + AND tc.tracker_id = t.tracker_id + GROUP BY t.tracker_id + ORDER BY types.tracker_type_title ASC"; + + $result = $db->sql_query($sql, 604800); + $trackers = $db->sql_fetchrowset($result); + $db->sql_freeresult($result); + + for ($i = 0, $size = sizeof($trackers); $i < $size; $i++) + { + $template->assign_block_vars('tracker_row', array( + 'TRACKER_TITLE' => $trackers[$i]['tracker_type_title'], + 'TRACKER_DESCRIPTION' => $trackers[$i]['tracker_type_description'], + 'TRACKER_TICKETS' => $trackers[$i]['tracker_tickets'], + 'TRACKER_CATEGORIES' => $trackers[$i]['tracker_categories'], + + 'U_TRACKER' => append_sid("{$phpbb_root_path}project.$phpEx", "i=trackers&mode=tickets&tid={$trackers[$i]['tracker_id']}"), + )); + } + + break; + + case 'tickets': + + $tracker_id = request_var('tid', 0); + $tracker_category = request_var('tcat', 0); + + // Just redirect if $tracker_id is 0 + if (!$tracker_id) + { + redirect(append_sid("{$phpbb_root_path}project.$phpEx", "i=trackers&mode=overview")); + } + + if ($tracker_category) + { + $sql = 'SELECT * + FROM ' . PROJECT_TRACKER_CATEGORIES_TABLE . " + WHERE category_id = $tracker_category"; + $result = $db->sql_query($sql, 604800); + $category_info = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($category_info['is_private'] && !$is_author) + { + // @todo some error... + } + + $template->assign_vars(array( + // @todo stuff... + )); + } + + $sql = 'SELECT t.*, c.*, s.* + FROM ' . PROJECT_TRACKER_TICKETS_TABLE . ' t, ' . PROJECT_TRACKER_CATEGORIES_TABLE . ' c, ' . PROJECT_TRACKER_STATUS_TABLE . " s + WHERE t.tracker_id = $tracker_id + " . (($tracker_category) ? "AND t.tracker_category = $tracker_category" : '') . ' + AND c.category_id = t.tracker_category + AND s.tracker_status_id = t.ticket_status + ' . ((!$is_author) ? 'AND c.is_private = 0' : '') . ' + ORDER BY ticket.ticket_time DESC'; + $result = $db->sql_query($sql, 604800); + $tickets = $db->sql_fetchrowset($result); + $db->sql_freeresult($result); + + for ($i = 0, $size = sizeof($tickets); $i < $size; $i++) + { + $template->assign_block_vars('ticket_row', array( + 'TICKET_TITLE' => $tickets[$i]['ticket_title'], + 'CATEGORY_TITLE' => $tickets[$i]['category_title'], + 'TICKET_STATUS' => $tickets[$i]['tracker_status_title'], + 'TICKET_AUTHOR' => get_username_string('full', $tickets[$i]['ticket_author'], project_get_author_name($tickets[$i]['ticket_author'])), + 'TICKET_TIME' => $user->format_date($tickets[$i]['ticket_time']), + + 'U_VIEW_TICKET' => append_sid("{$phpbb_root_path}project.$phpEx", "i=trackers&view_ticket&tid=$tracker_id&ticket={$trackers[$i]['ticket_id']}"), + )); + } + + break; + } + } +} + +?> \ No newline at end of file Property changes on: trunk/phpbb3/root/includes/project/project_trackers.php ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Modified: trunk/phpbb3/root/includes/sources_project/extensions.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/extensions.php 2008-04-24 15:16:16 UTC (rev 270) +++ trunk/phpbb3/root/includes/sources_project/extensions.php 2008-04-26 10:41:49 UTC (rev 271) @@ -15,7 +15,7 @@ */ class project_auth extends auth { - // I don't know why though :P + // Do stuff with extra tables... } /** Modified: trunk/phpbb3/root/project.php =================================================================== --- trunk/phpbb3/root/project.php 2008-04-24 15:16:16 UTC (rev 270) +++ trunk/phpbb3/root/project.php 2008-04-26 10:41:49 UTC (rev 271) @@ -64,6 +64,17 @@ if ($project_id) { $module->acl_project_id = $project_id; + + // Or do we want to overwrite it? + if (!$category_id) + { + $sql = 'SELECT category_id + FROM ' . PROJECT_PROJECTS_TABLE . " + WHERE project_id = $project_id"; + $result = $db->sql_query($sql, 604800); + $category_id = (int) $db->sql_fetchfield('category_id', false, $result); + $db->sql_freeresult($result); + } } if ($category_id) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-04-24 15:16:09
|
Revision: 270 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=270&view=rev Author: lord_le_brand Date: 2008-04-24 08:16:16 -0700 (Thu, 24 Apr 2008) Log Message: ----------- Fixed some nubs in create project and installer Both now work =) (at least for me =P) Modified Paths: -------------- trunk/develop/autopost_test.php trunk/phpbb3/root/includes/project/project_main.php trunk/phpbb3/root/includes/sources_project/create_project.php trunk/phpbb3/root/includes/sources_project/extensions.php trunk/phpbb3/root/includes/sources_project/functions_create.php trunk/phpbb3/root/project.php trunk/phpbb3/root/project_install/install_install.php trunk/phpbb3/root/project_install/schemas/schema_data.sql trunk/phpbb3/root/styles/prosilver/template/project_create.html Modified: trunk/develop/autopost_test.php =================================================================== --- trunk/develop/autopost_test.php 2008-04-24 13:20:07 UTC (rev 269) +++ trunk/develop/autopost_test.php 2008-04-24 15:16:16 UTC (rev 270) @@ -26,8 +26,8 @@ require("{$phpbb_root_path}includes/sources_project/extensions.$phpEx"); // phpBB Project Auth extension -unset($auth); -$auth = new project_auth(); +//unset($auth); +//$auth = new project_auth(); // Basic parameter data $id = request_var('i', ''); Modified: trunk/phpbb3/root/includes/project/project_main.php =================================================================== --- trunk/phpbb3/root/includes/project/project_main.php 2008-04-24 13:20:07 UTC (rev 269) +++ trunk/phpbb3/root/includes/project/project_main.php 2008-04-24 15:16:16 UTC (rev 270) @@ -65,7 +65,7 @@ $project_ids = $db->sql_in_set('project_id', $acl_projects, false, true); $optional_fields = ($config['project_autopost_enable']) ? ', topic_id' : ''; - $sql = "SELECT project_id, project_title, project_downloads $optional_fields + $sql = "SELECT project_id, project_title, project_description, project_downloads $optional_fields FROM " . PROJECT_PROJECTS_TABLE . " WHERE $project_ids ORDER BY project_downloads DESC"; @@ -140,8 +140,9 @@ $folder_image = 'project_cat'; $folder_image .= ($categories[$i]['right_id'] != ($categories[$i]['left_id'] + 1)) ? '_subcats' : ''; - $last_update_id = $categories[$i]['last_update_id']; - $last_update_time = ($last_update_id) ? $user->format_date($categories[$i]['last_update_time']) : 0; + $last_update_id = $categories[$i]['last_update_id']; + $last_update_time = ($last_update_id) ? $user->format_date($categories[$i]['last_update_time']) : 0; + $last_update_title = ''; if ($last_update_id) { @@ -345,6 +346,9 @@ if (isset($_POST['submit'])) { + include_once("{$phpbb_root_path}includes/sources_project/functions_create.$phpEx"); + include_once("{$phpbb_root_path}includes/sources_project/create_project.$phpEx"); + $error = array(); if (!check_form_key('project_create')) @@ -357,7 +361,7 @@ * @todo target_version generation */ $data = array( - 'project_category' => request_var('project_category', 0), + 'category_id' => request_var('project_category', 0), 'project_title' => utf8_normalize_nfc(request_var('project_title', '', true)), 'project_description' => utf8_normalize_nfc(request_var('project_description', '', true)), 'project_notes' => utf8_normalize_nfc(request_var('project_notes', '', true)), @@ -438,14 +442,14 @@ for ($i = 0, $size = sizeof($categories); $i < $size; $i++) { - if ($parent_id != $categories[$i]['category_id']) + if ($parent_id != $categories[$i]['parent_id']) { - $padding += ($categories[$i]['left_id'] > $categories[$i-1]['left_id']) ? 1 : -1; + $padding += ($categories[$i]['parent_id'] == $categories[$i-1]['category_id']) ? 1 : -1; } $template->assign_block_vars('category', array( - 'CATEGORY_ID' => $categories[$i]['category_id'], - 'CATEGORY_NAME' => str_repeat($padding_delimiter, $padding) . $categories[$i]['category_name'], + 'CATEGORY_ID' => $categories[$i]['category_id'], + 'CATEGORY_TITLE' => str_repeat($padding_delimiter, $padding) . $categories[$i]['category_title'], )); } Modified: trunk/phpbb3/root/includes/sources_project/create_project.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/create_project.php 2008-04-24 13:20:07 UTC (rev 269) +++ trunk/phpbb3/root/includes/sources_project/create_project.php 2008-04-24 15:16:16 UTC (rev 270) @@ -60,7 +60,7 @@ global $config, $user; $this->data = array_merge($data, array( - 'project_clean_title' => utf8_clean_string($data['project_title']), + 'project_title_clean' => utf8_clean_string($data['project_title']), 'project_install_time' => 0, 'project_level' => PROJECT_LEVEL_EASY, 'project_stage' => PROJECT_STAGE_DEV, @@ -95,7 +95,7 @@ $db->sql_query('INSERT INTO ' . PROJECT_PROJECT_AUTHORS_TABLE . $db->sql_build_array('INSERT', array( 'project_id' => $project_id, 'author_id' => $this->authors[$i]['author_id'], - 'author_role' => $this->authors[$i]['author_role_id'] + 'author_role' => $this->authors[$i]['author_role'] ))); } @@ -173,7 +173,7 @@ global $config, $user; $this->data = array_merge($data, array( - 'project_clean_title' => utf8_clean_string($data['project_title']), + 'project_title_clean' => utf8_clean_string($data['project_title']), 'project_install_time' => project_generate_install_time($this->actions), 'project_level' => project_generate_level('actions', $this->actions), 'project_last_update' => $this->current_time, @@ -186,6 +186,7 @@ * Process project creation * * @return integer Project ID + * @todo Change project_project_authors table to acl_roles table */ public function process() { @@ -204,7 +205,7 @@ $db->sql_query('INSERT INTO ' . PROJECT_PROJECT_AUTHORS_TABLE . $db->sql_build_array('INSERT', array( 'project_id' => $project_id, 'author_id' => $this->authors[$i]['author_id'], - 'author_role' => $this->authors[$i]['author_role_id'] + 'author_role' => $this->authors[$i]['author_role'] ))); } Modified: trunk/phpbb3/root/includes/sources_project/extensions.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/extensions.php 2008-04-24 13:20:07 UTC (rev 269) +++ trunk/phpbb3/root/includes/sources_project/extensions.php 2008-04-24 15:16:16 UTC (rev 270) @@ -33,6 +33,8 @@ */ function module_auth($module_auth, $forum_id = false, $category_id = false, $project_id = false) { + global $auth; + $module_auth = trim($module_auth); // Generally allowed to access module if module_auth is empty Modified: trunk/phpbb3/root/includes/sources_project/functions_create.php =================================================================== --- trunk/phpbb3/root/includes/sources_project/functions_create.php 2008-04-24 13:20:07 UTC (rev 269) +++ trunk/phpbb3/root/includes/sources_project/functions_create.php 2008-04-24 15:16:16 UTC (rev 270) @@ -28,12 +28,12 @@ } // Check the length - if ($config['project_title_min_chars'] && $project_title < $config['project_title_min_chars']) + if ($config['project_title_min_chars'] && utf8_strlen($project_title) < $config['project_title_min_chars']) { return 'PROJECT_TITLE_TOO_SHORT'; } - if ($config['project_title_max_chars'] && $project_title > $config['project_title_max_chars']) + if ($config['project_title_max_chars'] && utf8_strlen($project_title) > $config['project_title_max_chars']) { return 'PROJECT_TITLE_TOO_LONG'; } Modified: trunk/phpbb3/root/project.php =================================================================== --- trunk/phpbb3/root/project.php 2008-04-24 13:20:07 UTC (rev 269) +++ trunk/phpbb3/root/project.php 2008-04-24 15:16:16 UTC (rev 270) @@ -17,9 +17,9 @@ $phpEx = substr(strrchr(__FILE__, '.'), 1); require("{$phpbb_root_path}common.$phpEx"); require("{$phpbb_root_path}includes/functions_module.$phpEx"); -require("{$phpbb_root_path}includes/functions_project.$phpEx"); require("{$phpbb_root_path}includes/sources_project/constants.$phpEx"); require("{$phpbb_root_path}includes/sources_project/extensions.$phpEx"); +require("{$phpbb_root_path}includes/sources_project/functions_project.$phpEx"); // phpBB Project Auth extension //unset($auth); Modified: trunk/phpbb3/root/project_install/install_install.php =================================================================== --- trunk/phpbb3/root/project_install/install_install.php 2008-04-24 13:20:07 UTC (rev 269) +++ trunk/phpbb3/root/project_install/install_install.php 2008-04-24 15:16:16 UTC (rev 270) @@ -174,7 +174,7 @@ $team_group_id = 0; $error_message_ary = group_create($team_group_id, GROUP_SPECIAL, 'PROJECT_TEAM', '', array('group_colour' => 'E67300', 'group_receive_pm' => 1, 'group_legend' => 1)); - if (sizeof($error_message_ary)) + if ($error_message_ary !== false) { trigger_error(implode("<br />\n", $error_message_ary)); } Modified: trunk/phpbb3/root/project_install/schemas/schema_data.sql =================================================================== --- trunk/phpbb3/root/project_install/schemas/schema_data.sql 2008-04-24 13:20:07 UTC (rev 269) +++ trunk/phpbb3/root/project_install/schemas/schema_data.sql 2008-04-24 15:16:16 UTC (rev 270) @@ -154,11 +154,8 @@ INSERT INTO phpbb_project_categories (parent_id, left_id, right_id, category_title, category_description) VALUES (0, 0, 1, '{L_PROJECT_TEST_CAT_TITLE}', '{L_PROJECT_TEST_CAT_DESC}'); # Project -INSERT INTO phpbb_project_projects (category_id, topic_id, project_title, project_title_clean, project_description, project_level, project_install_time, project_notes, project_license, project_target_version, project_version, project_stage, project_target, project_logo, project_logo_type, project_logo_width, project_logo_height, project_start_time, project_owner, project_last_update, project_status, file_only, project_downloads) VALUES (1, 1, 0, 'Forum prune move', 'forum prune move', 'Add an option to move posts instead of delete them on pruning.', 1, 180, 'Requested by bulldogg597, one of the best MOD requests i''ve seen.', 1, '3.0.0', '1.0.1', 4, '', '', 0, 0, 0, 1203634800, 2, 1207951200, 1, 0, 0); +INSERT INTO phpbb_project_projects (category_id, topic_id, project_title, project_title_clean, project_description, project_level, project_install_time, project_notes, project_license, project_target_version, project_version, project_stage, project_target, project_logo, project_logo_type, project_logo_width, project_logo_height, project_start_time, project_owner, project_last_update, project_status, file_only, project_downloads) VALUES (1, 0, 'Forum prune move', 'forum prune move', 'Add an option to move posts instead of delete them on pruning.', 1, 180, 'Requested by bulldogg597, one of the best MOD requests i''ve seen.', 1, '3.0.0', '1.0.1', 4, '', '', 0, 0, 0, 1203634800, 2, 1207951200, 1, 0, 0); -# Author - acutally Igor but meh... -INSERT INTO phpbb_project_project_authors (project_id, author_id, author_role) SELECT 1, 2, role_id FROM phpbb_acl_roles WHERE role_name = 'ROLE_PROJECT_MANAGER'; - # Versions INSERT INTO phpbb_project_versions (version_id, project_id, previous_id, version_time, version_major, version_minor, version_revision, version_stage, version_release, version_changelog) VALUES (1, 1, 0, 1203634800, 1, 0, 0, 4, '', 'Initial release'); INSERT INTO phpbb_project_versions (version_id, project_id, previous_id, version_time, version_major, version_minor, version_revision, version_stage, version_release, version_changelog) VALUES (2, 1, 1, 1207432800, 1, 0, 0, 4, 'a', 'MODX file'); Modified: trunk/phpbb3/root/styles/prosilver/template/project_create.html =================================================================== --- trunk/phpbb3/root/styles/prosilver/template/project_create.html 2008-04-24 13:20:07 UTC (rev 269) +++ trunk/phpbb3/root/styles/prosilver/template/project_create.html 2008-04-24 15:16:16 UTC (rev 270) @@ -12,7 +12,7 @@ <dl> <dt><label for="project_category">{L_PROJECT_CATEGORY}</label></dt> <dd><select tabindex="1" name="project_category" id="project_category" title="{L_PROJECT_CATEGORY}"><!-- BEGIN category --> - <option value="{category.CATEGORY_ID}"<!-- IF category.CATEGORY_ID == CATEGORY_ID --> selected="selected"<!-- ENDIF -->>{category.CATEGORY_NAME}</option><!-- END --> + <option value="{category.CATEGORY_ID}"<!-- IF category.CATEGORY_ID == CATEGORY_ID --> selected="selected"<!-- ENDIF -->>{category.CATEGORY_TITLE}</option><!-- END --> </select></dd> </dl> <dl> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-04-24 13:20:02
|
Revision: 269 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=269&view=rev Author: lord_le_brand Date: 2008-04-24 06:20:07 -0700 (Thu, 24 Apr 2008) Log Message: ----------- Changed default project to Forum prune move (that also fixed a nub) Modified Paths: -------------- trunk/phpbb3/root/project_install/schemas/schema_data.sql Modified: trunk/phpbb3/root/project_install/schemas/schema_data.sql =================================================================== --- trunk/phpbb3/root/project_install/schemas/schema_data.sql 2008-04-23 23:59:42 UTC (rev 268) +++ trunk/phpbb3/root/project_install/schemas/schema_data.sql 2008-04-24 13:20:07 UTC (rev 269) @@ -154,23 +154,46 @@ INSERT INTO phpbb_project_categories (parent_id, left_id, right_id, category_title, category_description) VALUES (0, 0, 1, '{L_PROJECT_TEST_CAT_TITLE}', '{L_PROJECT_TEST_CAT_DESC}'); # Project -INSERT INTO phpbb_project_projects (category_id, topic_id, project_title, project_description, project_level, project_install_time, project_notes, project_license, project_target_version, project_version, project_stage, project_start_time, project_start_id, project_start_author, project_last_update, is_active, file_only, project_downloads) VALUES (1, 0, '{L_PROJECT_TESTING_TITLE}', '{L_PROJECT_TESTING_DESCRIPTION}', 1, 60, '{L_PROJECT_TESTING_NOTES}', 1, '3.0.RC2', '1.2.3', 3, 1167609600, 2, 'Lord Le Brand', 1185926400, 1, 0, 0); +INSERT INTO phpbb_project_projects (category_id, topic_id, project_title, project_title_clean, project_description, project_level, project_install_time, project_notes, project_license, project_target_version, project_version, project_stage, project_target, project_logo, project_logo_type, project_logo_width, project_logo_height, project_start_time, project_owner, project_last_update, project_status, file_only, project_downloads) VALUES (1, 1, 0, 'Forum prune move', 'forum prune move', 'Add an option to move posts instead of delete them on pruning.', 1, 180, 'Requested by bulldogg597, one of the best MOD requests i''ve seen.', 1, '3.0.0', '1.0.1', 4, '', '', 0, 0, 0, 1203634800, 2, 1207951200, 1, 0, 0); +# Author - acutally Igor but meh... +INSERT INTO phpbb_project_project_authors (project_id, author_id, author_role) SELECT 1, 2, role_id FROM phpbb_acl_roles WHERE role_name = 'ROLE_PROJECT_MANAGER'; + # Versions -INSERT INTO phpbb_project_versions (project_id, version_time, version_major, version_minor, version_revision, version_release, version_stage, version_changelog) VALUES (1, 1171411200, 0, 1, 0, '', 2, '{L_PROJECT_TEST_CHANGELOG_OLD}'); -INSERT INTO phpbb_project_versions (project_id, version_time, version_major, version_minor, version_revision, version_release, version_stage, version_changelog) VALUES (1, 1185926400, 1, 2, 3, '', 3, '{L_PROJECT_TEST_CHANGELOG_NEW}'); +INSERT INTO phpbb_project_versions (version_id, project_id, previous_id, version_time, version_major, version_minor, version_revision, version_stage, version_release, version_changelog) VALUES (1, 1, 0, 1203634800, 1, 0, 0, 4, '', 'Initial release'); +INSERT INTO phpbb_project_versions (version_id, project_id, previous_id, version_time, version_major, version_minor, version_revision, version_stage, version_release, version_changelog) VALUES (2, 1, 1, 1207432800, 1, 0, 0, 4, 'a', 'MODX file'); +INSERT INTO phpbb_project_versions (version_id, project_id, previous_id, version_time, version_major, version_minor, version_revision, version_stage, version_release, version_changelog) VALUES (3, 1, 2, 1207951200, 1, 0, 1, 4, '', 'some small changes and fixed pauls pickyness'); # Actions -INSERT INTO phpbb_project_actions (project_id) VALUES (1); -INSERT INTO phpbb_project_actions (project_id) VALUES (1); -INSERT INTO phpbb_project_actions (project_id) VALUES (1); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (1, 1, 1, 1203634800, 0, '', 1, 'ALTER TABLE phpbb_forums ADD COLUMN prune_move INT(9) UNSIGNED NOT NULL DEFAULT 0;', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (2, 1, 1, 1203634800, 10, 'adm/style/acp_forums.html', 4, ' <dl>\n <dt><label for="prune_sticky">{L_PRUNE_STICKY}:</label></dt>\n <dd><label><input type="radio" class="radio" name="prune_sticky" value="1"<!-- IF S_PRUNE_STICKY --> id="prune_sticky" checked="checked"<!-- ENDIF --> /> {L_YES}</label>\n <label><input type="radio" class="radio" name="prune_sticky" value="0"<!-- IF not S_PRUNE_STICKY --> id="prune_sticky" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>\n </dl>', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (3, 1, 1, 1203634800, 20, 'adm/style/acp_forums.html', 5, ' <dl>\n <dt><label for="prune_move">{L_PRUNE_MOVE}:</label><br /><span>{L_PRUNE_MOVE_EXPLAIN}</span></dt>\n <dd><select name="prune_move" id="prune_move"><option class="sep" value="0">{L_DISABLED}</option>{S_PRUNE_MOVE_OPTIONS}</select></dd>\n </dl>', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (4, 1, 1, 1203634800, 30, 'includes/acp/acp_forums.php', 4, ' ''prune_sticky'' => request_var(''prune_sticky'', false),', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (4, 1, 3, 1207951200, 30, 'includes/acp/acp_forums.php', 4, ' ''forum_password_unset'' => request_var(''forum_password_unset'', false),\n );', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (5, 1, 1, 1203634800, 40, 'includes/acp/acp_forums.php', 5, ' ''prune_move'' => request_var(''prune_move'', 0),', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (5, 1, 3, 1207951200, 40, 'includes/acp/acp_forums.php', 5, ' $forum_data[''prune_move''] = 0;\n if ($forum_data[''forum_type''] == FORUM_POST)\n {\n $forum_data[''prune_move''] = request_var(''prune_move'', 0);\n }', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (6, 1, 1, 1203634800, 50, 'includes/acp/acp_forums.php', 4, ' ''prune_freq'' => 1,', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (7, 1, 1, 1203634800, 60, 'includes/acp/acp_forums.php', 5, ' ''prune_move'' => 0,', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (8, 1, 1, 1203634800, 70, 'includes/acp/acp_forums.php', 4, ' ''S_PRUNE_ENABLE'' => ($forum_data[''enable_prune'']) ? true : false,', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (8, 1, 3, 1207951200, 70, 'includes/acp/acp_forums.php', 4, ' ''S_PRUNE_ENABLE'' => ($forum_data[''enable_prune'']) ? true : false,', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (9, 1, 1, 1203634800, 80, 'includes/acp/acp_forums.php', 5, ' ''S_PRUNE_MOVE_OPTIONS'' => make_forum_select(($action == ''edit'') ? $forum_data[''prune_move''] : false, ($action == ''edit'') ? $forum_data[''forum_id''] : false, false, false, false),', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (9, 1, 3, 1207951200, 80, 'includes/acp/acp_forums.php', 5, ' ''S_PRUNE_MOVE_OPTIONS'' => make_forum_select(($action == ''edit'') ? $forum_data[''prune_move''] : false, ($action == ''edit'') ? $forum_data[''forum_id''] : false, false, true),', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (10, 1, 1, 1203634800, 90, 'includes/functions_admin.php', 4, 'function prune(', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (11, 1, 1, 1203634800, 100, 'includes/functions_admin.php', 9, '$auto_sync = true', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (12, 1, 1, 1203634800, 110, 'includes/functions_admin.php', 10, ', $prune_move = false', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (13, 1, 1, 1203634800, 120, 'includes/functions_admin.php', 4, ' return delete_topics(''topic_id'', $topic_list, $auto_sync, false);', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (14, 1, 1, 1203634800, 130, 'includes/functions_admin.php', 6, ' if ($prune_move)\n {\n // $prune_move is the forum id we want to move our posts to\n return move_topics($topic_list, $prune_move, $auto_sync);\n }', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (15, 1, 1, 1203634800, 140, 'includes/functions_admin.php', 4, 'function auto_prune(', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (15, 1, 2, 1207432800, 140, 'includes/functions_admin.php', 4, 'function auto_prune($forum_id', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (16, 1, 1, 1203634800, 150, 'includes/functions_admin.php', 4, ' $sql = ''SELECT forum_name', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (17, 1, 1, 1203634800, 160, 'includes/functions_admin.php', 9, 'forum_name', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (18, 1, 1, 1203634800, 170, 'includes/functions_admin.php', 10, ', prune_move', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (19, 1, 1, 1203634800, 180, 'includes/functions_admin.php', 4, 'prune($forum_id, $prune_mode, $prune_date, $prune_flags, true', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (20, 1, 1, 1203634800, 190, 'includes/functions_admin.php', 9, 'prune($forum_id, $prune_mode, $prune_date, $prune_flags, true', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (21, 1, 1, 1203634800, 200, 'includes/functions_admin.php', 10, ', $row[''prune_move'']', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (22, 1, 1, 1203634800, 210, 'language/en/acp/forums.php', 4, '?>', ''); +INSERT INTO phpbb_project_actions (action_id, project_id, version_id, version_time, action_order, action_file, action_type, action_content, action_comment) VALUES (23, 1, 1, 1203634800, 220, 'language/en/acp/forums.php', 6, '$lang = array_merge($lang, array(\n ''PRUNE_MOVE'' => ''Move pruned forums'',\n ''PRUNE_MOVE_EXPLAIN'' => ''If you select a forum from the list below, topics will be moved to that forum instead of deleted.'',\n));', ''); -INSERT INTO phpbb_project_action_contents (action_id, version_id, version_time, action_order, action_type, action_content) VALUES (1, 1, 1171411200, 1, 4, 'index.php'); -INSERT INTO phpbb_project_action_contents (action_id, version_id, version_time, action_order, action_type, action_content) VALUES (2, 1, 1171411200, 2, 5, '?>'); -INSERT INTO phpbb_project_action_contents (action_id, version_id, version_time, action_order, action_type, action_content) VALUES (3, 1, 1171411200, 3, 7, '// See I can do mods!'); - -INSERT INTO phpbb_project_action_contents (action_id, version_id, version_time, action_order, action_type, action_content) VALUES (3, 2, 1185926400, 3, 7, '// See I can do mods! :D Great aint it!'); - # Bookmark the project INSERT INTO phpbb_project_marx (project_id, user_id, marx_type) VALUES (1, 2, 1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |