Changeset 3604
- Timestamp:
- 07/05/07 17:26:31 (17 months ago)
- Location:
- trunk
- Files:
-
- 63 modified
-
blog/checkup/index.php (modified) (1 diff)
-
components/Textcube.Control.RSS.php (modified) (1 diff)
-
components/Textcube.Core.php (modified) (3 diffs)
-
components/Textcube.Data.Attachment.php (modified) (7 diffs)
-
components/Textcube.Data.Category.php (modified) (7 diffs)
-
components/Textcube.Data.Comment.php (modified) (6 diffs)
-
components/Textcube.Data.DailyStatistics.php (modified) (4 diffs)
-
components/Textcube.Data.DataMaintenance.php (modified) (2 diffs)
-
components/Textcube.Data.Feed.php (modified) (13 diffs)
-
components/Textcube.Data.Filter.php (modified) (4 diffs)
-
components/Textcube.Data.GuestComment.php (modified) (5 diffs)
-
components/Textcube.Data.Keyword.php (modified) (7 diffs)
-
components/Textcube.Data.Link.php (modified) (4 diffs)
-
components/Textcube.Data.Notice.php (modified) (7 diffs)
-
components/Textcube.Data.PluginSetting.php (modified) (4 diffs)
-
components/Textcube.Data.Post.php (modified) (22 diffs)
-
components/Textcube.Data.RefererLog.php (modified) (4 diffs)
-
components/Textcube.Data.RefererStatistics.php (modified) (4 diffs)
-
components/Textcube.Data.SkinSetting.php (modified) (1 diff)
-
components/Textcube.Data.SubscriptionLog.php (modified) (4 diffs)
-
components/Textcube.Data.SubscriptionStatistics.php (modified) (4 diffs)
-
components/Textcube.Data.Tag.php (modified) (10 diffs)
-
components/Textcube.Data.Trackback.php (modified) (6 diffs)
-
components/Textcube.Data.TrackbackLog.php (modified) (4 diffs)
-
components/Textcube.Data.User.php (modified) (4 diffs)
-
components/Textcube.Data.UserSetting.php (modified) (3 diffs)
-
components/Textcube.Data.php (modified) (1 diff)
-
components/Textcube.Model.PluginCustomConfig.php (modified) (4 diffs)
-
components/Textcube.Model.Statistics.php (modified) (7 diffs)
-
lib/auth.php (modified) (1 diff)
-
lib/model/blog.archive.php (modified) (2 diffs)
-
lib/model/blog.attachment.php (modified) (11 diffs)
-
lib/model/blog.blogSetting.php (modified) (6 diffs)
-
lib/model/blog.category.php (modified) (33 diffs)
-
lib/model/blog.comment.php (modified) (36 diffs)
-
lib/model/blog.entry.php (modified) (43 diffs)
-
lib/model/blog.keyword.php (modified) (6 diffs)
-
lib/model/blog.link.php (modified) (4 diffs)
-
lib/model/blog.notice.php (modified) (3 diffs)
-
lib/model/blog.rss.php (modified) (4 diffs)
-
lib/model/blog.service.php (modified) (1 diff)
-
lib/model/blog.statistics.php (modified) (8 diffs)
-
lib/model/blog.tag.php (modified) (22 diffs)
-
lib/model/blog.teamblog.php (modified) (6 diffs)
-
lib/model/blog.trackback.php (modified) (12 diffs)
-
lib/model/blog.trash.php (modified) (6 diffs)
-
lib/model/common.plugin.php (modified) (6 diffs)
-
lib/model/reader.common.php (modified) (17 diffs)
-
lib/plugins.php (modified) (2 diffs)
-
plugins/CL_OpenID/index.php (modified) (20 diffs)
-
plugins/CT_RecentPS_Default/index.php (modified) (3 diffs)
-
plugins/CT_RecentRP_Default/index.php (modified) (3 diffs)
-
plugins/CT_Start_Default/index.php (modified) (5 diffs)
-
plugins/CT_Statistics_Default/index.php (modified) (1 diff)
-
plugins/EAS/index.php (modified) (1 diff)
-
plugins/FM_Modern/index.php (modified) (2 diffs)
-
plugins/FM_TTML/index.php (modified) (12 diffs)
-
plugins/PN_Referer_Default/index.php (modified) (2 diffs)
-
plugins/PN_Subscription_Default/index.php (modified) (4 diffs)
-
plugins/PN_Visitor_Default/index.php (modified) (3 diffs)
-
plugins/ST_TeamBlogSettings/index.php (modified) (7 diffs)
-
plugins/StatGraph/index.php (modified) (1 diff)
-
setup.php (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/blog/checkup/index.php
r3599 r3604 692 692 } 693 693 694 if (DBQuery::queryExistence("DESC {$database['prefix']}Entries owner")) { 695 $changed = true; 696 echo '<li>', _text('본문 테이블의 필드 이름을 변경합니다.'), ': '; 697 if (DBQuery::execute("ALTER TABLE {$database['prefix']}Entries CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 698 && DBQuery::execute("ALTER TABLE {$database['prefix']}Attachments CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 699 && DBQuery::execute("ALTER TABLE {$database['prefix']}BlogStatistics CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 700 && DBQuery::execute("ALTER TABLE {$database['prefix']}Categories CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 701 && DBQuery::execute("ALTER TABLE {$database['prefix']}Comments CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 702 && DBQuery::execute("ALTER TABLE {$database['prefix']}CommentsNotified CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 703 && DBQuery::execute("ALTER TABLE {$database['prefix']}CommentsNotifiedQueue CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 704 && DBQuery::execute("ALTER TABLE {$database['prefix']}DailyStatistics CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 705 && DBQuery::execute("ALTER TABLE {$database['prefix']}FeedGroupRelations CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 706 && DBQuery::execute("ALTER TABLE {$database['prefix']}FeedGroups CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 707 && DBQuery::execute("ALTER TABLE {$database['prefix']}FeedReads CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 708 && DBQuery::execute("ALTER TABLE {$database['prefix']}FeedSettings CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 709 && DBQuery::execute("ALTER TABLE {$database['prefix']}FeedStarred CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 710 && DBQuery::execute("ALTER TABLE {$database['prefix']}Filters CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 711 && DBQuery::execute("ALTER TABLE {$database['prefix']}Links CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 712 && DBQuery::execute("ALTER TABLE {$database['prefix']}Plugins CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 713 && DBQuery::execute("ALTER TABLE {$database['prefix']}RefererLogs CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 714 && DBQuery::execute("ALTER TABLE {$database['prefix']}RefererStatistics CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 715 && DBQuery::execute("ALTER TABLE {$database['prefix']}TagRelations CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 716 && DBQuery::execute("ALTER TABLE {$database['prefix']}Trackbacks CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 717 && DBQuery::execute("ALTER TABLE {$database['prefix']}TrackbackLogs CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 718 && DBQuery::execute("ALTER TABLE {$database['prefix']}XMLRPCPingSettings CHANGE owner blogid int(11) NOT NULL DEFAULT 0") 719 ) 720 echo '<span style="color:#33CC33;">', _text('성공'), '</span></li>'; 721 else 722 echo '<span style="color:#FF0066;">', _text('실패'), '</span></li>'; 723 } 724 694 725 $filename = ROOT . '/.htaccess'; 695 726 $fp = fopen($filename, "r"); -
trunk/components/Textcube.Control.RSS.php
r3124 r3604 5 5 class RSS { 6 6 function refresh() { 7 global $owner; 8 @unlink(ROOT . "/cache/rss/$owner.xml"); 7 @unlink(ROOT . "/cache/rss/".getBlogId().".xml"); 9 8 } 10 9 } -
trunk/components/Textcube.Core.php
r3572 r3604 17 17 /*@static@*/ 18 18 function getName($userid = null) { 19 global $database , $owner;19 global $database; 20 20 if (!isset($userid)) 21 $userid = $owner;21 $userid = getUserId(); 22 22 return DBQuery::queryCell("SELECT name FROM {$database['prefix']}Users WHERE userid = $userid"); 23 23 } … … 25 25 /*@static@*/ 26 26 function getEmail($userid = null) { 27 global $database , $owner;27 global $database; 28 28 if (!isset($userid)) 29 $userid = $owner;29 $userid = getUserId(); 30 30 return DBQuery::queryCell("SELECT loginid FROM {$database['prefix']}Users WHERE userid = $userid"); 31 31 } … … 33 33 /*@static@*/ 34 34 function confirmPassword($password) { 35 global $database , $owner;35 global $database; 36 36 $password = md5($password); 37 return DBQuery::queryExistence("SELECT userid FROM {$database['prefix']}Users WHERE userid = $ownerAND password = '$password'");37 return DBQuery::queryExistence("SELECT userid FROM {$database['prefix']}Users WHERE userid = ".getBlogId()." AND password = '$password'"); 38 38 } 39 39 40 40 function authorName($owner,$entryId){ 41 41 requireComponent('Eolin.PHP.Core'); 42 global $database, $ owner, $entry;42 global $database, $entry; 43 43 44 44 // Read userId of entry from relation table. 45 $userId = getUserIdOfEntry( $owner,$entryId);45 $userId = getUserIdOfEntry(getBlogId(),$entryId); 46 46 if(isset($userId)) { 47 47 $author = DBQuery::queryCell("SELECT name -
trunk/components/Textcube.Data.Attachment.php
r3124 r3604 24 24 25 25 function open($filter = '', $fields = '*', $sort = 'attached') { 26 global $database, $owner; 26 global $database; 27 $blogid = getBlogId(); 27 28 if (!empty($filter)) 28 29 $filter = 'AND ' . $filter; … … 30 31 $sort = 'ORDER BY ' . $sort; 31 32 $this->close(); 32 $this->_result = mysql_query("SELECT $fields FROM {$database['prefix']}Attachments WHERE owner = $owner$filter $sort");33 $this->_result = mysql_query("SELECT $fields FROM {$database['prefix']}Attachments WHERE blogid = $blogid $filter $sort"); 33 34 if ($this->_result) { 34 35 if ($this->_count = mysql_num_rows($this->_result)) … … 54 55 if ($this->_result && ($row = mysql_fetch_assoc($this->_result))) { 55 56 foreach ($row as $name => $value) { 56 if ($name == ' owner')57 if ($name == 'blogid') 57 58 continue; 58 59 switch ($name) { … … 97 98 /*@static@*/ 98 99 function doesExist($name) { 99 global $database , $owner;100 global $database; 100 101 if (!Validator::filename($name)) 101 102 return null; 102 return DBQuery::queryExistence("SELECT parent FROM {$database['prefix']}Attachments WHERE owner = $ownerAND name = '$name'");103 return DBQuery::queryExistence("SELECT parent FROM {$database['prefix']}Attachments WHERE blogid = ".getBlogId()." AND name = '$name'"); 103 104 } 104 105 105 106 /*@static@*/ 106 107 function getParent($name) { 107 global $database , $owner;108 global $database; 108 109 if (!Validator::filename($name)) 109 110 return null; 110 return DBQuery::queryCell("SELECT parent FROM {$database['prefix']}Attachments WHERE owner = $ownerAND name = '$name'");111 return DBQuery::queryCell("SELECT parent FROM {$database['prefix']}Attachments WHERE blogid = ".getBlogId()." AND name = '$name'"); 111 112 } 112 113 … … 124 125 /*@static@*/ 125 126 function confirmFolder() { 126 global $ owner, $service;127 $path = ROOT . "/attach/ $owner";127 global $service; 128 $path = ROOT . "/attach/".getBlogId(); 128 129 if (!file_exists($path)) { 129 130 mkdir($path); … … 138 139 139 140 function _generateName() { 140 global $owner;141 $blogid = getBlogId(); 141 142 if (isset($this->name)) { 142 143 if (!Validator::filename($this->name, false)) … … 168 169 return $this->_error('name'); 169 170 170 global $database , $owner;171 global $database; 171 172 $query = new TableQuery($database['prefix'] . 'Attachments'); 172 $query->setQualifier(' owner', $owner);173 $query->setQualifier('blogid', getBlogId()); 173 174 $query->setQualifier('name', $this->name, true); 174 175 if (isset($this->parent)) { -
trunk/components/Textcube.Data.Category.php
r3124 r3604 23 23 /*@polymorphous(numeric $id, $fields, $sort)@*/ 24 24 function open($filter = true, $fields = '*', $sort = 'priority') { 25 global $database , $owner;25 global $database; 26 26 if (is_numeric($filter)) { 27 27 $filter = 'AND id = ' . $filter; … … 35 35 $sort = 'ORDER BY ' . $sort; 36 36 $this->close(); 37 $this->_result = mysql_query("SELECT $fields FROM {$database['prefix']}Categories WHERE owner = $owner$filter $sort");37 $this->_result = mysql_query("SELECT $fields FROM {$database['prefix']}Categories WHERE blogid = ".getBlogId()." $filter $sort"); 38 38 if ($this->_result) 39 39 $this->_count = mysql_num_rows($this->_result); … … 54 54 if ($this->_result && ($row = mysql_fetch_assoc($this->_result))) { 55 55 foreach ($row as $name => $value) { 56 if ($name == ' owner')56 if ($name == 'blogid') 57 57 continue; 58 58 switch ($name) { … … 72 72 73 73 function add() { 74 global $database , $owner;74 global $database; 75 75 if($this->id != 0) $this->id = null; 76 76 if (isset($this->parent) && !is_numeric($this->parent)) … … 81 81 82 82 $query = new TableQuery($database['prefix'] . 'Categories'); 83 $query->setQualifier(' owner', $owner);83 $query->setQualifier('blogid', getBlogId()); 84 84 if (isset($this->parent)) { 85 85 if (($parentLabel = Category::getLabel($this->parent)) === null) … … 117 117 118 118 function getNextCategoryId($id = 0) { 119 global $database , $owner;120 $maxId = DBQuery::queryCell("SELECT MAX(id) FROM {$database['prefix']}Categories WHERE owner = $owner");119 global $database; 120 $maxId = DBQuery::queryCell("SELECT MAX(id) FROM {$database['prefix']}Categories WHERE blogid = ".getBlogId()); 121 121 if($id==0) 122 122 return $maxId + 1; … … 144 144 /*@static@*/ 145 145 function doesExist($id) { 146 global $database , $owner;146 global $database; 147 147 if (!Validator::number($id, 0)) 148 148 return false; 149 149 if ($id == 0) return true; // not specified case 150 return DBQuery::queryExistence("SELECT id FROM {$database['prefix']}Categories WHERE owner = $ownerAND id = $id");150 return DBQuery::queryExistence("SELECT id FROM {$database['prefix']}Categories WHERE blogid = ".getBlogId()." AND id = $id"); 151 151 } 152 152 153 153 /*@static@*/ 154 154 function getId($label) { 155 global $database , $owner;155 global $database; 156 156 if (empty($label)) 157 157 return null; 158 return DBQuery::queryCell("SELECT id FROM {$database['prefix']}Categories WHERE owner = $ownerAND label = '" . mysql_tt_escape_string($label) . "'");158 return DBQuery::queryCell("SELECT id FROM {$database['prefix']}Categories WHERE blogid = ".getBlogId()." AND label = '" . mysql_tt_escape_string($label) . "'"); 159 159 } 160 160 161 161 /*@static@*/ 162 162 function getLabel($id) { 163 global $database , $owner;163 global $database; 164 164 if (!Validator::number($id, 1)) 165 165 return null; 166 return DBQuery::queryCell("SELECT label FROM {$database['prefix']}Categories WHERE owner = $ownerAND id = $id");166 return DBQuery::queryCell("SELECT label FROM {$database['prefix']}Categories WHERE blogid = ".getBlogId()." AND id = $id"); 167 167 } 168 168 169 169 /*@static@*/ 170 170 function getParent($id) { 171 global $database , $owner;171 global $database; 172 172 if (!Validator::number($id, 1)) 173 173 return null; 174 return DBQuery::queryCell("SELECT parent FROM {$database['prefix']}Categories WHERE owner = $ownerAND id = $id");174 return DBQuery::queryCell("SELECT parent FROM {$database['prefix']}Categories WHERE blogid = ".getBlogId()." AND id = $id"); 175 175 } 176 176 -
trunk/components/Textcube.Data.Comment.php
r3124 r3604 26 26 27 27 function open($filter = '', $fields = '*', $sort = 'id') { 28 global $database , $owner;28 global $database; 29 29 if (is_numeric($filter)) 30 30 $filter = 'AND id = ' . $filter; … … 34 34 $sort = 'ORDER BY ' . $sort; 35 35 $this->close(); 36 $this->_result = mysql_query("SELECT $fields FROM {$database['prefix']}Comments WHERE owner = $owner$filter $sort");36 $this->_result = mysql_query("SELECT $fields FROM {$database['prefix']}Comments WHERE blogid = ".getBlogId()." $filter $sort"); 37 37 if ($this->_result) { 38 38 if ($this->_count = mysql_num_rows($this->_result)) … … 58 58 if ($this->_result && ($row = mysql_fetch_assoc($this->_result))) { 59 59 foreach ($row as $name => $value) { 60 if ($name == ' owner')60 if ($name == 'blogid') 61 61 continue; 62 62 switch ($name) { … … 76 76 77 77 function add() { 78 global $database , $owner;78 global $database; 79 79 if (!isset($this->entry)) 80 80 return $this->_error('entry'); … … 100 100 $this->entry = Comment::getEntry($this->parent); 101 101 if ((isset($this->entry)) && ($this->isFiltered == 0)) 102 DBQuery::execute("UPDATE {$database['prefix']}Entries SET comments = comments + 1 WHERE owner = $ownerAND id = {$this->entry}");102 DBQuery::execute("UPDATE {$database['prefix']}Entries SET comments = comments + 1 WHERE blogid = ".getBlogId()." AND id = {$this->entry}"); 103 103 return true; 104 104 } … … 118 118 /*@static@*/ 119 119 function getEntry($id) { 120 global $database , $owner;120 global $database; 121 121 if (!Validator::number($id, 1)) 122 122 return null; 123 return DBQuery::queryCell("SELECT entry FROM {$database['prefix']}Comments WHERE owner = $ownerAND id = {$id}");123 return DBQuery::queryCell("SELECT entry FROM {$database['prefix']}Comments WHERE blogid = ".getBlogId()." AND id = {$id}"); 124 124 } 125 125 126 126 function _buildQuery() { 127 global $database , $owner;127 global $database; 128 128 $query = new TableQuery($database['prefix'] . 'Comments'); 129 $query->setQualifier(' owner', $owner);129 $query->setQualifier('blogid', getBlogId()); 130 130 if (isset($this->id)) { 131 131 if (!Validator::number($this->id, 1)) -
trunk/components/Textcube.Data.DailyStatistics.php
r3124 r3604 15 15 16 16 function open($filter = '', $fields = '*', $sort = 'date DESC') { 17 global $database , $owner;17 global $database; 18 18 if (is_numeric($filter)) 19 19 $filter = 'AND date = ' . $filter; … … 23 23 $sort = 'ORDER BY ' . $sort; 24 24 $this->close(); 25 $this->_result = mysql_query("SELECT $fields FROM {$database['prefix']}DailyStatistics WHERE owner = $owner$filter $sort");25 $this->_result = mysql_query("SELECT $fields FROM {$database['prefix']}DailyStatistics WHERE blogid = ".getBlogId()." $filter $sort"); 26 26 if ($this->_result) { 27 27 if ($this->_count = mysql_num_rows($this->_result)) … … 47 47 if ($this->_result && ($row = mysql_fetch_assoc($this->_result))) { 48 48 foreach ($row as $name => $value) { 49 if ($name == ' owner')49 if ($name == 'blogid') 50 50 continue; 51 51 $this->$name = $value; … … 110 110 return $this->_error('date'); 111 111 112 global $database , $owner;112 global $database; 113 113 $query = new TableQuery($database['prefix'] . 'DailyStatistics'); 114 $query->setQualifier(' owner', $owner);114 $query->setQualifier('blogid', getBlogId()); 115 115 $query->setQualifier('date', $this->date); 116 116 if (isset($this->visits)) { -
trunk/components/Textcube.Data.DataMaintenance.php
r3124 r3604 6 6 /*@static@*/ 7 7 function removeAll($removeAttachments = true) { 8 global $database, $owner; 8 global $database; 9 $blogid = getBlogId(); 10 $tags = DBQuery::queryColumn("SELECT DISTINCT tag FROM {$database['prefix']}TagRelations WHERE blogid = $blogid"); 9 11 10 $tags = DBQuery::queryColumn("SELECT DISTINCT tag FROM {$database['prefix']}TagRelations WHERE owner = $owner"); 12 mysql_query("UPDATE {$database['prefix']}BlogStatistics SET visits = 0 WHERE blogid = $blogid"); 13 mysql_query("DELETE FROM {$database['prefix']}DailyStatistics WHERE blogid = $blogid"); 14 mysql_query("DELETE FROM {$database['prefix']}Categories WHERE blogid = $blogid"); 15 mysql_query("DELETE FROM {$database['prefix']}Attachments WHERE blogid = $blogid"); 16 mysql_query("DELETE FROM {$database['prefix']}Comments WHERE blogid = $blogid"); 17 mysql_query("DELETE FROM {$database['prefix']}Trackbacks WHERE blogid = $blogid"); 18 mysql_query("DELETE FROM {$database['prefix']}TrackbackLogs WHERE blogid = $blogid"); 19 mysql_query("DELETE FROM {$database['prefix']}TagRelations WHERE blogid = $blogid"); 20 mysql_query("DELETE FROM {$database['prefix']}Entries WHERE blogid = $blogid"); 21 mysql_query("DELETE FROM {$database['prefix']}Links WHERE blogid = $blogid"); 22 mysql_query("DELETE FROM {$database['prefix']}RefererLogs WHERE blogid = $blogid"); 23 mysql_query("DELETE FROM {$database['prefix']}RefererStatistics WHERE blogid = $blogid"); 24 mysql_query("DELETE FROM {$database['prefix']}Plugins WHERE blogid = $blogid"); 25 //mysql_query("DELETE FROM {$database['prefix']}UserSettings WHERE user = $blogid"); 11 26 12 mysql_query("UPDATE {$database['prefix']}BlogStatistics SET visits = 0 WHERE owner = $owner"); 13 mysql_query("DELETE FROM {$database['prefix']}DailyStatistics WHERE owner = $owner"); 14 mysql_query("DELETE FROM {$database['prefix']}Categories WHERE owner = $owner"); 15 mysql_query("DELETE FROM {$database['prefix']}Attachments WHERE owner = $owner"); 16 mysql_query("DELETE FROM {$database['prefix']}Comments WHERE owner = $owner"); 17 mysql_query("DELETE FROM {$database['prefix']}Trackbacks WHERE owner = $owner"); 18 mysql_query("DELETE FROM {$database['prefix']}TrackbackLogs WHERE owner = $owner"); 19 mysql_query("DELETE FROM {$database['prefix']}TagRelations WHERE owner = $owner"); 20 mysql_query("DELETE FROM {$database['prefix']}Entries WHERE owner = $owner"); 21 mysql_query("DELETE FROM {$database['prefix']}Links WHERE owner = $owner"); 22 mysql_query("DELETE FROM {$database['prefix']}RefererLogs WHERE owner = $owner"); 23 mysql_query("DELETE FROM {$database['prefix']}RefererStatistics WHERE owner = $owner"); 24 mysql_query("DELETE FROM {$database['prefix']}Plugins WHERE owner = $owner"); 25 //mysql_query("DELETE FROM {$database['prefix']}UserSettings WHERE user = $owner"); 26 27 mysql_query("DELETE FROM {$database['prefix']}Filters WHERE owner = $owner"); 28 mysql_query("DELETE FROM {$database['prefix']}FeedStarred WHERE owner = $owner"); 29 mysql_query("DELETE FROM {$database['prefix']}FeedReads WHERE owner = $owner"); 30 mysql_query("DELETE FROM {$database['prefix']}FeedGroupRelations WHERE owner = $owner"); 31 mysql_query("DELETE FROM {$database['prefix']}FeedGroups WHERE owner = $owner AND id <> 0"); 27 mysql_query("DELETE FROM {$database['prefix']}Filters WHERE blogid = $blogid"); 28 mysql_query("DELETE FROM {$database['prefix']}FeedStarred WHERE blogid = $blogid"); 29 mysql_query("DELETE FROM {$database['prefix']}FeedReads WHERE blogid = $blogid"); 30 mysql_query("DELETE FROM {$database['prefix']}FeedGroupRelations WHERE blogid = $blogid"); 31 mysql_query("DELETE FROM {$database['prefix']}FeedGroups WHERE blogid = $blogid AND id <> 0"); 32 32 33 33 if (count($tags) > 0) … … 43 43 } 44 44 45 if (file_exists(ROOT . "/cache/rss/$ owner.xml"))46 unlink(ROOT . "/cache/rss/$ owner.xml");45 if (file_exists(ROOT . "/cache/rss/$blogid.xml")) 46 unlink(ROOT . "/cache/rss/$blogid.xml"); 47 47 48 48 if ($removeAttachments) { 49 Path::removeFiles(Path::combine(ROOT, 'attach', $ owner));50 mysql_query("UPDATE {$database['prefix']}BlogSettings SET logo = '' WHERE owner = $owner");49 Path::removeFiles(Path::combine(ROOT, 'attach', $blogid)); 50 mysql_query("UPDATE {$database['prefix']}BlogSettings SET logo = '' WHERE blogid = $blogid"); 51 51 } 52 52 } -
trunk/components/Textcube.Data.Feed.php
r3124 r3604 6 6 /*@static@*/ 7 7 function getId($name, $add = false) { 8 global $database , $owner;8 global $database; 9 9 $name = mysql_lessen($name); 10 10 if (empty($name)) 11 11 return 0; 12 12 $query = new TableQuery($database['prefix'] . 'FeedGroups'); 13 &n
