
Originally Posted by
weezee
I am using links_manager_v3-5-2

Originally Posted by
weezee
When I click check link I get this message:
Warning: preg_match() [function.preg-match]: Unknown modifier '/' in /home/content/w/e/e/weezee/html/xxxxxx_admin/links.php on line 625
I am running Zen Cart v1.3.8a. I reuploading all the links manager files, before that, the line was 623
I think I posted this in the wrong forum. help with logo sideboxes sorry.
This is the entire section of code that applies to this issue:
Please compare the following with your copy of admin/links.php
PHP Code:
break;
case 'check':
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_CHECK_LINK . '</b>');
$url = $lInfo->links_reciprocal_url;
$link_check_status = false;
$link_check_status_text = '';
if (function_exists('curl_exec')) {
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_URL, $url);
$content = curl_exec($c);
curl_close($c);
if ($content) {
// I *think* this is the right preg_match syntax ... please double-check that it works as desired.
if (preg_match('/'.LINKS_CHECK_PHRASE.'/i', $content)) {
$link_check_status = true;
}
}
} else if (ini_get('allow_url_fopen') == TRUE && file($url)) {
$file = fopen($url,'r');
while (!feof($file)) {
$page_line = trim(fgets($file, 4096));
// I recommend changing this eregi to a preg_match for PHP 5.3 compatibility:
if (preg_match('/'.LINKS_CHECK_PHRASE.'/i', $page_line)) {
$link_check_status = true;
break;
}
}
fclose($file);
} else {
$link_check_status_text = TEXT_INFO_LINK_CHECK_ERROR;
}
if ($link_check_status == true) {
$link_check_status_text = TEXT_INFO_LINK_CHECK_FOUND;
} elseif ($link_check_status_text == '') {
$link_check_status_text = TEXT_INFO_LINK_CHECK_NOT_FOUND;
}
$contents[] = array('text' => TEXT_INFO_LINK_CHECK_RESULT . ' ' . $link_check_status_text);
$contents[] = array('text' => '<br /><b>' . $lInfo->links_reciprocal_url . '</b>');
$contents[] = array('align' => 'center', 'text' => '<br /><a href="' . zen_href_link(FILENAME_LINKS, zen_get_all_get_params(array('lID', 'action')) . 'lID=' . $lInfo->links_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
Bookmarks