1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-19 20:21:51 +02:00

Merge pull request #28 from e107inc/master

.
This commit is contained in:
rica-carv 2016-11-29 17:16:44 +00:00 committed by GitHub
commit fb857470dd
29 changed files with 1121 additions and 841 deletions

View File

@ -83,7 +83,7 @@
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 2 hours"
ExpiresByType image/x-icon "access plus 1 year
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/jpg "access plus 1 week"

View File

@ -258,7 +258,10 @@ class admin_start
e_PLUGIN."banner/config.php",
e_PLUGIN."forum/newforumposts_menu_config.php",
e_PLUGIN."forum/e_latest.php",
e_PLUGIN."forum/e_status.php"
e_PLUGIN."forum/e_status.php",
e_PLUGIN."online_extended_menu/online_extended_menu.php",
e_PLUGIN."online_extended_menu/images/user.png",
e_PLUGIN."online_extended_menu/languages/English.php"
);

View File

@ -23,12 +23,22 @@ if (!defined('e107_INIT'))
require_once("../class2.php");
}
if (!getperms("A") && ($_GET['action'] != 'dialog'))
if (!getperms("A") && ($_GET['action'] != 'dialog') && ($_GET['action'] != 'youtube'))
{
e107::redirect('admin');
exit;
}
if($_GET['action'] == 'youtube' )
{
if(!getperms('A') && !getperms('A1'))
{
exit;
}
}
e107::js('core', 'plupload/plupload.full.js', 'jquery', 2);
e107::css('core', 'plupload/jquery.plupload.queue/css/jquery.plupload.queue.css', 'jquery');
e107::js('core', 'plupload/jquery.plupload.queue/jquery.plupload.queue.min.js', 'jquery', 2);
@ -120,9 +130,9 @@ class media_admin extends e_admin_dispatcher
protected $adminMenu = array(
'main/list' => array('caption'=> LAN_IMA_M_01, 'perm' => 'A'),
// 'main/create' => array('caption'=> "Add New Media", 'perm' => 'A'), // Should be handled in Media-Import.
'main/import' => array('caption'=> LAN_IMA_M_02, 'perm' => 'A|A2'),
'cat/list' => array('caption'=> LAN_IMA_M_03, 'perm' => 'A'),
'cat/create' => array('caption'=> LAN_IMA_M_04, 'perm' => 'A'), // is automatic.
'main/import' => array('caption'=> LAN_IMA_M_02, 'perm' => 'A|A1'),
'cat/list' => array('caption'=> LAN_IMA_M_03, 'perm' => 'A|A2'),
'cat/create' => array('caption'=> LAN_IMA_M_04, 'perm' => 'A|A2'), // is automatic.
// 'main/settings' => array('caption'=> LAN_PREFS, 'perm' => 'A'), // legacy
'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => 'A'),
'main/avatar' => array('caption'=> LAN_IMA_M_05, 'perm' => 'A')
@ -391,9 +401,9 @@ class media_form_ui extends e_admin_form_ui
//TODO GIF and PNG rotation.
if($sql->db_Select("core_media","media_url","media_id IN (".$ids.") AND media_type = 'image/jpeg' "))
if($sql->select("core_media","media_url","media_id IN (".$ids.") AND media_type = 'image/jpeg' "))
{
while($row = $sql->db_Fetch())
while($row = $sql->fetch())
{
$original = $tp->replaceConstants($row['media_url']);
@ -479,9 +489,9 @@ class media_form_ui extends e_admin_form_ui
$img_import_w = 2816;
$img_import_h = 2112;
if($sql->db_Select("core_media","media_id,media_url","media_id IN (".$ids.") AND media_type = 'image/jpeg' "))
if($sql->select("core_media","media_id,media_url","media_id IN (".$ids.") AND media_type = 'image/jpeg' "))
{
while($row = $sql->db_Fetch())
while($row = $sql->fetch())
{
$path = $tp->replaceConstants($row['media_url']);

View File

@ -235,6 +235,11 @@ if(!empty($_GET['iframe']))
$message = '';
if(!empty($_POST['language']))
{
$_POST['language'] = e107::getParser()->filter($_POST['language']);
}
// ----------------- delete tables ---------------------------------------------
if (isset($_POST['del_existing']) && $_POST['lang_choices'] && getperms('0'))
{
@ -246,7 +251,7 @@ if(!empty($_GET['iframe']))
{
// echo $del_table." exists<br />";
$qry = "DROP TABLE ".MPREFIX."lan_".$lang."_".$del_table;
if (mysql_query($qry))
if ($sql->gen($qry))
{
$msg = $tp->lanVars(LANG_LAN_100, $_POST['lang_choices'].' '.$del_table);
$message .= $msg.'[!br!]';
@ -304,7 +309,7 @@ if(!empty($_GET['iframe']))
if ($_POST['remove'])
{
// Remove table.
if (mysql_query("DROP TABLE ".MPREFIX."lan_".$lang."_".$value))
if ($sql->gen("DROP TABLE ".MPREFIX."lan_".$lang."_".$value))
{
$message .= $_POST['language'].' '.$value.' '.LAN_DELETED.'[!br!]'; // can be removed?
$mes->addSuccess($_POST['language'].' '.$value.' '.LAN_DELETED);

View File

@ -666,7 +666,7 @@ class pluginManager{
// XXX Suhosin has a 512 char limit for $_GET strings.
e107::getDebug()->log($data['plugin_name'].' : '.strlen($base64)."<br />".print_a($data,true)); //FIXME - enable when needed to debug.
*/
// Temporary Pop-up version.
// $dicon = '<a class="e-modal" href="'.$data['plugin_url'].'" rel="external" data-modal-caption="'.$data['plugin_name']." ".$data['plugin_version'].'" target="_blank" ><img class="top" src="'.e_IMAGE_ABS.'icons/download_32.png" alt="" /></a>';
@ -718,6 +718,7 @@ class pluginManager{
if($mp->download($data['plugin_id'], $data['plugin_mode'], 'plugin'))
{
$this -> pluginCheck(true); // rescan the plugin directory
$text = e107::getPlugin()->install($data['plugin_folder']);
$mes->addInfo($text);

View File

@ -322,7 +322,7 @@ $text = "
<tr>
<td><label for='siteurl'>".PRFLAN_3."</label></td>
<td>
".$frm->text('siteurl', $pref['siteurl'], 150, 'required=1&size=xxlarge')."
".$frm->text('siteurl', $pref['siteurl'], 150, 'size=xxlarge')."
".($pref['siteurl'] == SITEURL ? "" : "<div class='field-help'>".PRFLAN_159.": <strong>".SITEURL."</strong></div>")."
</td>
</tr>

View File

@ -164,6 +164,17 @@ if($mode == 'download' && !empty($_GET['src']))
return true;
}
if(e_DEBUG === true)
{
echo "<b>DEBUG MODE ACTIVE (no downloading)</b><br />";
echo '$_GET: ';
print_a($_GET);
echo 'base64 decoded and parsed as $data:';
print_a($data);
return false;
}
$mp = $themec->getMarketplace();
$mes->addSuccess(TPVLAN_85);

View File

@ -2343,15 +2343,22 @@ class users_ext
function field_deactivate()
{
global $ue, $ns, $tp, $sql, $admin_log;
$tp = e107::getParser();
$sql = e107::getDb();
$ue = e107::getUserExt();
$ret = "";
foreach(array_keys($_POST['deactivate']) as $f)
{
$f = $tp->filter($f);
if($ue->user_extended_remove($f, $f))
{
$ret .= EXTLAN_68." $f ".EXTLAN_72."<br />";
if(is_readable(e_CORE."sql/extended_".$f.".php")){
$ret .= (mysql_query("DROP TABLE ".MPREFIX."user_extended_".$f)) ? LAN_DELETED." user_extended_".$f."<br />" : LAN_DELETED_FAILED." user_extended_".$f."<br />";
if(is_readable(e_CORE."sql/extended_".$f.".php"))
{
$ret .= ($sql->gen("DROP TABLE ".MPREFIX."user_extended_".$f)) ? LAN_DELETED." user_extended_".$f."<br />" : LAN_DELETED_FAILED." user_extended_".$f."<br />";
}
}
else
@ -2360,6 +2367,7 @@ class users_ext
}
}
e107::getLog()->add('EUF_12',implode(', ',$_POST['deactivate']),E_LOG_INFORMATIVE,'');
return $ret;
}
@ -2378,7 +2386,7 @@ class users_ext
preg_match_all("/create(.*?)myisam;/si", $sql_data, $creation);
foreach($creation[0] as $tab){
$query = str_replace($search,$replace,$tab);
if(!mysql_query($query)){
if(!$sql->gen($query)){
$error = TRUE;
}
}
@ -2386,7 +2394,7 @@ class users_ext
preg_match_all("/insert(.*?);/si", $sql_data, $inserts);
foreach($inserts[0] as $ins){
$qry = str_replace($search,$replace,$ins);
if(!mysql_query($qry)){
if(!$sql->gen($qry)){
$error = TRUE;
}
}

View File

@ -33,9 +33,16 @@ if(array_key_exists($parm, $aColors))
}
else
{
if(preg_match("/(#[a-fA-F0-9]{3,6})/", $parm, $matches))
if(preg_match("/(#[a-fA-F0-9]{3,12})/", $parm, $matches))
{
return "<span class='{$class}' style='color:{$matches[1]};'>$code_text</span>";
}
if(preg_match("/([a-zA-Z]{3,20})/", $parm, $matches)) // support color names http://www.w3schools.com/colors/colors_names.asp
{
return "<span class='{$class}' style='color:{$matches[1]};'>$code_text</span>";
}
}

View File

@ -1054,7 +1054,11 @@ class admin_shortcodes
<b>".FOOTLAN_8."</b>
<br />
".$install_date."
<br /><br />
<br />";
$text .= $this->getLastGitUpdate();
$text .= "<br />
<b>".FOOTLAN_9."</b>
<br />".
preg_replace("/PHP.*/i", "", $_SERVER['SERVER_SOFTWARE'])."<br />(".FOOTLAN_10.": ".$_SERVER['SERVER_NAME'].")
@ -1084,6 +1088,22 @@ class admin_shortcodes
}
}
private function getLastGitUpdate()
{
$gitFetch = e_BASE.'.git/FETCH_HEAD';
if(file_exists($gitFetch))
{
$unix = filemtime($gitFetch);
$text = "<br /><b>Last Git Update</b><br />"; // NO LAN required. Developer-Only
$text.= ($unix) ? date('r',$unix) : "Never";
$text .= "<br />";
return $text;
}
}
function sc_admin_status($parm)
{
if(($parm == 'infopanel' || $parm == 'flexpanel') && e_PAGE != 'admin.php')

View File

@ -18,51 +18,62 @@ if (!defined('e107_INIT')) { exit; }
class usersettings_shortcodes extends e_shortcode
{
private $extendedTabs = false;
function sc_username($parm) // This is the 'display name'
{
$pref = e107::getPref();
if (check_class($pref['displayname_class']) || $pref['allowEmailLogin'] == 1) // display if email is used for login.
$dis_name_len = varset($pref['displayname_maxlength'], 15);
if(check_class($pref['displayname_class']) || $pref['allowEmailLogin'] == 1) // display if email is used for login.
{
$dis_name_len = varset($pref['displayname_maxlength'],15);
$options = array('title'=> LAN_USER_80, 'size' => 40);
return e107::getForm()->text('username',$this->var['user_name'], $dis_name_len, $options);
$options = array(
'title' => LAN_USER_80,
'size' => 40,
);
return e107::getForm()->text('username', $this->var['user_name'], $dis_name_len, $options);
}
else
if($parm == 'show') // Show it, but as a readonly field.
{
return ($parm == 'show') ? $this->var['user_name'] : ''; // ; if it can't be changed then hide it.
$options = array(
'title' => LAN_USER_80,
'size' => 40,
'readonly' => true,
);
return e107::getForm()->text('username', $this->var['user_name'], $dis_name_len, $options);
}
// Hide it!
return '';
}
function sc_loginname($parm)
{
{
$pref = e107::getPref();
if($pref['allowEmailLogin'] == 1) // email/password login only.
{
return; // hide login name when email-login is being used. (may contain social login info)
}
if (ADMIN && getperms("4"))
$log_name_length = varset($pref['loginname_maxlength'], 30);
$options = array(
'title' => ($pref['allowEmailLogin'] == 1) ? LAN_USER_82 : LAN_USER_80,
'size' => 40,
);
if(ADMIN && getperms("4")) // Has write permission.
{
$log_name_length = varset($pref['loginname_maxlength'],30);
$options = array(
'title'=> ($pref['allowEmailLogin'] ==1 ) ? LAN_USER_82 : LAN_USER_80,
'size' => 40
);
return e107::getForm()->text('loginname',$this->var['user_loginname'], $log_name_length, $options);
}
else
{
return $this->var['user_loginname'];
return e107::getForm()->text('loginname', $this->var['user_loginname'], $log_name_length, $options);
}
// No write permission.
$options['readonly'] = true;
return e107::getForm()->text('loginname', $this->var['user_loginname'], $log_name_length, $options);
}
@ -75,20 +86,26 @@ class usersettings_shortcodes extends e_shortcode
return e107::getForm()->text('customtitle', $this->var['user_customtitle'], 100, $options);
}
}
function sc_realname($parm)
{
if(!empty($this->var['user_xup'])) // social login active.
$pref = e107::getPref();
$sc = e107::getScBatch('usersettings');
$options = array(
'title' => '',
'size' => 40,
'required' => $pref['signup_option_realname'],
);
if(!empty($sc->var['user_login']) && !empty($sc->var['user_xup'])) // social login active.
{
return $this->var['user_login'];
$options['readonly'] = true;
}
$pref = e107::getPref();
$options = array('title'=> '', 'size' => 40,'required'=>$pref['signup_option_realname']);
return e107::getForm()->text('realname',$this->var['user_login'], 100, $options);
return e107::getForm()->text('realname', $sc->var['user_login'], 100, $options);
}
@ -142,18 +159,25 @@ class usersettings_shortcodes extends e_shortcode
}
return $pref['signup_pass_len'];
}
function sc_email($parm)
{
if(!empty($this->var['user_xup'])) // social login active.
$sc = e107::getScBatch('usersettings');
$options = array(
'size' => 40,
'title' => '',
'required' => true,
);
if(!empty($sc->var['user_email']) && !empty($sc->var['user_xup'])) // social login active.
{
return $this->var['user_email'];
$options['readonly'] = true;
}
$options = array('size' => 40,'title'=>'','required'=>true);
return e107::getForm()->email('email', $this->var['user_email'], 100, $options);
return e107::getForm()->email('email', $sc->var['user_email'], 100, $options);
}

View File

@ -372,7 +372,7 @@ abstract class e_marketplace_adapter_abstract
$remotefile = $this->downloadUrl."?auth=".$this->getAuthKey()."&".$qry;
$localfile = md5($remotefile.time()).".zip";
$mes->addSuccess("Downloading...");
$mes->addSuccess(TPVLAN_81);
// FIXME call the service, check status first, then download (if status OK), else retireve the error break and show it
@ -394,7 +394,10 @@ abstract class e_marketplace_adapter_abstract
if(!file_exists(e_TEMP.$localfile))
{
$mes->addError( "Automated download not possible. Please <a href='".$remotefile."'>Download Manually</a>");
$srch = array("[", "]");
$repl = array("<a href='".$remotefile."'>", "</a>");
$mes->addError( TPVLAN_83." ".str_replace($srch, $repl, TPVLAN_84));
if(E107_DEBUG_LEVEL > 0)
{
@ -407,23 +410,16 @@ abstract class e_marketplace_adapter_abstract
if($fl->unzipArchive($localfile,$type))
{
$mes->addSuccess("Download Complete!");
$mes->addSuccess(TPVLAN_82);
return true;
}
else
{
$mes->addSuccess( "<a href='".$remotefile."'>Download Manually</a>"); // flush(); usleep(50000);
$mes->addSuccess( "<a href='".$remotefile."'>".TPVLAN_84."</a>");
}
return false;
}
@ -510,7 +506,7 @@ class e_marketplace_adapter_wsdl extends e_marketplace_adapter_abstract
}
catch (Exception $e)
{
e107::getMessage()->addError("Unable to connect. Please check firewall and/or internet connection.");
e107::getMessage()->addError(TPVLAN_90);
e107::getMessage()->addDebug($e->getMessage());
}

View File

@ -789,7 +789,7 @@ class e_parse extends e_parser
$search = array('&#036;', '&quot;', '<', '>');
$replace = array('$', '"', '&lt;', '&gt;');
$text = str_replace($search, $replace, $text);
if (e107::wysiwyg() !== true)
if (e107::wysiwyg() !== true && is_string($text))
{
// fix for utf-8 issue with html_entity_decode(); ???
$text = urldecode($text);

View File

@ -2797,7 +2797,9 @@ class e_form
/**
* Render a Breadcrumb in Bootstrap format.
* @param $array
* @param $array
* @param $array[url]
* @param $array[text]
*/
function breadcrumb($array)
{

View File

@ -45,7 +45,7 @@ class e_jsmanager
// "http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js",
// "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"
// "http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"
"https://cdn.jsdelivr.net/jquery/2.1.4/jquery.min.js",
"https://cdn.jsdelivr.net/jquery/2.2.4/jquery.min.js",
// jQuery Once filters out all elements that had the same filter applied on them before. It can be used to
// ensure that a function is only applied once to an element. jQuery Once is used in e107.behaviors.
"https://cdnjs.cloudflare.com/ajax/libs/jquery-once/2.1.1/jquery.once.min.js"
@ -268,7 +268,7 @@ class e_jsmanager
if($this->isInAdmin()) // Include jquery-ui in the admin-area only - Jquery-UI to eventually be removed from e107 completely if possible.
{
$this->_libraries['jquery'] = array(
"https://cdn.jsdelivr.net/jquery/2.1.4/jquery.min.js",
"https://cdn.jsdelivr.net/jquery/2.2.4/jquery.min.js",
// jQuery Once filters out all elements that had the same filter applied on them before. It can be used
// to ensure that a function is only applied once to an element. jQuery Once is used in e107.behaviors.
"https://cdnjs.cloudflare.com/ajax/libs/jquery-once/2.1.1/jquery.once.min.js",

View File

@ -2198,14 +2198,14 @@ class e107plugin
if($result !== NULL)
{
$status = ($result) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add("Adding Link: {$linkName} with url [{$url}] and perm {$perm} ", $status);
$mes->add(EPL_ADLAN_233." {$linkName} URL: [{$url}] ".EPL_ADLAN_252." {$perm} ", $status);
}
}
if ($function == 'upgrade' && $remove) //remove inactive links on upgrade
{
$status = ($this->manage_link('remove', $url, $linkName,false, $options)) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add("Removing Link: {$linkName} with url [{$url}]", $status);
$mes->add(EPL_ADLAN_234." {$linkName} URL: [{$url}]", $status);
}
break;
@ -2213,7 +2213,7 @@ class e107plugin
case 'uninstall': //remove all links
$status = ($this->manage_link('remove', $url, $linkName, $perm, $options)) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add("Removing Link: {$linkName} with url [{$url}]", $status);
$mes->add(EPL_ADLAN_234." {$linkName} URL: [{$url}]", $status);
break;
}
}
@ -2315,7 +2315,8 @@ class e107plugin
$data['class'] = $this->getPerm(varset($v['@attributes']['perm']), 'member');
$status = e107::getMedia()->createCategory($data) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add("Adding Media Category: {$data['category']}", $status);
$message = str_replace('[x]', $data['category'], EPL_ADLAN_245);
$mes->add($message, $status);
e107::getMedia()->import($data['category'],e_PLUGIN.$folder, false,'min-size=20000');
$c++;
$i[$type]++;
@ -2325,7 +2326,8 @@ class e107plugin
case 'uninstall': // Probably best to leave well alone
$status = e107::getMedia()->deleteAllCategories($folder)? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add("Deleting All Media Categories owned by : {$folder}", $status);
$message = str_replace('[x]', $folder, EPL_ADLAN_246);
$mes->add($message, $status);
break;
@ -2467,14 +2469,14 @@ class e107plugin
//$status = $this->manage_extended_field('add', $name, $type, $attrib['default'], $source) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$status = $this->manage_extended_field('add', $name, $attrib, $source) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add('Adding Extended Field: '.$name.' ... ', $status);
$mes->add(EPL_ADLAN_249 .$name.' ... ', $status);
}
if ($function == 'upgrade' && $remove) //If upgrading, removing any inactive extended fields
{
$status = $this->manage_extended_field('remove', $name, $attrib, $source) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add('Removing Extended Field: '.$name.' ... ', $status);
$mes->add(EPL_ADLAN_250 .$name.' ... ', $status);
}
break;
@ -2483,11 +2485,11 @@ class e107plugin
if (vartrue($this->unInstallOpts['delete_xfields'], FALSE))
{
$status = ($this->manage_extended_field('remove', $name, $attrib, $source)) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add('Removing Extended Field: '.$name.' ... ', $status);
$mes->add(EPL_ADLAN_250 .$name.' ... ', $status);
}
else
{
$mes->add('Extended Field: '.$name.' left in place', E_MESSAGE_SUCCESS);
$mes->add(EPL_ADLAN_251 .$name, E_MESSAGE_SUCCESS);
}
break;
}

View File

@ -26,6 +26,7 @@ class themeHandler
var $fl;
var $themeConfigObj = null;
var $noLog = FALSE;
private $curTheme = null;
private $approvedAdminThemes = array('bootstrap','bootstrap3');
@ -79,6 +80,11 @@ class themeHandler
{
$unzippedTheme = $this->themeUpload();
}
if(!empty($_POST['curTheme']))
{
$this->curTheme = e107::getParser()->filter($_POST['curTheme']);
}
if(!empty($_POST['setUploadTheme']) && !empty($unzippedTheme))
{
@ -139,7 +145,7 @@ class themeHandler
if(isset($_POST['submit_adminstyle']))
{
$this->id = $_POST['curTheme'];
$this->id = $this->curTheme;
if($this->setAdminStyle())
{
eMessage::getInstance()->add(TPVLAN_43, E_MESSAGE_SUCCESS);
@ -149,7 +155,7 @@ class themeHandler
if(isset($_POST['submit_style']))
{
$this->id = $_POST['curTheme'];
$this->id = $this->curTheme;
$this->setLayouts(); // Update the layouts in case they have been manually changed.
$this->SetCustomPages($_POST['custompages']);
@ -161,7 +167,7 @@ class themeHandler
if(!empty($_POST['git_pull']))
{
$return = e107::getFile()->gitPull($_POST['curTheme'], 'theme');
$return = e107::getFile()->gitPull($this->curTheme, 'theme');
$mes->addSuccess($return);
}
@ -1076,9 +1082,17 @@ class themeHandler
if($_GET['mode'] == 'online')
{
$srcData = array(
'id' => $theme['id'],
'url' => $theme['url'],
'mode' => $theme['mode'],
'price' => $theme['price']
);
$d = http_build_query($theme,false,'&');
$url = e_SELF."?src=".base64_encode($d);
$d = http_build_query($srcData,false,'&');
$base64 = base64_encode($d);
// e107::getDebug()->log($theme['name'].': '.strlen($base64));
$url = e_SELF."?src=".$base64;
$id = $frm->name2id($theme['name']);
$LAN_DOWNLOAD = ($theme['price'] > 0) ? LAN_PURCHASE."/".LAN_DOWN_THEME : LAN_DOWN_THEME;
@ -1095,7 +1109,7 @@ class themeHandler
}
*/
$downloadUrl = e_SELF.'?mode=download&amp;action='.$action.'&amp;src='.base64_encode($d);//$url.'&amp;action=download';
$downloadUrl = e_SELF.'?mode=download&src='.base64_encode($d);//$url.'&amp;action=download';
$infoUrl = $url.'&amp;action=info';
$viewUrl = $theme['url'];

View File

@ -1753,7 +1753,7 @@ class e_user extends e_user_model
$updateQry['user_image'] = $userdata['user_image'];
}
$updateQry['WHERE'] = "WHERE user_id=".$user['user_id']." LIMIT 1";
$updateQry['WHERE'] = "user_id=".$user['user_id']." LIMIT 1";
if($sql->update('user', $updateQry) !==false)
{

View File

@ -273,6 +273,8 @@ define ("EPL_ADLAN_231", "Remove icons from Media-Manager");
define ("EPL_ADLAN_232", "Create Files");
define ("TPVLAN_81", "Downloading...");
define ("TPVLAN_82", "Download Complete!");
define ("EPL_ADLAN_233", "Adding Link:");
define ("EPL_ADLAN_234", "Removing Link:");
define ("EPL_ADLAN_235", "Automated download not possible.");
define ("EPL_ADLAN_236", "Please Download Manually");
define ("EPL_ADLAN_237", "Download");
@ -284,6 +286,14 @@ define ("EPL_ADLAN_242","Removing Pref:");
define ("EPL_ADLAN_243","Updating Pref:");
define ("EPL_ADLAN_244","Only 5 Media Categories are permitted during installation.");
define ("EPL_ADLAN_245","Adding Media Category: [x]");
define ("EPL_ADLAN_246","Deleting All Media Categories owned by : [x]");
define ("EPL_ADLAN_249","Adding Extended Field: ");
define ("EPL_ADLAN_250","Removing Extended Field: ");
define ("EPL_ADLAN_251","Extended Field left in place: ");
define ("EPL_ADLAN_252","Perm: ");
define ("LAN_RELEASED", "Released");
define ("LAN_REPAIR_PLUGIN_SETTINGS", "Repair plugin settings");
define ("LAN_SYNC_WITH_GIT_REPO", "Sync with Git Repo");
@ -295,4 +305,4 @@ define("LAN_INSTALL_FAIL", "Installation failed!");
define("LAN_UNINSTALL_FAIL", "Unable to uninstall!");
define("LAN_PLUGIN_IS_USED", "[x] plugin is used by:");
?>
?>

View File

@ -115,11 +115,12 @@ define("TPVLAN_CONV_15", "Give this stylesheet a name");
//marketplace
define("TPVLAN_81","Downloading...");
define("TPVLAN_82","Download Complete!");
define("TPVLAN_83","Automated download not possible.");
define("TPVLAN_84","Please Download Manually");
define("TPVLAN_83","Automated download not possible!");
define("TPVLAN_84","[Please Download Manually]");
define("TPVLAN_85","Connecting...");
define("TPVLAN_86","Could not change site theme.");
define("TPVLAN_87","Rendering Theme Config");
define("TPVLAN_88","Converter");
define("TPVLAN_89", "Apply dashboard preferences to all administrators");
define("TPVLAN_90","Unable to connect. Please check firewall and/or internet connection.");

View File

@ -43,6 +43,13 @@ class forum_url // plugin-folder + '_url'
'redirect' => '{e_PLUGIN}forum/forum.php?f=track',
);
$config['markread'] = array(
'sef' => '^forum/markread/{forum_id}',
'regex' => 'forum/markread/([\d]*)',
'redirect' => '{e_PLUGIN}forum/forum.php?f=mfar&amp;id=$1',
'legacy' => '{e_PLUGIN}forum/forum.php?f=mfar&amp;id={forum_id}'
);
$config['post'] = array(
'regex' => '^forum/post/?',
'sef' => 'forum/post/',
@ -55,6 +62,8 @@ class forum_url // plugin-folder + '_url'
'legacy' => '{e_PLUGIN}forum/forum_post.php?f=move&amp;id={thread_id}'
);
$config['split'] = array(
'sef' => 'forum/post/?f=split&amp;id={thread_id}&amp;post={post_id}',
'legacy' => '{e_PLUGIN}forum/forum_post.php?f=split&amp;id={thread_id}&amp;post={post_id}'

View File

@ -1009,6 +1009,11 @@ class e107forum
$tmp['thread_sef'] = eHelper::title2sef($tmp['thread_name'],'dashl');
if(empty($tmp['forum_sef']))
{
e107::getDebug()->log("Forum ".$tmp['forum_name']." is missing a SEF URL. Please add one via the admin area. ");
}
return $tmp;
}
}
@ -1510,6 +1515,7 @@ class e107forum
$ret = array();
while ($row = $sql->fetch())
{
if(!$row['forum_parent'])
{
$ret['parents'][] = $row;
@ -1817,7 +1823,15 @@ class e107forum
";
if ($sql->gen($qry))
{
return $sql->fetch();
$row = $sql->fetch();
if(empty($row['forum_sef']))
{
e107::getDebug()->log("Forum ".$row['forum_name']." is missing a SEF URL. Please add one via the admin area. ");
}
return $row;
}
return FALSE;
}
@ -1855,7 +1869,7 @@ class e107forum
$sql = e107::getDb();
$forumId = (int)$forumId;
$qry = "
SELECT t.*, f.forum_id, f.forum_sef, u.user_name, lpu.user_name AS lastpost_username, MAX(p.post_id) AS lastpost_id FROM `#forum_thread` as t
SELECT t.*, f.forum_id, f.forum_sef,f.forum_name, u.user_name, lpu.user_name AS lastpost_username, MAX(p.post_id) AS lastpost_id FROM `#forum_thread` as t
LEFT JOIN `#forum` AS f ON t.thread_forum_id = f.forum_id
LEFT JOIN `#forum_post` AS p ON t.thread_id = p.post_thread
LEFT JOIN `#user` AS u ON t.thread_user = u.user_id
@ -1880,7 +1894,11 @@ class e107forum
{
while ($row = $sql->fetch())
{
// $row['thread_sef'] = eHelper::title2sef($row['thread_name']);
if(empty($row['forum_sef']))
{
e107::getDebug()->log("Forum ".$row['forum_name']." is missing a SEF URL. Please add one via the admin area. ");
}
$ret[] = $row;
}
}

View File

@ -195,7 +195,9 @@ function step2()
{
$message = 'Creating table ' . ($rename ? $rename : $name);
if($sql->isTable($name) && $sql->isEmpty($name))
$curTable = ($rename ? $rename : $name);
if($sql->isTable($curTable) && $sql->isEmpty($curTable))
{
$mes -> addSuccess("Skipping table ".$name." (already exists)");
continue;

View File

@ -281,7 +281,8 @@ if ($pages)
}
}
if($forum->checkPerm($forumId, 'thread')) //new thread access only.
//-- if($forum->checkPerm($forumId, 'thread')) //new thread access only.
if($forum->checkPerm($forumId, 'post')) //new thread access only.
{
$forumSCvars['ntUrl']= e107::url('forum','post')."?f=nt&amp;id=". $forumId;
/*--

View File

@ -128,7 +128,7 @@ class forum_shortcodes extends e_shortcode
// To be reworked to get the $forum var
$trackPref = $forum->prefs->get('track');
if(!empty($trackPref))
if(!empty($trackPref) && $forum->checkPerm($this->var['forum_id'], 'post'))
{
$uInfo[2] = "<a href='".e107::url('forum','track')."'>".LAN_FORUM_0030."</a>";
}

View File

@ -804,7 +804,7 @@ function sc_buttonsx()
// $url = e107::getUrl()->create('forum/thread/reply', array('id' => $thread->threadId));
$replyUrl = "<a class='btn btn-primary' href='".$url."'>".LAN_FORUM_2006."</a>";
}
if ($forum->checkPerm($this->var['thread_forum_id'], 'thread'))
if ($forum->checkPerm($this->var['thread_forum_id'], 'post'))
{
$ntUrl = e107::url('forum','post')."?f=nt&amp;id=". $this->var['thread_forum_id'];
// $ntUrl = e107::getUrl()->create('forum/thread/new', array('id' => $thread->threadInfo['thread_forum_id']));
@ -829,7 +829,7 @@ function sc_buttonsx()
$text = '<div class="btn-group">
'.$replyUrl.'
'.($replyUrl?:LAN_FORUM_1003." ".LAN_FORUM_8013).'
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>

View File

@ -80,20 +80,14 @@
global $forum;
$jumpList = $forum->forumGetAllowed('view');
$text = '<div class="btn-group">';
if(!empty($this->var['ntUrl']))
{
$text .= '<a href="' . $this->var['ntUrl'] . '" class="btn btn-primary">' . LAN_FORUM_1018 . '</a>';
}
$text .= '
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu pull-right">
';
$text .=
($this->var['ntUrl'] ? '<a href="'.$this->var['ntUrl'].'" class="btn btn-primary">'.LAN_FORUM_1018.'</a>' : LAN_FORUM_1001." ".LAN_FORUM_8013).
'<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu pull-right">
';
//-- foreach($jumpList as $key => $val)
foreach($jumpList as $val)
@ -475,7 +469,7 @@
function sc_sub_forumtitle()
{
$forumName = e107::getParser()->toHTML($this->var['forum_name'], true);
return "<a href='" . e107::getUrl()->create('forum/forum/view', $this->var) . "'>{$forumName}</a>";
return "<a href='" . e107::url('forum', 'forum', $this->var) . "'>".$forumName."</a>";
}
@ -523,7 +517,10 @@
}
return IMAGE_nonew;
--*/
return (USER && is_array($newflag_list) && in_array($this->var['forum_id'], $newflag_list)) ? "<a href='" . e107::getUrl()->create('forum/forum/mfar', 'id=' . $this->var['forum_id']) . "'>" . IMAGE_new . '</a>' : IMAGE_nonew;
// $url = e107::getUrl()->create('forum/forum/mfar', 'id=' . $this->var['forum_id']);
$url = e107::url('forum', 'markread', $this->var);
return (USER && is_array($newflag_list) && in_array($this->var['forum_id'], $newflag_list)) ? "<a href='" . $url . "'>" . IMAGE_new . '</a>' : IMAGE_nonew;
}

View File

@ -1372,12 +1372,14 @@ $(document).ready(function()
}
else
{
var href = '';
var href = undefined;
}
if(href === "#" || e === null || href === undefined)
{
idt = $(e).next("div");
idt = $(e).next("div");
$(idt).toggle("slow");
return false;

File diff suppressed because it is too large Load Diff