1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-08 07:36:32 +02:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Nicholas Liu
2013-05-06 15:46:22 -05:00
5 changed files with 45 additions and 27 deletions

View File

@@ -27,10 +27,9 @@ if(e_AJAX_REQUEST && isset($_GET['src'])) // Ajax
$localfile = md5($remotefile.time()).".zip"; $localfile = md5($remotefile.time()).".zip";
$status = "Downloading..."; $status = "Downloading...";
// e107::getFile()->getRemoteFile($remotefile,$localfile); $fl = e107::getFile();
//$fl->setAuthKey('username','password');
e107::getFile()->download($remotefile,'plugin'); $fl->download($remotefile,'plugin');
exit; exit;
@@ -265,14 +264,13 @@ class pluginManager{
"plugin_icon" => array("title" => EPL_ADLAN_82, "type"=>"icon", "width" => "5%", "thclass" => "middle center",'class'=>'center', "url" => ""), "plugin_icon" => array("title" => EPL_ADLAN_82, "type"=>"icon", "width" => "5%", "thclass" => "middle center",'class'=>'center', "url" => ""),
"plugin_name" => array("title" => EPL_ADLAN_10, 'forced'=>true, "type"=>"text", "width" => "auto", 'class'=>'left', "thclass" => "middle", "url" => ""), "plugin_name" => array("title" => EPL_ADLAN_10, 'forced'=>true, "type"=>"text", "width" => "auto", 'class'=>'left', "thclass" => "middle", "url" => ""),
"plugin_version" => array("title" => EPL_ADLAN_11, "type"=>"numeric", "width" => "5%", "thclass" => "middle", "url" => ""), "plugin_version" => array("title" => EPL_ADLAN_11, "type"=>"numeric", "width" => "5%", "thclass" => "middle", "url" => ""),
"plugin_date" => array("title" => "Released ", "type"=>"text", "width" => "10%", "thclass" => "middle"), "plugin_date" => array("title" => "Released ", "type"=>"text", "width" => "8%", "thclass" => "middle"),
"plugin_folder" => array("title" => EPL_ADLAN_64, "type"=>"text", "width" => "10%", "thclass" => "middle"), "plugin_folder" => array("title" => EPL_ADLAN_64, "type"=>"text", "width" => "10%", "thclass" => "middle"),
"plugin_category" => array("title" => LAN_CATEGORY, "type"=>"text", "width" => "auto", "thclass" => "middle"), "plugin_category" => array("title" => LAN_CATEGORY, "type"=>"text", "width" => "auto", "thclass" => "middle"),
"plugin_author" => array("title" => EPL_ADLAN_12, "type"=>"text", "width" => "10%", "thclass" => "middle"), "plugin_author" => array("title" => EPL_ADLAN_12, "type"=>"text", "width" => "10%", "thclass" => "middle"),
// "plugin_website" => array("title" => EPL_WEBSITE, "type"=>"method", "width" => "5%", "thclass" => "middle center"), "plugin_price" => array("title" => "Price", 'nolist'=>true, "forced"=>true, "type"=>"text", "width" => "5%", "thclass" => "left"),
"plugin_compatible" => array("title" => EPL_ADLAN_13, "type"=>"text", "width" => "5%", "thclass" => "middle"), "plugin_compatible" => array("title" => EPL_ADLAN_13, "type"=>"text", "width" => "5%", "thclass" => "middle"),
"plugin_description" => array("title" => EPL_ADLAN_14, "type"=>"bbarea", "width" => "30%", "thclass" => "middle center", 'readParms' => 'expand=1&truncate=180&bb=1'), "plugin_description" => array("title" => EPL_ADLAN_14, "type"=>"bbarea", "width" => "30%", "thclass" => "middle center", 'readParms' => 'expand=1&truncate=180&bb=1'),
"plugin_compliant" => array("title" => EPL_ADLAN_81, "type"=>"text", "width" => "5%", "thclass" => "middle center", "url" => ""), "plugin_compliant" => array("title" => EPL_ADLAN_81, "type"=>"text", "width" => "5%", "thclass" => "middle center", "url" => ""),
// "plugin_release" => array("title" => EPL_ADLAN_81, "type"=>"text", "width" => "5%", "thclass" => "middle center", "url" => ""), // "plugin_release" => array("title" => EPL_ADLAN_81, "type"=>"text", "width" => "5%", "thclass" => "middle center", "url" => ""),
@@ -298,6 +296,11 @@ class pluginManager{
$this->action = $_GET['mode']; $this->action = $_GET['mode'];
} }
if($this->action == 'online')
{
$this->fields["plugin_price"]['nolist'] = false; // = array("title" => "Price", "forced"=>true, "type"=>"text", "width" => "5%", "thclass" => "middle center");
}
$keys = array_keys($this -> titlearray); $keys = array_keys($this -> titlearray);
$this->pagetitle = (in_array($this->action,$keys)) ? $this -> titlearray[$this->action] : $this -> titlearray['installed']; $this->pagetitle = (in_array($this->action,$keys)) ? $this -> titlearray[$this->action] : $this -> titlearray['installed'];
@@ -346,6 +349,14 @@ class pluginManager{
$this -> fieldpref = (vartrue($user_pref['admin_pluginmanager_columns'])) ? $user_pref['admin_pluginmanager_columns'] : array("plugin_icon","plugin_name","plugin_version","plugin_date","plugin_description","plugin_category","plugin_compatible","plugin_author","plugin_website","plugin_notes"); $this -> fieldpref = (vartrue($user_pref['admin_pluginmanager_columns'])) ? $user_pref['admin_pluginmanager_columns'] : array("plugin_icon","plugin_name","plugin_version","plugin_date","plugin_description","plugin_category","plugin_compatible","plugin_author","plugin_website","plugin_notes");
foreach($this->fields as $key=>$val)
{
if($val['forced'] == true && substr($key,0,6)=='plugin')
{
$this->fieldpref[] = $key;
}
}
if($this->action == 'avail' || $this->action == 'installed') // Plugin Check is done during upgrade_routine. if($this->action == 'avail' || $this->action == 'installed') // Plugin Check is done during upgrade_routine.
{ {
@@ -467,11 +478,12 @@ class pluginManager{
$badge = $this->compatibilityLabel($row['compatibility']);; $badge = $this->compatibilityLabel($row['compatibility']);;
$featured = ($row['featured']== 1) ? " <span class='label label-info'>Featured</span>" : ''; $featured = ($row['featured']== 1) ? " <span class='label label-info'>Featured</span>" : '';
$price = ($row['price'] > 0) ? "<span class='label label-success'>".$row['price']." credits</span>" : "<span class='label label-success'>Free</span>";
$data[] = array( $data[] = array(
'plugin_id' => $c, 'plugin_id' => $c,
'plugin_icon' => vartrue($row['icon'],e_IMAGE."admin_images/plugins_32.png"), 'plugin_icon' => vartrue($row['icon'],e_IMAGE."admin_images/plugins_32.png"),
'plugin_name' => $row['name'].$featured, 'plugin_name' => stripslashes($row['name']).$featured,
'plugin_folder' => $row['folder'], 'plugin_folder' => $row['folder'],
'plugin_date' => vartrue($row['date']), 'plugin_date' => vartrue($row['date']),
'plugin_category' => vartrue($r['category'][0]), 'plugin_category' => vartrue($r['category'][0]),
@@ -482,8 +494,10 @@ class pluginManager{
'plugin_website' => vartrue($row['authorUrl']), 'plugin_website' => vartrue($row['authorUrl']),
'plugin_url' => $row['url'], 'plugin_url' => $row['url'],
'plugin_notes' => '' 'plugin_notes' => '',
'plugin_price' => $price
); );
$c++; $c++;
} }

View File

@@ -625,7 +625,7 @@ if ($e107_popup != 1) {
if(ADMIN) if(ADMIN)
{ {
if(file_exists(e_BASE.'install.php')){ echo "<div class='installer'><br /><b>*** ".CORE_LAN4." ***</b><br />".CORE_LAN5."</div><br /><br />"; } if(file_exists(e_BASE.'install.php') || file_exists(e_BASE.'install_.php')){ echo "<div class='installer'><br /><b>*** ".CORE_LAN4." ***</b><br />".CORE_LAN5."</div><br /><br />"; }
} }
// Display Welcome Message when old method activated. // Display Welcome Message when old method activated.

View File

@@ -686,9 +686,9 @@ class e_file
// Use e107.org login. // Use e107.org login.
private function setAuthKey($username,$password) public function setAuthKey($username,$password)
{ {
$now = gmdate('y-m-d H:i'); $now = gmdate('y-m-d H');
$this->authKey = sha1($username.md5($password).$now); $this->authKey = sha1($username.md5($password).$now);
return $this; return $this;
@@ -741,13 +741,15 @@ class e_file
else else
{ {
$contents = file_get_contents(e_TEMP.$localfile); $contents = file_get_contents(e_TEMP.$localfile);
if($contents == 'false') if(strlen($contents) < 400)
{ {
echo "<div class='e-alert'>Authentication Error</div>"; echo "<script>alert('".$tp->toJS($contents)."')</script>";
exit; return;
} }
} }
// chmod(e_PLUGIN,0777); // chmod(e_PLUGIN,0777);
chmod(e_TEMP.$localfile,0755); chmod(e_TEMP.$localfile,0755);

View File

@@ -24,7 +24,7 @@ define("WMLAN_02","Message");
define("WMLAN_04","Message Text"); define("WMLAN_04","Message Text");
define("WMLAN_05","Enclose"); define("WMLAN_05","Enclose");
define("WMLAN_06","If ticked, the message will be rendered inside box"); define("WMLAN_06","When enabled, the message will be rendered inside a box");
define("WMLAN_07","Override standard system to use {WMESSAGE} shortcode:"); define("WMLAN_07","Override standard system to use {WMESSAGE} shortcode:");
// define("WMLAN_08","Preferences"); // define("WMLAN_08","Preferences");

View File

@@ -303,11 +303,13 @@ if(!$text = $e107cache->retrieve("nq_chatbox"))
{ {
$tp->parseTemplate("{SETIMAGE: w=40}",true); // set thumbnail size. $tp->parseTemplate("{SETIMAGE: w=40}",true); // set thumbnail size.
// FIXME - move to template // FIXME - move to template
$CHATBOX_TEMPLATE['start'] = "<ul class='unstyled'>"; $CHATBOX_TEMPLATE['start'] = "<ul class='media-list unstyled'>";
$CHATBOX_TEMPLATE['item'] = "<li> $CHATBOX_TEMPLATE['item'] = "<li class='media'>
{CB_AVATAR} <b>{USERNAME}</b>&nbsp; <span class='media-object pull-left'>{CB_AVATAR}</span>
<div class='media-body'><b>{USERNAME}</b>&nbsp;
<small class='muted smalltext'>{TIMEDATE}</small><br /> <small class='muted smalltext'>{TIMEDATE}</small><br />
<p style='margin-left:50px'>{MESSAGE}</p> <p>{MESSAGE}</p>
</div>
</li>\n"; </li>\n";
$CHATBOX_TEMPLATE['end'] = "</ul>"; $CHATBOX_TEMPLATE['end'] = "</ul>";