forked from WhatCD/Gazelle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Git
committed
Jun 9, 2013
1 parent
0c8d35e
commit a06c4ea
Showing
25 changed files
with
461 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Try to autodetect as fallback | ||
* text=auto | ||
|
||
# | ||
# Explicit settings in case git gets retarded | ||
# | ||
|
||
# | ||
# Text files | ||
# | ||
*.sql | ||
*.php text | ||
*.xml text | ||
*.js text | ||
*.html text | ||
*.txt text | ||
*.css text | ||
*.phtml text | ||
*.tpl text | ||
|
||
# | ||
# Binary files | ||
# | ||
*.png binary | ||
*.jpeg binary | ||
*.jpg binary | ||
*.gif binary | ||
*.jar binary | ||
*.ico binary | ||
*.TTF binary | ||
*.tar.* binary | ||
*.bz2 binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<?php | ||
/* | ||
if(!check_perms('torrents_edit') || $LoggedUser['DisableWiki']) { | ||
error(403); | ||
} | ||
*/ | ||
|
||
if (!check_perms('users_mod') && !$LoggedUser['ExtraClasses'][DELTA_TEAM]) { | ||
error(403); | ||
} | ||
|
||
View::show_header('Label Aliases'); | ||
|
||
$OrderBy = ($_GET['order']) == "BadLabels" ? "BadLabel" : "AliasLabel"; | ||
/* | ||
$LabelID = (int) $_GET['id']; | ||
$LabelNameSQL = ""; | ||
//TODO join with labels table to get label name | ||
if(!empty($LabelID)) { | ||
$DB->query("SELECT name FROM labels WHERE ID = '$LabelID'"); | ||
if($DB->record_count()) { | ||
list($LabelName) = $DB->next_record(); | ||
} | ||
$LabelNameSQL = " WHERE AliasLabel = '$LabelName'"; | ||
} | ||
*/ | ||
|
||
if (isset($_POST['newalias'])) { | ||
$BadLabel = db_string($_POST['BadLabel']); | ||
$AliasLabel = db_string($_POST['AliasLabel']); | ||
|
||
$DB->query("INSERT INTO label_aliases (BadLabel, AliasLabel) VALUES ('$BadLabel', '$AliasLabel')"); | ||
} | ||
|
||
if (isset($_POST['changealias']) && is_number($_POST['aliasid'])) { | ||
$AliasID = $_POST['aliasid']; | ||
$BadLabel = db_string($_POST['BadLabel']); | ||
$AliasLabel = db_string($_POST['AliasLabel']); | ||
|
||
if ($_POST['save']) { | ||
$DB->query("UPDATE label_aliases SET BadLabel = '$BadLabel', AliasLabel = '$AliasLabel' WHERE ID = '$AliasID' "); | ||
} | ||
if ($_POST['delete']) { | ||
$DB->query("DELETE FROM label_aliases WHERE ID = '$AliasID'"); | ||
} | ||
} | ||
?> | ||
<div class="header"> | ||
<h2>Label Aliases <?=$LabelName ? "for <a href='labels.php?id=$LabelID'>" . $LabelName ."</a>" : ""?></h2> | ||
<div class="linkbox"> | ||
[<a href="tools.php?action=label_aliases&order=GoodLabels">Sort by Good Labels</a>] | ||
[<a href="tools.php?action=label_aliases&order=BadLabels">Sort by Bad Labels</a>] | ||
</div> | ||
</div> | ||
<table width="100%"> | ||
<tr class="colhead"> | ||
<td>Label</td> | ||
<td>Renamed From</td> | ||
<td>Submit</td> | ||
</tr> | ||
<tr/> | ||
<tr> | ||
<form method="post"> | ||
<input type="hidden" name="newalias" value="1" /> | ||
<td> | ||
<input type="text" name="AliasLabel" /> | ||
</td> | ||
<td> | ||
<input type="text" name="BadLabel" /> | ||
</td> | ||
<td> | ||
<input type="submit" value="Add Alias" /> | ||
</td> | ||
</form> | ||
</tr> | ||
<? | ||
$DB->query("SELECT ID,BadLabel, AliasLabel FROM label_aliases $LabelNameSQL ORDER BY $OrderBy"); | ||
while (list($ID, $BadLabel, $AliasLabel) = $DB->next_record()) { | ||
?> | ||
<tr> | ||
<form method="post"> | ||
<input type="hidden" name="changealias" value="1" /> | ||
<input type="hidden" name="aliasid" value="<?=$ID?>" /> | ||
<td> | ||
<input type="text" name="AliasLabel" value="<?=$AliasLabel?>" /> | ||
</td> | ||
<td> | ||
<input type="text" name="BadLabel" value="<?=$BadLabel?>" /> | ||
</td> | ||
<td> | ||
<input type="submit" name="save" value="Save Alias" /> | ||
<input type="submit" name="delete" value="Delete Alias" /> | ||
</td> | ||
</form> | ||
</tr> | ||
<? }?> | ||
</table> | ||
<? View::show_footer(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.