+ Fixed/Updated the creation of the webpage thumbnail using google pagespeed insights api
+ Fixed search index update
+ Fixed missing lang property
+ + Fixed xml ex- and import
version 2.8 - Wastelands (2022-12-10)
*
* @param string $hash
* @param Link|null $linkObj Use already existing link obj
- * @return bool
+ * @return string
*/
- public function exportLinkData(string $hash, Link $linkObj=null): bool {
- $ret = false;
+ public function exportLinkData(string $hash, Link $linkObj=null): string {
+ $ret = '';
+
+ if(DEBUG) {
+ error_log("DEBUG Start to export link with hash $hash");
+ }
if (!empty($hash)) {
$linkData = $this->loadLink($hash, true, true);
if (!empty($linkData)) {
$data = $linkData;
+ } elseif(DEBUG) {
+ error_log("ERROR Could not load link with $hash");
}
}
elseif(!empty($linkObj) && is_a($linkObj,'Link')) {
}
if(!empty($data) && isset($data['link'])) {
+ if(DEBUG) {
+ error_log("DEBUG Using data: ".var_export($data, true));
+ }
require_once 'lib/import-export.class.php';
$ImEx = new ImportExport();
$ret = $ImEx->createSingleLinkExportXML($data);
+ } elseif(DEBUG) {
+ error_log("ERROR Missing link data for hash $hash");
}
return $ret;
$ret = false;
if(!empty($id)) {
- $queryStr = "SELECT `id`
- FROM `" . DB_PREFIX . "_link`
+ $queryStr = "SELECT `id`
+ FROM `" . DB_PREFIX . "_link`
WHERE `id` = '" . $this->DB->real_escape_string($id) . "'";
$query = $this->DB->query($queryStr);
if(!empty($query) && $query->num_rows > 0) {
$submitFeedback['status'] = 'success';
}
-if($_requestMode && $_requestMode == "export") {
+if($_requestMode == "export") {
$linkObj->load($_id);
$_i = $linkObj->getData('id');
$submitFeedback['message'] = $T->t('edit.link.export.data.fail');
$submitFeedback['status'] = 'error';
}
-
}
if(isset($_POST['data']) && !empty($_POST['data']) && isset($_POST['editlink'])) {