Thread: [Phpbbproject-svn] SF.net SVN: phpbbproject:[282] trunk
phpBB download manager, mainly aimed at MOD authors
Status: Planning
Brought to you by:
lord_le_brand
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-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-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-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 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...> - 2009-07-25 14:24:06
|
Revision: 295 http://phpbbproject.svn.sourceforge.net/phpbbproject/?rev=295&view=rev Author: lord_le_brand Date: 2009-07-25 14:23:28 +0000 (Sat, 25 Jul 2009) Log Message: ----------- Removed Paths: ------------- trunk/develop/ trunk/phpbb3/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2014-09-10 08:08:51
|
Revision: 297 http://sourceforge.net/p/phpbbproject/svn/297 Author: lord_le_brand Date: 2014-09-10 08:08:41 +0000 (Wed, 10 Sep 2014) Log Message: ----------- A new directory structure is put into place. Development will take a new path, one where features get added along the way and new releases are when a feature is done. In /trunk/develop/ documents will be added to guide the design. Added Paths: ----------- trunk/develop/ trunk/install_ascraeus/ trunk/install_olympus/ trunk/install_olympus/schemas/ trunk/install_olympus/schemas/mysql_41_schema.sql trunk/source_ascraeus/ trunk/source_olympus/ Property Changed: ---------------- / Index: =================================================================== --- 2009-07-29 20:30:05 UTC (rev 296) +++ 2014-09-10 08:08:41 UTC (rev 297) Property changes on: ___________________________________________________________________ Deleted: svn:externals ## -1 +0,0 ## -branches/unfinished_business/phpbb3/root/includes/sources_project/mod http://svn2.assembla.com/svn/evilmods/3.0/mod_tools/handler/trunk/root/includes/mod \ No newline at end of property Added: trunk/install_olympus/schemas/mysql_41_schema.sql =================================================================== --- trunk/install_olympus/schemas/mysql_41_schema.sql (rev 0) +++ trunk/install_olympus/schemas/mysql_41_schema.sql 2014-09-10 08:08:41 UTC (rev 297) @@ -0,0 +1,71 @@ +CREATE TABLE phpbb_phpbbproject_projects ( + project_id medumint(8) unsigned not null auto_increment, + project_name varchar(255) default '' not null, + project_summary text not null, + author_user_id mediumint(8) unsigned default '0' not null, + project_created int(11) unsigned default '0' not null, + category_id mediumint(8) unsigned default '0' not null, + project_current_version varchar(20) default '' not null, + project_last_update int(11) unsigned default '0' not null, + primary key (project_id), + key author_user_id (author_user_id), + key category_id (category_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + +CREATE TABLE phpbb_phpbbproject_categories ( + category_id mediumint(8) unsigned not null auto_increment, + parent_id mediumint(8) unsigned default '0' not null, + left_id mediumint(8) unsigned default '0' not null, + right_id mediumint(8) unsigned default '0' not null, + category_name varchar(255) default '' not null, + category_desc text not null, + category_projects_per_page tinyint(4) default '0' not null, + category_projects mediumint(8) default '0' not null, + category_last_project_id mediumint(8) unsigned default '0' not null, + category_last_project_time int(11) unsigned default '0' not null, + primary key (category_id), + key left_right_id (left_id, right_id), + key category_last_project_id (category_last_project_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + +CREATE TABLE phpbb_phpbbproject_downloads ( + download_id int(10) unsigned not null auto_increment, + project_id mediumint(8) unsigned default '0' not null, + download_version varchar(20) default '' not null, + download_filepath varchar(255) default '' not null, + download_filename varchar(255) default '' not null, + download_uploadtime int(11) unsigned default '0' not null, + download_count mediumint(8) unsigned default '0' not null, + download_filetype varchar(100) default '' not null, + download_extension varchar(100) default '' not null, + is_orphan tinyint(1) unsigned default '0' not null, + primary key (download_id), + key project_id (project_id), + key download_uploadtime (download_uploadtime), + key is_orphan (is_orphan) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + +CREATE TABLE phpbb_phpbbproject_acl_groups ( + group_id mediumint(8) unsigned default '0' not null, + project_id mediumint(8) unsigned default '0' not null, + category_id mediumint(8) unsigned default '0' not null, + auth_option_id mediumint(8) unsigned default '0' not null, + auth_role_id mediumint(8) unsigned default '0' not null, + auth_setting tinyint(2) default '0' not null, + key group_id (group_id), + key auth_option_id (auth_option_id), + key auth_role_id (auth_role_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + +CREATE TABLE phpbb_phpbbproject_acl_users ( + user_id mediumint(8) unsigned default '0' not null, + project_id mediumint(8) unsigned default '0' not null, + category_id mediumint(8) unsigned default '0' not null, + auth_option_id mediumint(8) unsigned default '0' not null, + auth_role_id mediumint(8) unsigned default '0' not null, + auth_setting tinyint(2) default '0' not null, + key user_id (user_id), + key auth_option_id (auth_option_id), + key auth_role_id (auth_role_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...> - 2014-10-22 17:58:52
|
Revision: 307 http://sourceforge.net/p/phpbbproject/svn/307 Author: lord_le_brand Date: 2014-10-22 17:58:48 +0000 (Wed, 22 Oct 2014) Log Message: ----------- properties for build added Modified Paths: -------------- trunk/build.xml Added Paths: ----------- trunk/build.properties Added: trunk/build.properties =================================================================== --- trunk/build.properties (rev 0) +++ trunk/build.properties 2014-10-22 17:58:48 UTC (rev 307) @@ -0,0 +1,87 @@ +version=0.0.0 +commit="none" +name=${phing.project.name} +summary="Summary" +author.name="Lord Le Brand" +author.email="lor...@gm..." +author.username="lordlebrand" +description="Description last commit ${commit}" +dir.output=${project.basedir}/build +dir.tmp=${dir.output}/tmp +dir.src=${project.basedir}/src +dir.vendor=${project.basedir}/vendor +dir.vendor.bin=${dir.vendor}/bin +dir.vendor.php=${dir.vendor}/php +phing=${php.exec} ${dir.vendor.php}/phing.php -Dversion=${version} -Dcommit=${commit} +;phing=${dir.vendor.bin}/phing +package.output.dir=${dir.output} +php.exec=${php.bin} ${php.args} +php.args=-c ${php.ini} -d include_path=${dir.vendor.php}:${dir.vendor.php}/log4php +pear.cfg=${dir.vendor}/.pearrc +defaultpear.exec=${defaultpear.bin} -c ${pear.cfg} +pear.exec=${dir.vendor}/bin/pear -c ${pear.cfg} + +phpdepend.exec=${php.exec} ${dir.vendor.bin}/pdepend +phpdepend.output=${dir.output}/php-depend +phpdepend.output.html.dir=${phpdepend.output}/html +phpdepend.output.html.file=${phpdepend.output.html.dir}/index.html +phpdepend.output.xml.dir=${phpdepend.output} +phpdepend.output.xml.file=${phpdepend.output.xml.dir}/php-depend.xml +phpdepend.style=resources/pdepend.xsl +phpdepend.args=--jdepend-xml=${phpdepend.output.xml.file} --jdepend-chart=${phpdepend.output.html.dir}/pdepend.svg --ignore=.git,test/ --overview-pyramid=${phpdepend.output.html.dir}/pyramid.svg ${dir.src} + +phpcs.exec=${php.exec} ${dir.vendor.bin}/phpcs +phpcs.output=${dir.output}/php-cs +phpcs.output.html.dir=${phpcs.output}/html +phpcs.output.html.file=${phpcs.output.html.dir}/index.html +phpcs.output.xml.dir=${phpcs.output} +phpcs.output.xml.file=${phpcs.output.xml.dir}/php-cs.xml +phpcs.style=resources/checkstyle.xsl +phpcs.args=--report=checkstyle --report-file=${phpcs.output.xml.file} --standard=PEAR --extensions=php --ignore=.git/,doc/,resources/,build ${dir.src} + +junit.output.xml.dir=${phpunit.output} +junit.output.xml.file=${junit.output.xml.dir}/junit.xml +junit.style=resources/phpunit_to_surefire.xslt +phpunit.exec=TMPDIR=${dir.output}/tmp TEST=true ${php.exec} ${dir.vendor.bin}/phpunit +phpunit.output=${dir.output}/php-unit +phpunit.output.html.dir=${phpunit.output}/html +phpunit.output.xml.dir=${phpunit.output} +phpunit.output.xml.file=${phpunit.output.xml.dir}/php-unit.xml +phpunit.args=${php.args} --repeat 1 --stop-on-error --stop-on-failure --stop-on-incomplete --debug --verbose --process-isolation --bootstrap ./bootstrap.php --configuration phpunit.xml --log-junit ${phpunit.output.xml.file} --coverage-html ${phpunit.output.html.dir} --verbose + +phpmd.exec=${php.exec} ${dir.vendor.bin}/phpmd +phpmd.output=${dir.output}/php-md +phpmd.output.html.dir=${phpmd.output}/html +phpmd.output.html.file=${phpmd.output.html.dir}/index.html +phpmd.output.xml.dir=${phpmd.output} +phpmd.output.xml.file=${phpmd.output.xml.dir}/php-md.xml +phpmd.style=resources/pmd.xslt +phpmd.args=${dir.src} xml rulesets/codesize.xml,rulesets/unusedcode.xml,rulesets/naming.xml --extensions php --reportfile ${phpmd.output.xml.file} + +phpcpd.exec=${php.exec} ${dir.vendor.bin}/phpcpd +phpcpd.output=${dir.output}/php-cpd +phpcpd.output.html.dir=${phpcpd.output}/html +phpcpd.output.html.file=${phpcpd.output.html.dir}/index.html +phpcpd.output.xml.dir=${phpcpd.output} +phpcpd.output.xml.file=${phpcpd.output.xml.dir}/php-cpd.xml +phpcpd.style=resources/cpd.xslt +phpcpd.args=--log-pmd ${phpcpd.output.xml.file} --verbose ${dir.src} + +phpdoc.exec=${php.exec} ${dir.vendor.bin}/docblox +phpdoc.output=${dir.output}/php-doc +phpdoc.output.html.dir=${phpdoc.output}/html +phpdoc.args=-d ${dir.src} -t ${phpdoc.output.html.dir} --sourcecode --visibility public,protected,private --parseprivate --title ${summary} + +phploc.exec=${php.exec} ${dir.vendor.bin}/phploc +phploc.output=${dir.output}/php-loc +phploc.output.html.dir=${phploc.output}/html +phploc.output.html.file=${phploc.output.html.dir}/phploc.txt +phploc.args=${dir.src} + +phar=${name}-${version}-${commit}.phar +genphar.exec=${php.exec} resources/generatePhar.php +genphar.args=${package.output.dir}/${phar} ${dir.src} +peartgz=${name}-${version}.tgz + +genpear.exec=${php.exec} resources/generatePackageXml.php ${name} ${summary} ${description} ${version} ${author.name} ${author.email} ${author.username} ${pear.channel} + Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2014-10-22 17:35:06 UTC (rev 306) +++ trunk/build.xml 2014-10-22 17:58:48 UTC (rev 307) @@ -7,8 +7,8 @@ </target> <target name="package"> - <zip destfile="phpbbproject-{$VERSION_PATH}.zip" basedir="src" /> - <tar destfile="phpbbproject-{$VERSION_PATH}.tar" basedir="src" /> + <zip destfile="phpbbproject-{$version}.zip" basedir="src" /> + <tar destfile="phpbbproject-{$version}.tar" basedir="src" /> </target> <target name="docs"> @@ -22,7 +22,21 @@ <target name="build"> </target> - + <target name="test"> + <mkdir dir="build/test/html"/> + <mkdir dir="build/test/xml"/> + <mkdir dir="build/test/tmp"/> + <exec + command="TMPDIR=build/test/tmp TEST=true php ${dir.vendor.bin}/phpunit" + dir="${project.basedir}/test" + passthru="true" + /> + <xslt + file="${phpunit.output.xml.file}" + tofile="${junit.output.xml.file}" + style="${junit.style}" + /> + </target> <target name="clean"> <delete dir="docs" /> <delete dir="build" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2014-10-22 18:39:57
|
Revision: 311 http://sourceforge.net/p/phpbbproject/svn/311 Author: lord_le_brand Date: 2014-10-22 18:39:47 +0000 (Wed, 22 Oct 2014) Log Message: ----------- build.xml fix #4 + added testsuite skeleton Modified Paths: -------------- trunk/build.xml Added Paths: ----------- trunk/test/ trunk/test/appTest.php trunk/test/phpunit.xml Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2014-10-22 18:09:20 UTC (rev 310) +++ trunk/build.xml 2014-10-22 18:39:47 UTC (rev 311) @@ -3,8 +3,8 @@ <project name="phpBB Project" default="build" basedir="." description="Phing buildfile for phpBB Project"> <property file="./build.properties"/> <target name="prepare"> - <mkdir dir="docs" /> - <mkdir dir="build" /> + <mkdir dir="${phpdoc.output.html.dir}" /> + <mkdir dir="${dir.output}" /> </target> <target name="package"> @@ -13,34 +13,30 @@ </target> <target name="docs"> - <phpdoc title="phpBB Project" destdir="docs" output="HTML:Smarty:PHP" linksource="true" quiet="true"> - <fileset dir="src"> - <include name="*.php"/> - </fileset> - </phpdoc> + <exec + command="${phpdoc.exec} ${phpdoc.args}" + dir="${project.basedir}" + passthru="true" + /> </target> <target name="build"> </target> <target name="test"> - <mkdir dir="${phpunit.output.xml.dir}"/> - <mkdir dir="${phpunit.output.html.dir}"/> - <exec - command="TMPDIR=build/test/tmp TEST=true php ${dir.vendor.bin}/phpunit" - dir="${project.basedir}/test" - passthru="true" - /> - <xslt - file="${phpunit.output.xml.file}" - tofile="${junit.output.xml.file}" - style="${junit.style}" - /> + <mkdir dir="${phpunit.output.xml.dir}"/> + <mkdir dir="${phpunit.output.html.dir}"/> + <exec + command="${phpunit.exec} ${phpunit.args}" + dir="${project.basedir}/test" + passthru="true" + /> + <xslt + file="${phpunit.output.xml.file}" + tofile="${junit.output.xml.file}" + style="${junit.style}" + /> </target> <target name="clean"> - <delete dir="docs" /> - <delete dir="build" /> - <delete file="phpbbproject-*.zip" /> - <delete file="phpbbproject-*.tar" /> </target> </project> Added: trunk/test/appTest.php =================================================================== --- trunk/test/appTest.php (rev 0) +++ trunk/test/appTest.php 2014-10-22 18:39:47 UTC (rev 311) @@ -0,0 +1,14 @@ +<?php + +class Test_App extends PHPUnit_Framework_TestCase +{ + /** + * @test + */ + public function can_return_project() + { + $this->assertEquals(0, 0); + } +} + +?> Added: trunk/test/phpunit.xml =================================================================== --- trunk/test/phpunit.xml (rev 0) +++ trunk/test/phpunit.xml 2014-10-22 18:39:47 UTC (rev 311) @@ -0,0 +1,19 @@ +<phpunit + backupGlobals="false" + backupStaticAttributes="false" + syntaxCheck="false" + convertErrorsToExceptions="true" + convertNoticesToExceptions="true" + convertWarningsToExceptions="true" +> + <filter> + <whitelist> + <directory suffix=".php">../src</directory> + </whitelist> + </filter> + <testsuites> + <testsuite name="phpBB Project Testsuite"> + <directory suffix=".php">TestApp</directory> + </testsuite> + </testsuites> +</phpunit> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2014-10-22 19:45:51
|
Revision: 314 http://sourceforge.net/p/phpbbproject/svn/314 Author: lord_le_brand Date: 2014-10-22 19:45:46 +0000 (Wed, 22 Oct 2014) Log Message: ----------- Fixes to build files Modified Paths: -------------- trunk/build.properties trunk/build.xml Modified: trunk/build.properties =================================================================== --- trunk/build.properties 2014-10-22 19:25:32 UTC (rev 313) +++ trunk/build.properties 2014-10-22 19:45:46 UTC (rev 314) @@ -1,4 +1,5 @@ version=0.0.0 +targetlist="3.0.12" commit="none" name=${phing.project.name} summary="Summary" Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2014-10-22 19:25:32 UTC (rev 313) +++ trunk/build.xml 2014-10-22 19:45:46 UTC (rev 314) @@ -8,8 +8,7 @@ </target> <target name="package"> - <zip destfile="phpbbproject-${version}.zip" basedir="src" /> - <tar destfile="phpbbproject-${version}.tar" basedir="src" /> + <tar destfile="phpbbproject-${version}.tar.gz" compression="gzip" basedir="${dir.output}/${version}" /> </target> <target name="docs"> @@ -21,9 +20,10 @@ </target> <target name="build"> - <foreach param="targetversion" target="build_target"> - <fileset dir="target"><type type="dir"/></fileset> - </foreach> + <copy todir="${dir.output}/${version}"> + <fileset dir="${dir.src}" /> + </copy> + <foreach list="${targetlist}" param="targetversion" target="build_target" /> </target> <target name="build_target"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |