Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 757
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 757
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 758
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 758
Notice: require(): read of 1458 bytes failed with errno=12 Cannot allocate memory in /var/www/html/ticnews.com.br/web/wp-content/plugins/google-maps-easy/functions.php on line 44
Notice: require(): read of 1458 bytes failed with errno=12 Cannot allocate memory in /var/www/html/ticnews.com.br/web/wp-content/plugins/google-maps-easy/functions.php on line 44
else{
$this->pushError(__('cannot insert to table', GMP_LANG_CODE));
return false;
}
}
public function getIconFromId($id){
$res = frameGmp::_()->getTable('icons')->get("*", array('id'=>$id));
if(empty($res)){
return $res;
}
$icon =$res[0];
$icon['path'] = $this->getIconUrl($icon['path']);
return $icon;
}
function getIconUrl($icon){
if(!empty($icon)){
$isUrl = strpos($icon, 'http');
if($isUrl === false){
$icon = $this->getIconsFullDir(). $icon;
}
if(uriGmp::isHttps()) {
$icon = uriGmp::makeHttps($icon);
}
}
return $icon;
}
public function iconExists($iconId) {
return self::$tableObj->exists($iconId, 'id');
}
public function remove($d = array()) {
$d['id'] = isset($d['id']) ? (int) $d['id'] : 0;
if($d['id']) {
if(frameGmp::_()->getTable('icons')->delete(array('id' => $d['id']))) {
$this->replaceDeletedIconIdToDefault($d['id']);
return true;
} else
$this->pushError (frameGmp::_()->getTable('icons')->getErrors());
} else
$this->pushError (__('Invalid ID', GMP_LANG_CODE));
return false;
}
public function replaceDeletedIconIdToDefault($idIcon){
if(frameGmp::_()->getModule('marker')->getModel()->replaceDeletedIconIdToDefault($idIcon)) {
return true;
} else {
$this->pushError (frameGmp::_()->getTable('icons')->getErrors());
}
return false;
}
}