Changeset 112
- Timestamp:
- 06/07/07 02:55:24 (1 year ago)
- Files:
-
- folio/folio/config.php (modified) (1 diff)
- folio/folio/control/commentbox_postdata.php (modified) (2 diffs)
- folio/folio/control/page_edit_post.php (modified) (2 diffs)
- folio/folio/html/setupdb.php (modified) (5 diffs)
- folio/folio/lib.php (modified) (3 diffs)
- folio/folio/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
folio/folio/config.php
r111 r112 3 3 4 4 global $CFG; 5 $FOLIO_CFG->version = 0.6 ;5 $FOLIO_CFG->version = 0.61; 6 6 $FOLIO_CFG->ajaxprefix = 'folio_control_tree_'; 7 7 folio/folio/control/commentbox_postdata.php
r111 r112 55 55 56 56 // Insert new record into db. 57 insert_record('folio_comment',$comment);57 $i = insert_record('folio_comment',$comment); 58 58 59 59 // Create RSS record … … 64 64 $comment->creator_username, 65 65 $comment->item_type . '_comment', 66 $ comment->item_ident,66 $i, 67 67 '', 68 68 'Comment by ' . $comment->creator_username . ' on ' . $comment->item_title, folio/folio/control/page_edit_post.php
r111 r112 30 30 // Note, this is called by files in /mod/folio/html/, and not from the folder that this page is actually residing inside of. 31 31 require_once('../../../includes.php'); 32 32 global $db, $CFG; 33 33 34 // The security ident needs to be set by page_edit_security_post before this can run. 34 35 if (!isset($security_ident) ) { … … 96 97 $security 97 98 ); 99 100 // Update any comments to match the same permission level. 101 $stmt = $db->Prepare("UPDATE {$CFG->prefix}folio_comment SET access = '{$security}' " . 102 "WHERE item_ident = {$insert_id} AND item_type = 'page'" ); 103 $returnvalue = $db->Execute($stmt); 104 105 // Update RSS of any comments to match the same permission level. 106 $stmt = $db->Prepare("UPDATE {$CFG->prefix}folio_rss SET access = '{$security}' " . 107 "WHERE type_ident IN ( SELECT activity_ident FROM {$CFG->prefix}folio_comment WHERE item_ident = " . 108 " {$insert_id} AND item_type = 'page') AND type = 'page_comment'" ); 109 $returnvalue = $db->Execute($stmt); 98 110 99 111 ?> folio/folio/html/setupdb.php
r111 r112 12 12 13 13 // The current version of the folio db scheme. 14 $folio_dbversion = 7;14 $folio_dbversion = 8; 15 15 16 16 // Setup variables. … … 33 33 34 34 // See if a user other than news is trying to run this. 35 //if ($USER->username <> 'news') {36 //error('You can only run this function if you logged on as "news"');37 //die();38 //}35 if ($USER->username <> 'news') { 36 error('You can only run this function if you logged on as "news"'); 37 die(); 38 } 39 39 40 40 // Start upgrading. … … 62 62 case 6: 63 63 gotoVersion7(); 64 // no break, need to continue updating. 65 case 7: 66 gotoVersion8(); 64 67 // no break, need to continue updating. 65 68 } … … 98 101 99 102 /** 100 * Update to version 7,auto-import blog entries, blog comments, & files into the global RSS table.101 **/ 102 function gotoVersion 7() {103 * Update to version 8, re-do the auto-import blog entries, blog comments, & files into the global RSS table. 104 **/ 105 function gotoVersion8() { 103 106 global $CFG; 104 107 $prefix = $CFG->prefix; … … 137 140 } 138 141 } 142 143 $version = new StdClass; 144 $version->version = 8; 145 insert_record("folio_version",$version); 146 } 147 148 /** 149 * Update to version 7, auto-import blog entries, blog comments, & files into the global RSS table. 150 **/ 151 function gotoVersion7() { 152 global $CFG; 153 $prefix = $CFG->prefix; 154 $db = $CFG->dbname; 155 139 156 140 157 $version = new StdClass; folio/folio/lib.php
r111 r112 1021 1021 **/ 1022 1022 function folio_rss_weblog_post($object_type, $event, $object) { 1023 global $ CFG;1024 1023 global $db, $CFG; 1024 1025 1025 $title = $object->title; 1026 1026 $body = $object->body; … … 1049 1049 rss_additem( $owner_id, $owner_username, $user_id, $user_name, $user_username, $type, $type_ident, $tags, $title, $body, $link, $access); 1050 1050 1051 // Update RSS in comments to match the same permission level. 1052 $stmt = $db->Prepare("UPDATE {$CFG->prefix}folio_rss SET access = '{$access}' " . 1053 "WHERE type_ident IN ( SELECT ident FROM {$CFG->prefix}weblog_comments " . 1054 "WHERE post_id = {$type_ident} ) AND type = 'weblog_comment'" ); 1055 $returnvalue = $db->Execute($stmt); 1056 1051 1057 // return results 1052 1058 return $object; … … 1173 1179 $rec = get_record('users','username',$reader_name); 1174 1180 1175 if ( $rec->password == $reader_pwd ) { 1181 if ( !$rec ) { 1182 // No matching user 1183 return -1; 1184 } elseif ( $rec->password == $reader_pwd ) { 1185 // Matched pwd 1176 1186 return $rec->ident; 1177 1187 } else { 1188 // Pwd doesn't match 1178 1189 return -1; 1179 1190 } folio/folio/readme.txt
r111 r112 1 1 ---------------------------------------------------------------------------------- 2 2 Elgg Folio Add-in 3 Updated 6/ 5/20073 Updated 6/6/2007 4 4 ---------------------------------------------------------------------------------- 5 5 … … 93 93 94 94 Occurred: 95 2007.06.06 v0.61 Fixed more bugs. 95 96 2007.06.06 v0.6 Fixed a number of bugs. Added options via config.php for 96 97 different display options.
