+ $sqlRetry = '(feu_retry = 1 AND feu_tries < 5)';
+ //FIXME: wait at least 1 hour before retrying
+
+ return ' AND feu_active = 1 AND (feu_pinged = 0 OR ' . $sqlRetry . ')';
+ }
+
+ /**
+ * Determines if it should be retried to pingback the URL after some time
+ *
+ * @param $obj mixed Exception or Pingback response
+ */
+ protected function sqlRetry($obj)
+ {
+ if ($obj instanceof \Exception) {
+ return '1';
+ }
+
+ switch ($obj->getCode()) {
+ case -32601: //they have xmp-rpc, but do not support pingback
+ case 17: //they think we don't link to them
+ case 18: //they think we send out pingback spam
+ case 48: //already registered
+ case 49: //access denied
+ case 200: //pingback not supported
+ case 201: //Unvalid target URI
+ return '0';
+ }
+
+ return '1';