@@ 157-172 (lines=16) @@ | ||
154 | /** |
|
155 | * {@inheritdoc} |
|
156 | */ |
|
157 | protected function update() { |
|
158 | global $CONFIG; |
|
159 | ||
160 | if (!parent::update()) { |
|
161 | return false; |
|
162 | } |
|
163 | ||
164 | $guid = (int)$this->guid; |
|
165 | $title = sanitize_string($this->title); |
|
166 | $description = sanitize_string($this->description); |
|
167 | ||
168 | $query = "UPDATE {$CONFIG->dbprefix}objects_entity |
|
169 | set title='$title', description='$description' where guid=$guid"; |
|
170 | ||
171 | return $this->getDatabase()->updateData($query) !== false; |
|
172 | } |
|
173 | ||
174 | /** |
|
175 | * {@inheritdoc} |
@@ 170-186 (lines=17) @@ | ||
167 | /** |
|
168 | * {@inheritdoc} |
|
169 | */ |
|
170 | protected function update() { |
|
171 | global $CONFIG; |
|
172 | ||
173 | if (!parent::update()) { |
|
174 | return false; |
|
175 | } |
|
176 | ||
177 | $guid = (int)$this->guid; |
|
178 | $name = sanitize_string($this->name); |
|
179 | $description = sanitize_string($this->description); |
|
180 | $url = sanitize_string($this->url); |
|
181 | ||
182 | $query = "UPDATE {$CONFIG->dbprefix}sites_entity |
|
183 | SET name='$name', description='$description', url='$url' WHERE guid=$guid"; |
|
184 | ||
185 | return $this->getDatabase()->updateData($query) !== false; |
|
186 | } |
|
187 | ||
188 | /** |
|
189 | * Delete the site. |