diff --git a/download.php b/download.php index 8e44e0e4d..f9875a0dd 100644 --- a/download.php +++ b/download.php @@ -20,7 +20,11 @@ require_once("class2.php"); -require_once(e_PLUGIN."download/download.php"); +$query = (e_QUERY) ? "?".e_QUERY : ""; + +e107::getRedirect()->go(e_PLUGIN."download/download.php".$query,true); + +//require_once(e_PLUGIN."download/download.php"); exit(); diff --git a/e107_admin/cron.php b/e107_admin/cron.php index 767f1d0b7..44b71bbcd 100644 --- a/e107_admin/cron.php +++ b/e107_admin/cron.php @@ -358,7 +358,7 @@ class cron_admin_ui extends e_admin_ui $setpwd_message .= "". LAN_CRON_16.""; if(e_DOMAIN && file_exists("/usr/local/cpanel/version")) { - $setpwd_message .= "
Go to cPanel
"; + $setpwd_message .= "
Go to cPanel
"; } $setpwd_message .= "

".$frm->admin_button('generate_pwd', 1, 'delete', 'Generate new cron password',array('class'=>'btn btn-small')); diff --git a/e107_admin/footer.php b/e107_admin/footer.php index 7883704b1..87aeb17a3 100644 --- a/e107_admin/footer.php +++ b/e107_admin/footer.php @@ -405,7 +405,7 @@ if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) } -header("Cache-Control: must-revalidate"); // XXX testing 'always on' state for now. +header("Cache-Control: max-age=5,no-cache",true); // XXX testing 'always on' state for now. if(!defined('e_NOCACHE')) { // header("Cache-Control: must-revalidate"); diff --git a/e107_admin/frontpage.php b/e107_admin/frontpage.php index 2294355a0..551cf6516 100644 --- a/e107_admin/frontpage.php +++ b/e107_admin/frontpage.php @@ -315,22 +315,6 @@ if($fp_update_prefs) $fp = new frontpage($front_page); -if(isset($_POST['fp_add_new'])) -{ - $text = $fp->edit_rule(array('order' => 0, 'class' => e_UC_PUBLIC, 'page' => 'news.php', 'force' => FALSE)); // Display edit form as well - $text .= $fp->select_class($fp_settings, FALSE); - $ns->tablerender(FRTLAN_PAGE_TITLE." - ".FRTLAN_42, $text); -} -elseif(isset($_POST['fp_edit_rule'])) -{ - $text = $fp->edit_rule($fp_settings[key($_POST['fp_edit_rule'])]); // Display edit form as well - $text .= $fp->select_class($fp_settings, FALSE); - $ns->tablerender(FRTLAN_PAGE_TITLE." - ".FRTLAN_46, $text); -} -else -{ // Just show existing rules - $ns->tablerender(FRTLAN_PAGE_TITLE." - ".FRTLAN_13, $mes->render().$fp->select_class($fp_settings, TRUE)); -} @@ -343,6 +327,31 @@ class frontpage { $this->frm = e107::getForm(); $this->frontPage = $fp; + + $ns = e107::getRender(); + $mes = e107::getMessage(); + + global $fp_settings; + + + if(vartrue($_GET['mode']) == 'create') + { + $text = $this->edit_rule(array('order' => 0, 'class' => e_UC_PUBLIC, 'page' => 'news.php', 'force' => FALSE)); // Display edit form as well + // $text .= $this->select_class($fp_settings, FALSE); + $ns->tablerender(FRTLAN_PAGE_TITLE.SEP.FRTLAN_42, $text); + } + elseif(vartrue($_GET['id'])) + { + $key = intval($_GET['id']); + $text = $this->edit_rule($fp_settings[$key]); // Display edit form as well + // $text .= $this->select_class($fp_settings, FALSE); + $ns->tablerender(FRTLAN_PAGE_TITLE.SEP.FRTLAN_46, $text); + } + else + { // Just show existing rules + $ns->tablerender(FRTLAN_PAGE_TITLE.SEP.FRTLAN_13, $mes->render().$this->select_class($fp_settings, TRUE)); + } + } @@ -356,6 +365,7 @@ class frontpage */ function select_class(&$fp_settings, $show_button = TRUE) { + $frm = e107::getForm(); // List of current settings $show_legend = $show_button ? " class='e-hideme'" : ''; $text = " @@ -377,7 +387,7 @@ class frontpage ".FRTLAN_53." ".FRTLAN_49." ".FRTLAN_35." - ".LAN_EDIT." + ".LAN_OPTIONS." "; @@ -391,13 +401,21 @@ class frontpage ".$title." ".$this->lookup_path($current_value['page'])." ".$this->lookup_path($current_value['force'])." - - - - - + +
+ ".$frm->admin_button('fp_inc',$order,'up',ADMIN_UP_ICON)." + ".$frm->admin_button('fp_dec',$order,'down',ADMIN_DOWN_ICON)." + ".ADMIN_EDIT_ICON." + ".$frm->admin_button('fp_delete_rule['.$order.']',$order,'',ADMIN_DELETE_ICON)." +
"; + + /* + + + + */ } $text .= " @@ -407,7 +425,7 @@ class frontpage { $text .= "
- ".$this->frm->admin_button('fp_add_new', FRTLAN_42, 'create')." + ".FRTLAN_42."
"; } @@ -452,59 +470,57 @@ class frontpage } +// ".($rule_info['order'] ? FRTLAN_46 : FRTLAN_42)." + $text = " -
-
- ".($rule_info['order'] ? FRTLAN_46 : FRTLAN_42)." -
- + "; + + $text .= ' + '; + + $text .= " +
+
+
- - + + - - - - - - {$text_tmp_1} + ".$text_tmp_1." ".$this->add_other('frontpage', $is_other_home, $rule_info['page'])."
- ".FRTLAN_49." -
-
- + +
+
- - + + - - - - - - {$text_tmp_2} + ".$text_tmp_2." ".$this->add_other('fp_force_page', $is_other_force, $rule_info['force'])."
- ".FRTLAN_35." ".FRTLAN_50." -
+ +
".$this->frm->hidden('fp_order', $rule_info['order'])." ".FRTLAN_43.": ".e107::getUserClass()->uc_dropdown('class', $rule_info['class'], 'public,guest,member,admin,main,classes')." ".$this->frm->admin_button('fp_save_new', LAN_UPDATE, 'update')." ".$this->frm->admin_button('fp_cancel', LAN_CANCEL, 'cancel')."
-
+
"; return $text; @@ -592,8 +608,7 @@ class frontpage { // Multiple options for same page name $text .= " - ".$this->frm->radio($ob_name, $front_key, $type_selected)."  - ".$this->frm->label($front_value['title'], $ob_name, $front_key)." + ".$this->frm->radio($ob_name, $front_key, $type_selected, array('label'=>$front_value['title']))." "; @@ -609,8 +624,7 @@ class frontpage { // Single option for URL $text .= " - ".$this->frm->radio($ob_name, $front_key, $type_selected)."  - ".$this->frm->label($front_value['title'], $ob_name, $front_key)." + ".$this->frm->radio($ob_name, $front_key, $type_selected, array('label'=>$front_value['title']))."  "; @@ -632,9 +646,11 @@ class frontpage */ function add_other($ob_name, $cur_val, $cur_page) { + $label = ($cur_val) ? "Disabled or Enter Custom URL:" : "Custom URL: "; + return " - ".$this->frm->radio($ob_name, 'other', $cur_val)." ".$this->frm->label(FRTLAN_15.":", $ob_name, 'other')." - ".$this->frm->text($ob_name.'_other', ($cur_val ? $cur_page : ''), 150, "size=50&id={$ob_name}-other-txt")." + ".$this->frm->radio($ob_name, 'other', $cur_val, array('label'=> $label))." + ".$this->frm->text($ob_name.'_other', ($cur_val ? $cur_page : ''), 150, "size=xxlarge&id={$ob_name}-other-txt")." "; } } @@ -654,23 +670,20 @@ function frontpage_adminlog($msg_num = '00', $woffle = '') e107::getAdminLog()->log_event('FRONTPG_'.$msg_num, $woffle, E_LOG_INFORMATIVE, ''); } -/** - * Handle page DOM within the page header - * - * @return string JS source - */ -function headerjs() -{ - require_once(e_HANDLER.'js_helper.php'); - $ret = " - - - "; - return $ret; +function frontpage_adminmenu() +{ + + $action = vartrue($_GET['mode'],'main'); + + $var['main']['text'] = LAN_MANAGE; + $var['main']['link'] = e_SELF; + $var['create']['text'] = LAN_CREATE; + $var['create']['link'] = e_SELF."?mode=create"; + + + show_admin_menu(FRTLAN_PAGE_TITLE, $action, $var); } + ?> \ No newline at end of file diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php index 6c114f127..5e8245aeb 100644 --- a/e107_admin/prefs.php +++ b/e107_admin/prefs.php @@ -424,21 +424,21 @@ $text .= "
".LAN_MAILOUT_87.":   - + ".LAN_MAILOUT_88.": (".LAN_OPTIONAL.")   - + ".LAN_MAILOUT_89.": (".LAN_OPTIONAL.")   - + diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index b3be3d73e..e79149509 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -754,7 +754,10 @@ function update_706_to_800($type='') { if(is_dir(e_PLUGIN.$cgpArray['oldpath'])) { - $chgPath[] = $cgpArray['oldpath']; + if(!in_array($cgpArray['oldpath'],$chgPath)) + { + $chgPath[] = $cgpArray['oldpath']; + } } } //TODO LAN diff --git a/e107_admin/wmessage.php b/e107_admin/wmessage.php index 985d9d5fa..b8aee0403 100644 --- a/e107_admin/wmessage.php +++ b/e107_admin/wmessage.php @@ -112,7 +112,9 @@ if (isset($_POST['main_delete'])) $mes->addError(LAN_DELETED_FAILED); } } -$ns->tablerender($caption, $mes->render() . $text); + +echo $mes->render(); + // Show Existing ------- if ($action == "main" || $action == "") @@ -183,7 +185,7 @@ if ($action == "create" || $action == "edit") ".WMLAN_10." - ".$frm->text(wm_caption, $tp->toForm(vartrue($row['gen_ip'])), 80)." + ".$frm->text('wm_caption', $tp->toForm(vartrue($row['gen_ip'])), 80)." ".WMLAN_04." diff --git a/e107_core/shortcodes/batch/contact_shortcodes.php b/e107_core/shortcodes/batch/contact_shortcodes.php index 54da51c26..9b4266087 100644 --- a/e107_core/shortcodes/batch/contact_shortcodes.php +++ b/e107_core/shortcodes/batch/contact_shortcodes.php @@ -90,7 +90,7 @@ class contact_shortcodes extends e_shortcode function sc_contact_name($parm='') { - return ""; + return ""; } @@ -98,14 +98,14 @@ class contact_shortcodes extends e_shortcode function sc_contact_email($parm='') { - return ""; + return ""; } function sc_contact_subject($parm='') { - return ""; + return ""; } @@ -120,7 +120,7 @@ class contact_shortcodes extends e_shortcode $size = 'input-xxlarge'; } - return ""; + return ""; } diff --git a/e107_core/shortcodes/batch/usersettings_shortcodes.php b/e107_core/shortcodes/batch/usersettings_shortcodes.php index dacae583c..69eb1544c 100755 --- a/e107_core/shortcodes/batch/usersettings_shortcodes.php +++ b/e107_core/shortcodes/batch/usersettings_shortcodes.php @@ -191,9 +191,10 @@ class usersettings_shortcodes extends e_shortcode return; } parse_str($parm); - $cols = (isset($cols) ? $cols : 58); - $rows = (isset($rows) ? $rows : 4); - return ""; + //$cols = (isset($cols) ? $cols : 58); + //$rows = (isset($rows) ? $rows : 4); + //return ""; + return e107::getForm()->bbarea('signature', $this->var['user_signature'], '', '', 'small'); } diff --git a/e107_core/shortcodes/single/sitelinks_alt.php b/e107_core/shortcodes/single/sitelinks_alt.php index 1ad3bb269..ec095b2b3 100644 --- a/e107_core/shortcodes/single/sitelinks_alt.php +++ b/e107_core/shortcodes/single/sitelinks_alt.php @@ -21,7 +21,7 @@ class sitelinks_alt $params = explode('+', $parm); - if (isset($params[0]) && $params[0] && $params[0] != 'no_icons' && $params[0] != 'default') + if (vartrue($params[0]) && ($params[0] != 'no_icons') && ($params[0] != 'default')) { $icon = $params[0]; } @@ -58,6 +58,7 @@ class sitelinks_alt foreach ($linklist['head_menu'] as $lk) { $lk['link_url'] = $tp->replaceConstants($lk['link_url'], TRUE, TRUE); + if ($params[0] == 'no_icons') { $link_icon = 'no_icons'; @@ -170,6 +171,8 @@ class sitelinks_alt function render_sub($linklist, $id, $params, $icon) { + $tp = e107::getParser(); + $text = ""; */ - $menu = ""; - + else // BC + { + + $month_selector = "
"; + $month_selector .= "
"; + + $menu = "
+ "; + $menu .= ""; + $menu .= "
".$month_selector; + $menu .= "
".calendar($req_day, $req_month, $req_year, $day_links, $pref['blogcal_ws'])."
"; + $menu .= "
"; + + $caption = "
".BLOGCAL_L1." ".$req_year."
"; + } + $cached = $ns->tablerender($caption, $menu, 'blog_calendar', true); // echo "day= ".$req_day. " month=".$req_month." year=".$req_year." links=".print_a($day_links)." ws=".$pref['blogcal_ws']; e107::getCache()->set($cString, $menu); diff --git a/e107_plugins/chatbox_menu/chatbox_menu.php b/e107_plugins/chatbox_menu/chatbox_menu.php index b520ac4ae..7842b671b 100644 --- a/e107_plugins/chatbox_menu/chatbox_menu.php +++ b/e107_plugins/chatbox_menu/chatbox_menu.php @@ -64,72 +64,76 @@ $emessage=''; // FIX - using generic sc names is affecting old installs/templates and global wrappers (e.g. sc_style[USERNAME]) -class chatbox_shortcodes extends e_shortcode +if(!class_exists('chatbox_shortcodes')) { - function sc_cb_username($parm='') + class chatbox_shortcodes extends e_shortcode { - list($cb_uid, $cb_nick) = explode(".", $this->var['cb_nick'], 2); - if($this->var['user_name']) + + function sc_username($parm='') { - $cb_nick = "".$this->var['user_name'].""; - } - else - { - $cb_nick = $tp -> toHTML($cb_nick,FALSE,'USER_TITLE, emotes_off, no_make_clickable'); - $cb_nick = str_replace("Anonymous", LAN_ANONYMOUS, $cb_nick); - } - - return $cb_nick; - } - - function sc_cb_timedate($parm='') - { - return e107::getDate()->convert_date($this->var['cb_datestamp'], "relative"); - } - - - function sc_cb_message($parm = '') - { - if($this->var['cb_blocked']) - { - return CHATBOX_L6; - } - - $pref = e107::getPref(); - $emotes_active = $pref['cb_emote'] ? 'USER_BODY, emotes_on' : 'USER_BODY, emotes_off'; - - list($cb_uid, $cb_nick) = explode(".", $this->var['cb_nick'], 2); - - $cb_message = e107::getParser()->toHTML($this->var['cb_message'], false, $emotes_active, $cb_uid, $pref['menu_wordwrap']); - - return $cb_message; - - $replace[0] = "["; $replace[1] = "]"; - $search[0] = "["; $search[1] = "]"; - $cb_message = str_replace($search, $replace, $cb_message); - } - - function sc_cb_avatar($parm='') - { - return e107::getParser()->parseTemplate("{USER_AVATAR=".vartrue($this->var['user_image'])."}"); - } - - function sc_cb_bullet($parm = '') - { - $bullet = ""; - - if(defined('BULLET')) - { - $bullet = ''; - } - elseif(file_exists(THEME.'images/bullet2.gif')) - { - $bullet = ''; + list($cb_uid, $cb_nick) = explode(".", $this->var['cb_nick'], 2); + if($this->var['user_name']) + { + $cb_nick = "".$this->var['user_name'].""; + } + else + { + $cb_nick = $tp -> toHTML($cb_nick,FALSE,'USER_TITLE, emotes_off, no_make_clickable'); + $cb_nick = str_replace("Anonymous", LAN_ANONYMOUS, $cb_nick); + } + + return $cb_nick; } - return $bullet; + function sc_timedate($parm='') + { + return e107::getDate()->convert_date($this->var['cb_datestamp'], "relative"); + } + + + function sc_message($parm = '') + { + if($this->var['cb_blocked']) + { + return CHATBOX_L6; + } + + $pref = e107::getPref(); + $emotes_active = $pref['cb_emote'] ? 'USER_BODY, emotes_on' : 'USER_BODY, emotes_off'; + + list($cb_uid, $cb_nick) = explode(".", $this->var['cb_nick'], 2); + + $cb_message = e107::getParser()->toHTML($this->var['cb_message'], false, $emotes_active, $cb_uid, $pref['menu_wordwrap']); + + return $cb_message; + + $replace[0] = "["; $replace[1] = "]"; + $search[0] = "["; $search[1] = "]"; + $cb_message = str_replace($search, $replace, $cb_message); + } + + function sc_cb_avatar($parm='') + { + return e107::getParser()->parseTemplate("{USER_AVATAR=".vartrue($this->var['user_image'])."}"); + } + + function sc_cb_bullet($parm = '') + { + $bullet = ""; + + if(defined('BULLET')) + { + $bullet = ''; + } + elseif(file_exists(THEME.'images/bullet2.gif')) + { + $bullet = ''; + } + + return $bullet; + } + } - } @@ -146,7 +150,6 @@ class chatbox_shortcodes extends e_shortcode - if((isset($_POST['chat_submit']) || e_AJAX_REQUEST) && $_POST['cmessage'] != '') { if(!USER && !$pref['anon_post']) @@ -284,12 +287,11 @@ if(!$text = $e107cache->retrieve("nq_chatbox")) define("CB_MOD", check_class($pref['cb_mod'])); $qry = " - SELECT c.*, u.user_name FROM #chatbox AS c + SELECT c.*, u.user_name, u.user_image FROM #chatbox AS c LEFT JOIN #user AS u ON SUBSTRING_INDEX(c.cb_nick,'.',1) = u.user_id ORDER BY c.cb_datestamp DESC LIMIT 0, ".intval($chatbox_posts); global $CHATBOXSTYLE; - if($CHATBOXSTYLE) { @@ -303,9 +305,9 @@ if(!$text = $e107cache->retrieve("nq_chatbox")) // FIXME - move to template $CHATBOX_TEMPLATE['start'] = ""; diff --git a/e107_plugins/featurebox/admin_config.php b/e107_plugins/featurebox/admin_config.php index 0e1370205..cf833c84a 100644 --- a/e107_plugins/featurebox/admin_config.php +++ b/e107_plugins/featurebox/admin_config.php @@ -138,7 +138,7 @@ class fb_category_ui extends e_admin_ui if(!varset($new_data['fb_category_template'])) { $new_data['fb_category_template'] = 'default'; - }var_dump($new_data); + } return $new_data; } diff --git a/e107_plugins/forum/forum_update.php b/e107_plugins/forum/forum_update.php index 322b4b4eb..0de814d9e 100644 --- a/e107_plugins/forum/forum_update.php +++ b/e107_plugins/forum/forum_update.php @@ -1233,6 +1233,9 @@ function step12() $ret = $f -> setNewVersion(); $mes -> addSuccess("Congratulations, the forum upgrade is now completed!

{$ret}"); + + $text = "Return to e107 Update"; + $ns -> tablerender($stepCaption, $mes -> render() . $text); return; } diff --git a/e107_plugins/login_menu/login_menu_class.php b/e107_plugins/login_menu/login_menu_class.php index bc5248056..24117ca59 100644 --- a/e107_plugins/login_menu/login_menu_class.php +++ b/e107_plugins/login_menu/login_menu_class.php @@ -353,7 +353,7 @@ class login_menu_class require_once(e_HANDLER.'xml_class.php'); $xml = new xmlClass; $xml->filter = array('name' => FALSE,'version'=>FALSE); // Just want a couple of variables - $readFile = $xml->loadXMLfile(e_PLUGIN.$plugin_path.'/plugin.xml', true, true); + $readFile = $xml->loadXMLfile(e_PLUGIN.$plugid.'/plugin.xml', true, true); $ret['eplug_name'] = defined($readFile['name']) ? constant($readFile['name']) : $readFile['name']; $ret['eplug_version'] = $readFile['version']; } diff --git a/e107_themes/bootstrap/theme.php b/e107_themes/bootstrap/theme.php index f8e77dbd4..2295e2ca2 100644 --- a/e107_themes/bootstrap/theme.php +++ b/e107_themes/bootstrap/theme.php @@ -153,6 +153,7 @@ $HEADER['default'] = '
{SETSTYLE=default} + {WMESSAGE} '; @@ -176,7 +177,7 @@ $HEADER['default-home'] = $HEADER['default']; $FOOTER['default-home'] = ' - {WMESSAGE} + {SETSTYLE=span4}
diff --git a/thumb.php b/thumb.php index 3eec02434..7828e575a 100644 --- a/thumb.php +++ b/thumb.php @@ -298,9 +298,9 @@ class e_thumbpage public function sendHeaders($thumbnfo) { - if(headers_sent()) + if(headers_sent($filename, $linenum)) { - echo 'Headers already sent! '; + echo 'Headers already sent in '.$filename.' on line '.$linenum; exit; }