#!/usr/bin/php -q "authenticated user", 3 => "owner", 4 => "developer", 5 => "origo admin")); // $sql = "UPDATE `node` SET `status`=1, `moderate`=0, `sticky`=0"; // $sql = "INSERT INTO `system` VALUES ('sites/all/modules/section_edit/section_edit.module', 'section_edit', 'module', 'Allow sections (identified by Mediawiki headers) to be edited', 1, 0, 0, 0, 0)"; /**********************************************/ /* queries from old script */ /**********************************************/ // //set_variable('upload_extensions_default', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp'); // //set_variable('upload_uploadsize_default', '500'); // //set_variable('upload_usersize_default', '5000'); // // //mysql_query("UPDATE permission SET perm = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access site-wide contact form, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, access content, create page content, create story content, create wiki content, edit own page content, edit own story content, edit own wiki content, edit page content, edit story content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles, access private developer pages' WHERE rid = 3"); // //mysql_query("UPDATE permission SET perm = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access site-wide contact form, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, access content, create page content, create story content, create wiki content, edit own page content, edit own story content, edit own wiki content, edit page content, edit story content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles, access private developer pages' WHERE rid = 4"); // // //mysql_query(" // // CREATE TABLE developer_pages ( // // nid int(10) unsigned NOT NULL default '0' PRIMARY KEY, // // private int // // ) /*!40100 DEFAULT CHARACTER SET utf8 */; // // "); // // //mysql_query("INSERT INTO system VALUES ('sites/all/modules/developer_pages/developer_pages.module', 'developer_pages', 'module', 'Private pages only for Project Members', 1, 0, 0, 0, 0)"); // // //mysql_query("DELETE FROM blocks WHERE module='search';"); // //mysql_query("INSERT INTO `blocks` (`module`, `delta`, `theme`, `status`, `weight`, `region`, `custom`, `throttle`, `visibility`, `pages`, `title`) VALUES ('search', '0', 'simple', 1, -5, 'left', 0, 0, 0, '', '');"); // // // // /*mysql_query("INSERT INTO `system` VALUES ('sites/all/modules/captcha/captcha.module', 'captcha', 'module', 'Implements a captcha to registration, comment, contact and node entry forms.', 1, 0, 0, 0, 0);"); // mysql_query("INSERT INTO `system` VALUES ('sites/all/modules/form_store/form_collect.module', 'form_collect', 'module', 'Collects form information while browsing the site.', 0, 0, 0, -1, 0);"); // mysql_query("INSERT INTO `system` VALUES ('sites/all/modules/form_store/form_store.module', 'form_store', 'module', 'Provides form information to other modules.', 1, 0, 0, 2, 0);"); // // // mysql_query("INSERT INTO `variable` VALUES ('captcha_points', 's:104:\"a:2:{s:13:\"user_register\";s:23:\"register a user account\";s:9:\"user_pass\";s:22:\"request a new password\";}\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_register_anonymous_user_captcha', 's:12:\"captcha/Math\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_pass_anonymous_user_captcha', 's:12:\"captcha/Math\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_register_authenticated_user_captcha', 's:4:\"none\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_pass_authenticated_user_captcha', 's:4:\"none\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_register_developer_captcha', 's:4:\"none\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_pass_developer_captcha', 's:4:\"none\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_register_owner_captcha', 's:4:\"none\";');"); // mysql_query("INSERT INTO `variable` VALUES ('user_pass_owner_captcha', 's:4:\"none\";');"); // // // mysql_query("CREATE TABLE {form_store_forms} ( // fid int(10) auto_increment, // form_id varchar(255) NOT NULL default '', // description varchar(255), // preview TEXT, // PRIMARY KEY (fid), // KEY (form_id)*/ // // ) /*!40100 DEFAULT CHARACTER SET utf8 */;"); // // /* // //mysql_query("INSERT INTO `form_store_forms` VALUES (1, 'comment_form', 'post a comment', '');"); // mysql_query("INSERT INTO `form_store_forms` VALUES (1, 'user_register', 'register a user account', '');"); // mysql_query("INSERT INTO `form_store_forms` VALUES (2, 'user_pass', 'request a new password', '');"); // //mysql_query("INSERT INTO `form_store_forms` VALUES (4, 'page_node_form', 'create a page', '');"); // //mysql_query("INSERT INTO `form_store_forms` VALUES (5, 'story_node_form', 'create a story', '');"); // */ // // /* mysql_query("CREATE TABLE `form_store_forms` ( // `fid` int(10) NOT NULL auto_increment, // `form_id` varchar(255) NOT NULL default '', // `description` varchar(255) default NULL, // `preview` text, // PRIMARY KEY (`fid`), // KEY `form_id` (`form_id`) //) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;");*/ // // /* // // mysql_query("TRUNCATE `form_store_forms`;"); // mysql_query("INSERT INTO `form_store_forms` VALUES (1, 'comment_form', 'post a comment', '');"); // mysql_query("INSERT INTO `form_store_forms` VALUES (2, 'user_register', 'register a user account', '');"); // mysql_query("INSERT INTO `form_store_forms` VALUES (3, 'user_pass', 'request a new password', '');"); // mysql_query("INSERT INTO `form_store_forms` VALUES (4, 'page_node_form', 'create a page', '');"); // mysql_query("INSERT INTO `form_store_forms` VALUES (5, 'story_node_form', 'create a story', '');"); // // mysql_query("TRUNCATE `cache`;"); // mysql_query("TRUNCATE `cache_filter`;"); // mysql_query("TRUNCATE `cache_menu`;"); // mysql_query("TRUNCATE `cache_page`;"); */ // // // //set_variable('origo_project_name', $project['name']); // //set_variable('comment_preview', '0'); // // // // /*mysql_query("INSERT INTO `node_type` VALUES ('issue', 'Issue', 'issue_tracker', 'An issue or bug report.', '', 1, 'Title', 1, 'Description', 0, 0, 0, 1, 'issue');"); // // mysql_query("UPDATE permission SET perm = 'access comments, post comments, post comments without approval, access site-wide contact form, view original images, create issue, access content, search content, use advanced search, view uploaded files, access user profiles' WHERE rid = 2"); // mysql_query("UPDATE permission SET perm = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access site-wide contact form, access private developer pages, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, create issue, edit issue, access content, create page content, create story content, create wiki content, edit own page content, edit own story content, edit own wiki content, edit page content, edit story content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles' WHERE rid = 3"); // mysql_query("UPDATE permission SET perm = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access site-wide contact form, access private developer pages, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, create issue, edit issue, access content, create page content, create story content, create wiki content, edit own page content, edit own story content, edit own wiki content, edit page content, edit story content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles' WHERE rid = 4"); // mysql_query("INSERT INTO `sequences` VALUES ('vocabulary_vid', 2);"); // mysql_query("UPDATE sequences SET id = 2 WHERE name = 'vocabulary_vid'"); // mysql_query("INSERT INTO `system` VALUES ('sites/all/modules/issue_tracker/issue_tracker.module', 'issue_tracker', 'module', 'Manage issues, bugs, Todos.', 1, 0, 0, 0, 0);"); // mysql_query("INSERT INTO `vocabulary` VALUES (2, 'Issue Tags', '', '', 0, 0, 0, 0, 1, 'taxonomy', 0);"); // mysql_query("INSERT INTO `vocabulary_node_types` VALUES (2, 'issue');");*/ // // // //symlink('/usr/local/lib/origo/origo-commit.py', '/data/svn/' . $project['name'] . '/hooks/post-commit'); // //symlink($project['name'], '/data/www/origo/drupal/sites/' . $project['name'] . '.origo.ethz.ch'); // // //set_variable('comment_preview', '0'); // //mysql_query("UPDATE permission SET perm = 'edit own blog, access comments, administer comments, post comments, post comments without approval, access site-wide contact form, access private developer pages, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, create issue, edit issue, access content, create page content, create story content, create wiki content, edit own page content, edit own story content, edit own wiki content, edit page content, edit story content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles, origo project settings' WHERE rid = 3"); // //mysql_query("INSERT INTO `permission` VALUES (5, 'edit own blog, access comments, administer comments, post comments, post comments without approval, access site-wide contact form, access private developer pages, create images, edit own images, view original images, access advanced options, access all images, access img_assist, use original size, create issue, edit issue, access content, create page content, create story content, create wiki content, edit own page content, edit own story content, edit own wiki content, edit page content, edit story content, edit wiki content, revert revisions, view revisions, search content, use advanced search, upload files, view uploaded files, access user profiles, origo project settings, origo admin access', 0);"); // //mysql_query("INSERT INTO `role` VALUES (5, 'origo admin');"); // // // // Update theme // /*set_variable('theme_default', 'origo_simple'); // // $res = mysql_query("SELECT * FROM `blocks` WHERE `theme`='origo_simple'"); // if (mysql_num_rows($res) == 0) { // mysql_query("UPDATE `blocks` SET `theme`='origo_simple' WHERE `theme`='simple'"); // } // // $res = mysql_query("SELECT * FROM `system` WHERE `filename`='sites/all/themes/origo_simple/page.tpl.php'"); // if (mysql_num_rows($res) == 0) { // mysql_query("UPDATE `system` SET `filename`='sites/all/themes/origo_simple/page.tpl.php' WHERE `filename`='sites/all/themes/simple/page.tpl.php'"); // }*/ // // //mysql_query("UPDATE `system` SET `name`='origo_simple' WHERE `filename`='sites/all/themes/origo_simple/page.tpl.php'"); // // //mysql_query("DELETE FROM `blocks` WHERE `module`='search' AND `theme`='origo_simple'"); // // mysql_query("TRUNCATE `cache`;"); // mysql_query("TRUNCATE `cache_filter`;"); // mysql_query("TRUNCATE `cache_menu`;"); // mysql_query("TRUNCATE `cache_page`;"); // ?>